Changeset - 8d6792a6ffdb
[Not reviewed]
default
0 4 1
drewp@bigasterisk.com - 21 months ago 2023-05-25 23:28:04
drewp@bigasterisk.com
use onecolor in TS
5 files changed with 25 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/web/lib/onecolor.d.ts
Show inline comments
 
new file 100644
 
type ColorFormat = "hex" | "rgb" | "hsl" | "hsv";
 
interface Color {
 
  clone(): this;
 
  toString(format?: ColorFormat): string;
 
  toJSON(): string;
 
  value(): number;
 
  value(v: number): this;
 
  hex(): string;
 
}
 

	
 
declare function color(value: any): Color;
 

	
 
export = color;
light9/web/light9-color-picker.ts
Show inline comments
 
@@ -8,8 +8,8 @@ import { GraphToControls } from "./Graph
 
import { DeviceAttrRow } from "./Light9DeviceControl";
 
import { Choice } from "./Light9Listbox";
 
import { SubEvent } from "sub-events";
 
import color from "onecolor";
 

	
 
//<script src="/lib/color/one-color.js"></script>
 
const log = debug("control");
 

	
 
@customElement("light9-color-picker-float")
package.json
Show inline comments
 
@@ -26,6 +26,7 @@
 
    "knockout": "^3.5.1",
 
    "lit": "^2.7.4",
 
    "n3": "^1.16.4",
 
    "onecolor": "^4.0.0",
 
    "parse-prometheus-text-format": "^1.1.1",
 
    "reconnectingwebsocket": "^1.0.0",
 
    "sub-events": "^1.9.0",
pnpm-lock.yaml
Show inline comments
 
@@ -18,6 +18,7 @@ specifiers:
 
  knockout: ^3.5.1
 
  lit: ^2.7.4
 
  n3: ^1.16.4
 
  onecolor: ^4.0.0
 
  parse-prometheus-text-format: ^1.1.1
 
  reconnectingwebsocket: ^1.0.0
 
  sub-events: ^1.9.0
 
@@ -45,6 +46,7 @@ dependencies:
 
  knockout: 3.5.1
 
  lit: 2.7.4
 
  n3: 1.16.4
 
  onecolor: 4.0.0
 
  parse-prometheus-text-format: 1.1.1
 
  reconnectingwebsocket: 1.0.0
 
  sub-events: 1.9.0
 
@@ -1056,6 +1058,11 @@ packages:
 
    hasBin: true
 
    dev: false
 

	
 
  /onecolor/4.0.0:
 
    resolution: {integrity: sha512-DVekU/5RwE8iWt04loesYKLbePAi1KfWD3W0/7YySESLaMJnVNcdgnjEwA1SIvzqjxtYT52/cFC+tB8csFE1sA==}
 
    engines: {node: '>=0.4.8'}
 
    dev: false
 

	
 
  /parse-prometheus-text-format/1.1.1:
 
    resolution: {integrity: sha512-dBlhYVACjRdSqLMFe4/Q1l/Gd3UmXm8ruvsTi7J6ul3ih45AkzkVpI5XHV4aZ37juGZW5+3dGU5lwk+QLM9XJA==}
 
    dependencies:
tsconfig.json
Show inline comments
 
@@ -46,12 +46,13 @@
 
    "moduleResolution": "node"                      /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
 
    "baseUrl": "./"                                 /* Base directory to resolve non-absolute module names. */,
 
    "paths": {                                      /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
 
      "sylvester": ["light9/web/lib/sylvester.d.ts"]
 
      "sylvester": ["light9/web/lib/sylvester.d.ts"],
 
      "onecolor": ["light9/web/lib/onecolor.d.ts"]
 
    },
 
    // "rootDirs": [],                              /* List of root folders whose combined content represents the structure of the project at runtime. */
 
    // "typeRoots": ["/my/proj/light9/light9/web/homepage"],                             /* List of folders to include type definitions from. */
 
    // "types": [],                                 /* Type declaration files to be included in compilation. */
 
    // "allowSyntheticDefaultImports": true,        /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
 
    "allowSyntheticDefaultImports": true,        /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
 
    "esModuleInterop": true,                        /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
 
    // "preserveSymlinks": true,                    /* Do not resolve the real path of symlinks. */
 
    // "allowUmdGlobalAccess": true,                /* Allow accessing UMD globals from modules. */
0 comments (0 inline, 0 general)