@ozio/spicerack 0.1.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +449 -0
- package/dist/index.js +4975 -0
- package/dist/types/index.d.ts +85 -0
- package/package.json +54 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export type SpicerackTheme = 'light' | 'dark';
|
|
2
|
+
|
|
3
|
+
export type SpicerackPosition =
|
|
4
|
+
| 'top-left'
|
|
5
|
+
| 'top-right'
|
|
6
|
+
| 'bottom-left'
|
|
7
|
+
| 'bottom-right';
|
|
8
|
+
|
|
9
|
+
export type SpicerackControl = object;
|
|
10
|
+
|
|
11
|
+
export interface SpicerackTokens {
|
|
12
|
+
appEdgeSpacing?: string;
|
|
13
|
+
appPadding?: string;
|
|
14
|
+
appRadius?: string;
|
|
15
|
+
appWidth?: string;
|
|
16
|
+
appZIndex?: number;
|
|
17
|
+
controlRadius?: string;
|
|
18
|
+
controlGap?: string;
|
|
19
|
+
fontSizeControl?: string;
|
|
20
|
+
fontSizeInput?: string;
|
|
21
|
+
fontSizeTitle?: string;
|
|
22
|
+
bgColorAccent?: string;
|
|
23
|
+
bgColorAccentHover?: string;
|
|
24
|
+
bgColorActive?: string;
|
|
25
|
+
bgColorAlt?: string;
|
|
26
|
+
bgColorApp?: string;
|
|
27
|
+
bgColorCard?: string;
|
|
28
|
+
bgColorControl?: string;
|
|
29
|
+
bgColorElm?: string;
|
|
30
|
+
bgColorMuted?: string;
|
|
31
|
+
fgColorAccent?: string;
|
|
32
|
+
fgColorActive?: string;
|
|
33
|
+
fgColorAlt?: string;
|
|
34
|
+
fgColorApp?: string;
|
|
35
|
+
fgColorCard?: string;
|
|
36
|
+
fgColorElm?: string;
|
|
37
|
+
fgColorMuted?: string;
|
|
38
|
+
borderColorActive?: string;
|
|
39
|
+
borderColorAlt?: string;
|
|
40
|
+
borderColorApp?: string;
|
|
41
|
+
borderColorCard?: string;
|
|
42
|
+
borderColorElm?: string;
|
|
43
|
+
borderColorMuted?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface SpicerackConfig {
|
|
47
|
+
key?: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
value?: unknown;
|
|
50
|
+
label?: string;
|
|
51
|
+
config?: SpicerackConfig[];
|
|
52
|
+
[prop: string]: unknown;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface SpicerackOptions {
|
|
56
|
+
controls?: Record<string, SpicerackControl>;
|
|
57
|
+
tokens?: SpicerackTokens;
|
|
58
|
+
open?: boolean;
|
|
59
|
+
// autoHide?: number;
|
|
60
|
+
theme?: SpicerackTheme;
|
|
61
|
+
position?: SpicerackPosition;
|
|
62
|
+
title?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface SpicerackModelField<T = unknown> {
|
|
66
|
+
value: T;
|
|
67
|
+
on(
|
|
68
|
+
event: 'change',
|
|
69
|
+
callback: (value: T, previousValue: T) => void
|
|
70
|
+
): () => void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type SpicerackModel = Record<string, SpicerackModelField>;
|
|
74
|
+
|
|
75
|
+
export interface SpicerackInstance {
|
|
76
|
+
mount(target?: string | Element): unknown;
|
|
77
|
+
model: SpicerackModel;
|
|
78
|
+
json(): Record<string, unknown>;
|
|
79
|
+
version: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function createSpicerack (
|
|
83
|
+
config: SpicerackConfig[],
|
|
84
|
+
options?: SpicerackOptions
|
|
85
|
+
): SpicerackInstance;
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ozio/spicerack",
|
|
3
|
+
"description": "GUI Controller Library",
|
|
4
|
+
"author": "Nicholas Ortenzio <nicholas.ortenzio@gmail.com>",
|
|
5
|
+
"version": "0.1.0-beta.11",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"private": false,
|
|
8
|
+
"type": "module",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/Ortenzio/spicerack.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/Ortenzio/spicerack",
|
|
14
|
+
"bugs": "https://github.com/Ortenzio/spicerack/issues",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"spicerack",
|
|
17
|
+
"dat-gui",
|
|
18
|
+
"tweakpane",
|
|
19
|
+
"panels",
|
|
20
|
+
"controls",
|
|
21
|
+
"inputs",
|
|
22
|
+
"bindings",
|
|
23
|
+
"gui"
|
|
24
|
+
],
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"types": "dist/types/index.d.ts",
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "vite build --watch",
|
|
38
|
+
"build": "vite build",
|
|
39
|
+
"lint": "oxlint",
|
|
40
|
+
"test-publish": "npm pack --dry-run"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@ozio/spicerack-controls": "*",
|
|
44
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
45
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
46
|
+
"oxlint": "^1.79.0",
|
|
47
|
+
"vite": "^8.2.2",
|
|
48
|
+
"vite-plugin-css-injected-by-js": "^5.0.2",
|
|
49
|
+
"vue": "^3.5.42"
|
|
50
|
+
},
|
|
51
|
+
"browserslist": [
|
|
52
|
+
"baseline 2024"
|
|
53
|
+
]
|
|
54
|
+
}
|