Changeset - f9edd9819b7d
[Not reviewed]
default
9 1 9
drewp@bigasterisk.com - 20 months ago 2023-05-24 21:37:11
drewp@bigasterisk.com
move live/ out of web; it's just a normal (web-only) tool now
10 files changed with 17 insertions and 18 deletions:
0 comments (0 inline, 0 general)
bin/live
Show inline comments
 
#!/bin/zsh
 
pnpm exec vite -c light9/web/live/vite.config.ts &
 
wait
 
exec pnpm exec vite -c light9/live/vite.config.ts
light9/live/Effect.ts
Show inline comments
 
file renamed from light9/web/live/Effect.ts to light9/live/Effect.ts
 
import debug from "debug";
 
import { Literal, NamedNode, Quad_Object, Quad_Predicate, Quad_Subject, Term } from "n3";
 
import { some } from "underscore";
 
import { Patch, patchContainsPreds, patchUpdate } from "../patch";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { shortShow } from "../show_specific";
 
import { Patch, patchContainsPreds, patchUpdate } from "../web/patch";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { shortShow } from "../web/show_specific";
 

	
 
type Color = string;
 
export type ControlValue = number | Color | NamedNode;
 

	
 
const log = debug("effect");
 

	
light9/live/GraphToControls.ts
Show inline comments
 
file renamed from light9/web/live/GraphToControls.ts to light9/live/GraphToControls.ts
 
import debug from "debug";
 
import { NamedNode } from "n3";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { ControlValue, Effect } from "./Effect";
 
const log = debug("g2c");
 

	
 
type NewValueCb = (newValue: ControlValue | null) => void;
 

	
 
// More efficient bridge between liveControl widgets and graph edits (inside Effect),
light9/live/Light9DeviceControl.ts
Show inline comments
 
file renamed from light9/web/live/Light9DeviceControl.ts to light9/live/Light9DeviceControl.ts
 
import debug from "debug";
 
import { css, html, LitElement } from "lit";
 
import { customElement, property } from "lit/decorators.js";
 
import { NamedNode } from "n3";
 
import { unique } from "underscore";
 
import { Patch, patchContainsPreds } from "../patch";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { Patch, patchContainsPreds } from "../web/patch";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { GraphToControls } from "./GraphToControls";
 
import { Choice } from "./Light9Listbox";
 
import { Light9LiveControl } from "./Light9LiveControl";
 
export { ResourceDisplay } from "../ResourceDisplay";
 
export { ResourceDisplay } from "../web/ResourceDisplay";
 
export { Light9LiveControl };
 
const log = debug("devcontrol");
 

	
 
export interface DeviceAttrRow {
 
  uri: NamedNode; //devattr
 
  attrClasses: string; // the css kind
light9/live/Light9Listbox.ts
Show inline comments
 
file renamed from light9/web/live/Light9Listbox.ts to light9/live/Light9Listbox.ts
light9/live/Light9LiveControl.ts
Show inline comments
 
file renamed from light9/web/live/Light9LiveControl.ts to light9/live/Light9LiveControl.ts
 
import debug from "debug";
 
const log = debug("control");
 
import { css, html, LitElement, PropertyPart, PropertyValues } from "lit";
 
import { customElement, property } from "lit/decorators.js";
 
import { NamedNode } from "n3";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { ControlValue } from "./Effect";
 
import { GraphToControls } from "./GraphToControls";
 
import { DeviceAttrRow } from "./Light9DeviceControl";
 
import { Choice } from "./Light9Listbox";
 
export { Slider } from "@material/mwc-slider";
 
@customElement("light9-live-control")
light9/live/Light9LiveControls.ts
Show inline comments
 
file renamed from light9/web/live/Light9LiveControls.ts to light9/live/Light9LiveControls.ts
 
import debug from "debug";
 
import { css, html, LitElement, PropertyValues } from "lit";
 
import { customElement, property } from "lit/decorators.js";
 
import { NamedNode } from "n3";
 
import { sortBy, uniq } from "underscore";
 
import { Patch, patchContainsPreds } from "../patch";
 
import { getTopGraph } from "../RdfdbSyncedGraph";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { Patch, patchContainsPreds } from "../web/patch";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { GraphToControls } from "./GraphToControls";
 
export { EditChoice } from "../EditChoice";
 
export { EditChoice } from "../web/EditChoice";
 
export { Light9DeviceControl as Light9LiveDeviceControl } from "./Light9DeviceControl";
 
const log = debug("controls");
 

	
 
@customElement("light9-live-controls")
 
export class Light9LiveControls extends LitElement {
 
  graph!: SyncedGraph;
light9/live/README.md
Show inline comments
 
file renamed from light9/web/live/README.md to light9/live/README.md
light9/live/index.html
Show inline comments
 
file renamed from light9/web/live/index.html to light9/live/index.html
light9/live/vite.config.ts
Show inline comments
 
file renamed from light9/web/live/vite.config.ts to light9/live/vite.config.ts
 
import { defineConfig } from "vite";
 

	
 
const servicePort = 8217;
 
export default defineConfig({
 
  base: "/live/",
 
  root: "./light9/web/live",
 
  publicDir: "../web",
 
  root: "./light9/live",
 
  publicDir: "../..",
 
  server: {
 
    host: "0.0.0.0",
 
    strictPort: true,
 
    port: servicePort + 100,
 
    hmr: {
 
      port: servicePort + 200,
0 comments (0 inline, 0 general)