ov25-setup 0.1.0
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/dist/components/ConfiguratorSetup/ConfigPanel/index.d.ts +15 -0
- package/dist/components/ConfiguratorSetup/PreviewArea/index.d.ts +7 -0
- package/dist/components/ConfiguratorSetup/StyleEditor/ElementRuleBuilder.d.ts +6 -0
- package/dist/components/ConfiguratorSetup/StyleEditor/controls.d.ts +41 -0
- package/dist/components/ConfiguratorSetup/StyleEditor/index.d.ts +8 -0
- package/dist/components/ConfiguratorSetup/index.d.ts +12 -0
- package/dist/components/ConfiguratorSetup/preview-config-serializable.d.ts +45 -0
- package/dist/components/ConfiguratorSetup/shared-ui.d.ts +37 -0
- package/dist/components/ConfiguratorSetup/types.d.ts +59 -0
- package/dist/components/ConfiguratorSetup/useConfiguratorSetup.d.ts +65 -0
- package/dist/components/ui/color-input.d.ts +8 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9765 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config/configurator-style-variables.d.ts +134 -0
- package/dist/lib/config/preview-config.d.ts +5 -0
- package/dist/lib/utils.d.ts +2 -0
- package/package.json +55 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style variable definitions, element selectors, and CSS generation utilities
|
|
3
|
+
* for the configurator setup visual style editor.
|
|
4
|
+
*/
|
|
5
|
+
export type StyleControlType = 'color' | 'corner' | 'slider' | 'font';
|
|
6
|
+
export interface StyleVariable {
|
|
7
|
+
variable: string;
|
|
8
|
+
label: string;
|
|
9
|
+
defaultValue: string;
|
|
10
|
+
control: StyleControlType;
|
|
11
|
+
sliderMin?: number;
|
|
12
|
+
sliderMax?: number;
|
|
13
|
+
sliderStep?: number;
|
|
14
|
+
sliderUnit?: string;
|
|
15
|
+
sliderLabels?: [string, string];
|
|
16
|
+
}
|
|
17
|
+
export interface StyleGroup {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
description: string;
|
|
21
|
+
variables: StyleVariable[];
|
|
22
|
+
}
|
|
23
|
+
export interface ElementSelector {
|
|
24
|
+
selector: string;
|
|
25
|
+
label: string;
|
|
26
|
+
element: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const CORNER_PRESETS: readonly [{
|
|
29
|
+
readonly value: "0px";
|
|
30
|
+
readonly label: "Sharp";
|
|
31
|
+
}, {
|
|
32
|
+
readonly value: "4px";
|
|
33
|
+
readonly label: "Slight";
|
|
34
|
+
}, {
|
|
35
|
+
readonly value: "8px";
|
|
36
|
+
readonly label: "Rounded";
|
|
37
|
+
}, {
|
|
38
|
+
readonly value: "16px";
|
|
39
|
+
readonly label: "More";
|
|
40
|
+
}, {
|
|
41
|
+
readonly value: "9999px";
|
|
42
|
+
readonly label: "Pill";
|
|
43
|
+
}];
|
|
44
|
+
export declare const FONT_OPTIONS: readonly [{
|
|
45
|
+
readonly value: "'Lato', sans-serif";
|
|
46
|
+
readonly label: "Lato";
|
|
47
|
+
}, {
|
|
48
|
+
readonly value: "'Inter', sans-serif";
|
|
49
|
+
readonly label: "Inter";
|
|
50
|
+
}, {
|
|
51
|
+
readonly value: "'Roboto', sans-serif";
|
|
52
|
+
readonly label: "Roboto";
|
|
53
|
+
}, {
|
|
54
|
+
readonly value: "'Open Sans', sans-serif";
|
|
55
|
+
readonly label: "Open Sans";
|
|
56
|
+
}, {
|
|
57
|
+
readonly value: "'Montserrat', sans-serif";
|
|
58
|
+
readonly label: "Montserrat";
|
|
59
|
+
}, {
|
|
60
|
+
readonly value: "'Poppins', sans-serif";
|
|
61
|
+
readonly label: "Poppins";
|
|
62
|
+
}, {
|
|
63
|
+
readonly value: "'Playfair Display', serif";
|
|
64
|
+
readonly label: "Playfair Display";
|
|
65
|
+
}, {
|
|
66
|
+
readonly value: "'Georgia', serif";
|
|
67
|
+
readonly label: "Georgia";
|
|
68
|
+
}, {
|
|
69
|
+
readonly value: "'Arial', sans-serif";
|
|
70
|
+
readonly label: "Arial";
|
|
71
|
+
}, {
|
|
72
|
+
readonly value: "'Helvetica', sans-serif";
|
|
73
|
+
readonly label: "Helvetica";
|
|
74
|
+
}, {
|
|
75
|
+
readonly value: "'system-ui', sans-serif";
|
|
76
|
+
readonly label: "System UI";
|
|
77
|
+
}];
|
|
78
|
+
export declare const STYLE_GROUPS: StyleGroup[];
|
|
79
|
+
export declare const ELEMENT_SELECTORS: ElementSelector[];
|
|
80
|
+
export declare const ELEMENT_CSS_PROPERTIES: readonly ["background", "background-color", "color", "border", "border-color", "border-width", "border-radius", "padding", "margin", "gap", "font-size", "font-family", "font-weight", "opacity", "display", "max-height", "min-height"];
|
|
81
|
+
export type PropertyInputType = 'color' | 'spacing' | 'size-px' | 'font-select' | 'weight-select' | 'display-select' | 'opacity' | 'text';
|
|
82
|
+
export declare const PROPERTY_INPUT_MAP: Record<string, PropertyInputType>;
|
|
83
|
+
export declare const FONT_WEIGHT_OPTIONS: readonly [{
|
|
84
|
+
readonly value: "100";
|
|
85
|
+
readonly label: "Thin";
|
|
86
|
+
}, {
|
|
87
|
+
readonly value: "200";
|
|
88
|
+
readonly label: "Extra Light";
|
|
89
|
+
}, {
|
|
90
|
+
readonly value: "300";
|
|
91
|
+
readonly label: "Light";
|
|
92
|
+
}, {
|
|
93
|
+
readonly value: "400";
|
|
94
|
+
readonly label: "Normal";
|
|
95
|
+
}, {
|
|
96
|
+
readonly value: "500";
|
|
97
|
+
readonly label: "Medium";
|
|
98
|
+
}, {
|
|
99
|
+
readonly value: "600";
|
|
100
|
+
readonly label: "Semi Bold";
|
|
101
|
+
}, {
|
|
102
|
+
readonly value: "700";
|
|
103
|
+
readonly label: "Bold";
|
|
104
|
+
}, {
|
|
105
|
+
readonly value: "800";
|
|
106
|
+
readonly label: "Extra Bold";
|
|
107
|
+
}, {
|
|
108
|
+
readonly value: "900";
|
|
109
|
+
readonly label: "Black";
|
|
110
|
+
}];
|
|
111
|
+
export declare const DISPLAY_OPTIONS: readonly [{
|
|
112
|
+
readonly value: "block";
|
|
113
|
+
readonly label: "Block";
|
|
114
|
+
}, {
|
|
115
|
+
readonly value: "flex";
|
|
116
|
+
readonly label: "Flex";
|
|
117
|
+
}, {
|
|
118
|
+
readonly value: "grid";
|
|
119
|
+
readonly label: "Grid";
|
|
120
|
+
}, {
|
|
121
|
+
readonly value: "inline";
|
|
122
|
+
readonly label: "Inline";
|
|
123
|
+
}, {
|
|
124
|
+
readonly value: "inline-flex";
|
|
125
|
+
readonly label: "Inline Flex";
|
|
126
|
+
}, {
|
|
127
|
+
readonly value: "inline-block";
|
|
128
|
+
readonly label: "Inline Block";
|
|
129
|
+
}, {
|
|
130
|
+
readonly value: "none";
|
|
131
|
+
readonly label: "Hidden";
|
|
132
|
+
}];
|
|
133
|
+
export declare function generateVariableCSS(styleValues: Record<string, string>): string;
|
|
134
|
+
export declare function generateElementCSS(elementStyles: Record<string, Record<string, string>>): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type LayoutType = 'standard' | 'snap2';
|
|
2
|
+
export type PreviewLayoutType = LayoutType;
|
|
3
|
+
export declare const PREVIEW_PRODUCT_LINKS: Record<LayoutType, string>;
|
|
4
|
+
export declare const DEFAULT_PREVIEW_API_KEY = "15-5f9c5d4197f8b45ee615ac2476e8354a160f384f01c72cd7f2638f41e164c21d";
|
|
5
|
+
export declare const SNAP2_PREVIEW_STARTING_CONFIG_UUID = "e7c2e5a0-1234-5678-9abc-def012345678";
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ov25-setup",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OV25 Configurator Setup visual editor component",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./index.css": "./dist/index.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "vite build && tsc --emitDeclarationOnly --outDir dist",
|
|
21
|
+
"build:react18": "node scripts/build-react18.js",
|
|
22
|
+
"clean": "rimraf dist",
|
|
23
|
+
"prepare": "npm run clean && npm run build"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "^19.0.0",
|
|
27
|
+
"react-dom": "^19.0.0"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
31
|
+
"@radix-ui/react-label": "^2.1.1",
|
|
32
|
+
"@radix-ui/react-popover": "^1.1.4",
|
|
33
|
+
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
34
|
+
"@radix-ui/react-select": "^2.1.4",
|
|
35
|
+
"@radix-ui/react-slider": "^1.2.2",
|
|
36
|
+
"@radix-ui/react-switch": "^1.1.2",
|
|
37
|
+
"@radix-ui/react-tabs": "^1.1.2",
|
|
38
|
+
"class-variance-authority": "^0.7.0",
|
|
39
|
+
"clsx": "^2.1.0",
|
|
40
|
+
"lucide-react": "^0.540.0",
|
|
41
|
+
"react-colorful": "^5.6.1",
|
|
42
|
+
"tailwind-merge": "^2.2.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
46
|
+
"@types/react": "^19.0.0",
|
|
47
|
+
"@types/react-dom": "^19.0.0",
|
|
48
|
+
"react": "^19.0.0",
|
|
49
|
+
"react-dom": "^19.0.0",
|
|
50
|
+
"rimraf": "^5.0.0",
|
|
51
|
+
"tailwindcss": "^4.0.0",
|
|
52
|
+
"typescript": "^5.4.0",
|
|
53
|
+
"vite": "^6.0.0"
|
|
54
|
+
}
|
|
55
|
+
}
|