@cesdk/cesdk-js 1.3.0 → 1.4.0-alpha.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/BlockAPI.d.ts +232 -0
- package/SceneAPI.d.ts +52 -0
- package/VariableAPI.d.ts +21 -0
- package/api.d.ts +11 -0
- package/assets/core/cesdk.data +0 -0
- package/assets/core/cesdk.wasm +0 -0
- package/assets/i18n/de.json +4 -4
- package/assets/i18n/en.json +4 -4
- package/assets/ui/stylesheets/cesdk-themes.css +1 -1
- package/cesdk-engine.umd.d.ts +34 -0
- package/cesdk-engine.umd.js +2 -0
- package/cesdk.umd.js +1 -1
- package/index.html +1 -2
- package/package.json +1 -1
- package/types.d.ts +5 -1
package/BlockAPI.d.ts
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
type Vec2 = { x: number; y: number };
|
|
2
|
+
type DesignElementId = number;
|
|
3
|
+
type DesignElementType = string;
|
|
4
|
+
type MimeType = 'image/png' | 'image/jpeg';
|
|
5
|
+
type Size = number; // | 'auto';
|
|
6
|
+
type Size2 = {
|
|
7
|
+
width: Size;
|
|
8
|
+
height: Size;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default class BlockAPI {
|
|
12
|
+
/**
|
|
13
|
+
* Exports a design block element as a file of the given mime type.
|
|
14
|
+
* Performs an internal update to resolve the final layout for the blocks.
|
|
15
|
+
* @param handle The design block element to export.
|
|
16
|
+
* @param mimeType The mime type of the output file.
|
|
17
|
+
* @returns A promise that resolves with the exported image or is rejected with an error.
|
|
18
|
+
*/
|
|
19
|
+
export(handle: DesignElementId, mimeType: MimeType): Promise<Blob>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create a new block, fails if type is unknown.
|
|
23
|
+
* @param type The type of the block that shall be created.
|
|
24
|
+
* @returns The created blocks handle.
|
|
25
|
+
*/
|
|
26
|
+
create(type: DesignElementType): DesignElementId;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
|
|
30
|
+
* Get the type of the given block, fails if the block is invalid.
|
|
31
|
+
* @param id The block to query.
|
|
32
|
+
* @returns The blocks type.
|
|
33
|
+
*/
|
|
34
|
+
getType(id: DesignElementId): DesignElementType;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Update the selection state of a block.
|
|
38
|
+
* Fails for invalid blocks.
|
|
39
|
+
* @param id The block to query.
|
|
40
|
+
* @param selected Whether or not the block should be selected.
|
|
41
|
+
*/
|
|
42
|
+
setSelected(id: DesignElementId, selected: boolean): void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Get the selected state of a block.
|
|
46
|
+
* @param id The block to query.
|
|
47
|
+
* @returns True if the block is selected, false otherwise.
|
|
48
|
+
*/
|
|
49
|
+
isSelected(id: DesignElementId): boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get all currently selected blocks.
|
|
53
|
+
* @returns An array of block ids.
|
|
54
|
+
*/
|
|
55
|
+
findAllSelected(): DesignElementId[];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Update a block's name.
|
|
59
|
+
* @param id The block to update.
|
|
60
|
+
* @param name The name to set.
|
|
61
|
+
*/
|
|
62
|
+
setName(id: DesignElementId, name: string);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Get a block's name.
|
|
66
|
+
* @param id The block to update.
|
|
67
|
+
*/
|
|
68
|
+
getName(id: DesignElementId): string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Finds all blocks with the given name.
|
|
72
|
+
* @param name The name to search for.
|
|
73
|
+
* @returns A list of block ids.
|
|
74
|
+
*/
|
|
75
|
+
findByName(name: string): DesignElementId[];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Finds all blocks with the given type.
|
|
79
|
+
* @param type The type to search for.
|
|
80
|
+
* @returns A list of block ids.
|
|
81
|
+
*/
|
|
82
|
+
findByType(type: DesignElementType): DesignElementId[];
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Return all blocks currently known to the engine.
|
|
86
|
+
* @returns A list of block ids.
|
|
87
|
+
*/
|
|
88
|
+
findAll(): /* filterSpec?: unknown */ DesignElementId[];
|
|
89
|
+
|
|
90
|
+
// Element
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Query a block's visibility.
|
|
94
|
+
* @param id The block to query.
|
|
95
|
+
* @returns True if visible, false otherwise.
|
|
96
|
+
*/
|
|
97
|
+
isVisible(id: DesignElementId): boolean;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Update a block's visibility.
|
|
101
|
+
* @param id The block to update.
|
|
102
|
+
* @param visible Whether the block shall be visible.
|
|
103
|
+
*/
|
|
104
|
+
setVisible(id: DesignElementId, visible: boolean): void;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Query a block's absolute position in design units.
|
|
108
|
+
* @param id The block to query.
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
111
|
+
getPosition(id: DesignElementId): Vec2;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Update a block's absolute position.
|
|
115
|
+
* @param id The block to update.
|
|
116
|
+
* @param { x, y } pos The new position in design units.
|
|
117
|
+
*/
|
|
118
|
+
setPosition(id: DesignElementId, { x, y }: Vec2): void;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Query a block's rotation in radians.
|
|
122
|
+
* @param id The block to query.
|
|
123
|
+
* @returns The block's rotation around its center in radians.
|
|
124
|
+
*/
|
|
125
|
+
getRotation(id: DesignElementId): number;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Update a block's rotation.
|
|
129
|
+
* @param id The block to update.
|
|
130
|
+
* @param radians The new rotation in radians. Rotation is applied around the block's center.
|
|
131
|
+
*/
|
|
132
|
+
setRotation(id: DesignElementId, radians: number): void;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Query a block's horizontal flip state.
|
|
136
|
+
* @param id The block to query.
|
|
137
|
+
* @returns A boolean indicating for whether the block is flipped in the queried direction
|
|
138
|
+
*/
|
|
139
|
+
getFlipHorizontal(id: DesignElementId): boolean;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Query a block's vertical flip state.
|
|
143
|
+
* @param id The block to query.
|
|
144
|
+
* @returns A boolean indicating for whether the block is flipped in the queried direction
|
|
145
|
+
*/
|
|
146
|
+
getFlipVertical(id: DesignElementId): boolean;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Update a block's horizontal flip.
|
|
150
|
+
* @param id The block to update.
|
|
151
|
+
* @param horizontal Whether the block should be flipped along its x-axis.
|
|
152
|
+
* @returns
|
|
153
|
+
*/
|
|
154
|
+
setFlipHorizontal(id: DesignElementId, flip: boolean): void;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Update a block's vertical flip.
|
|
158
|
+
* @param id The block to update.
|
|
159
|
+
* @param vertical Whether the block should be flipped along its y-axis.
|
|
160
|
+
* @returns
|
|
161
|
+
*/
|
|
162
|
+
setFlipVertical(id: DesignElementId, flip: boolean): void;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Query a block's absolute size in design units.
|
|
166
|
+
* @param id The block to query.
|
|
167
|
+
* @returns A `Size2` object.
|
|
168
|
+
*/
|
|
169
|
+
getSize(id: DesignElementId): Size2;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Update a block's absolute size in design units.
|
|
173
|
+
* @param id The block to update.
|
|
174
|
+
* @param size A size object defining width and height.
|
|
175
|
+
*/
|
|
176
|
+
setSize(id: DesignElementId, size: Size2): void;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Get a block's layouted size. Requires an `engine.render()` beforehand.
|
|
180
|
+
* @param id The block to query.
|
|
181
|
+
* @returns A `Size2` object holding the size.
|
|
182
|
+
*/
|
|
183
|
+
getFrameSize(id: DesignElementId): Size2;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Duplicates a block including its children.
|
|
187
|
+
* @param id The block to duplicate.
|
|
188
|
+
* @returns The handle of the duplicate.
|
|
189
|
+
*/
|
|
190
|
+
duplicate(id: DesignElementId): DesignElementId;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Destroys a block.
|
|
194
|
+
* @param id The block to destroy.
|
|
195
|
+
*/
|
|
196
|
+
destroy(id: DesignElementId): void;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Query a block's parent.
|
|
200
|
+
* @param id The block to query.
|
|
201
|
+
* @returns The parent's handle.
|
|
202
|
+
*/
|
|
203
|
+
getParent(id: DesignElementId): DesignElementId;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Get all children of the given block. Children
|
|
207
|
+
* are sorted in their rendering order: Last child is rendered
|
|
208
|
+
* in front of other children.
|
|
209
|
+
* @param id The block to query.
|
|
210
|
+
* @returns A list of block ids.
|
|
211
|
+
*/
|
|
212
|
+
getChildren(id: DesignElementId): DesignElementId[];
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Insert a new or existing child at a certain position in the parent's children.
|
|
216
|
+
* @param parent The block whose children should be updated.
|
|
217
|
+
* @param child The child to insert. Can be an existing child of `parent`.
|
|
218
|
+
* @param index The index to insert or move to.
|
|
219
|
+
*/
|
|
220
|
+
insertChild(
|
|
221
|
+
parent: DesignElementId,
|
|
222
|
+
child: DesignElementId,
|
|
223
|
+
index: number
|
|
224
|
+
): void;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Appends a new or existing child to a block's children.
|
|
228
|
+
* @param parent The block whose children should be updated.
|
|
229
|
+
* @param child The child to insert. Can be an existing child of `parent`.
|
|
230
|
+
*/
|
|
231
|
+
appendChild(parent: DesignElementId, child: DesignElementId): void;
|
|
232
|
+
}
|
package/SceneAPI.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
type DesignBlockId = number;
|
|
2
|
+
|
|
3
|
+
export default class SceneAPI {
|
|
4
|
+
/**
|
|
5
|
+
* Load the contents of a scene file.
|
|
6
|
+
* @param sceneContent The scene file contents, a base64 string.
|
|
7
|
+
* @returns A handle to the loaded scene.
|
|
8
|
+
*/
|
|
9
|
+
loadFromString(sceneContent: string): DesignBlockId;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Load a scene from the URL to the scene file.
|
|
13
|
+
* The scene file will be fetched asynchronously by the engine. This requires continous `render`
|
|
14
|
+
* calls on this engines instance.
|
|
15
|
+
* @param url The URL of the scene file.
|
|
16
|
+
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
17
|
+
*/
|
|
18
|
+
loadFromURL(url: string): Promise<DesignBlockId>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Serializes the current scene into a string. Selection is discarded.
|
|
22
|
+
* @returns A promise that resolves with a string on success or an error on failure.
|
|
23
|
+
*/
|
|
24
|
+
saveToString(): Promise<string>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Create a new scene, along with its own camera.
|
|
28
|
+
* @returns The scenes handle.
|
|
29
|
+
*/
|
|
30
|
+
create(): DesignBlockId;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Loads the given image and creates a scene with a single page showing the image.
|
|
34
|
+
* Fetching the image may take an arbitrary amount of time, so the scene isn't immediately
|
|
35
|
+
* available.
|
|
36
|
+
* @param url The image URL.
|
|
37
|
+
* @param dpi The scenes DPI.
|
|
38
|
+
* @param pixelScaleFactor The displays pixel scale factor.
|
|
39
|
+
* @returns A promise that resolves with the scene ID on success or rejected with an error otherwise.
|
|
40
|
+
*/
|
|
41
|
+
createFromImage(
|
|
42
|
+
url: string,
|
|
43
|
+
dpi?: number,
|
|
44
|
+
pixelScaleFactor?: number
|
|
45
|
+
): Promise<DesignBlockId>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Return the currently active scene.
|
|
49
|
+
* @returns The scene or null, if none was created yet.
|
|
50
|
+
*/
|
|
51
|
+
get(): DesignBlockId | null;
|
|
52
|
+
}
|
package/VariableAPI.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default class VariableAPI {
|
|
2
|
+
/**
|
|
3
|
+
* Get all text variables currently stored in the engine.
|
|
4
|
+
* @returns Return a list of variable names
|
|
5
|
+
*/
|
|
6
|
+
findAll(): string[];
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Set a text variable.
|
|
10
|
+
* @param key The variable's key.
|
|
11
|
+
* @param value The text to replace the variable with.
|
|
12
|
+
*/
|
|
13
|
+
set(key: string, value: string): void;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Set a text variable.
|
|
17
|
+
* @param key The variable's key.
|
|
18
|
+
* @returns The text value of the variable.
|
|
19
|
+
*/
|
|
20
|
+
get(key: string): string;
|
|
21
|
+
}
|
package/api.d.ts
ADDED
package/assets/core/cesdk.data
CHANGED
|
Binary file
|
package/assets/core/cesdk.wasm
CHANGED
|
Binary file
|
package/assets/i18n/de.json
CHANGED
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
"label": "Texthintergrundfarbe"
|
|
500
500
|
}
|
|
501
501
|
},
|
|
502
|
-
"
|
|
502
|
+
"image": {
|
|
503
503
|
"crop": {
|
|
504
504
|
"label": "Bildausschnitt"
|
|
505
505
|
},
|
|
@@ -722,7 +722,7 @@
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
},
|
|
725
|
-
"
|
|
725
|
+
"image": {
|
|
726
726
|
"label": "Bild",
|
|
727
727
|
"select": { "label": "$t(common.select)" },
|
|
728
728
|
"scope": {
|
|
@@ -749,7 +749,7 @@
|
|
|
749
749
|
"description": " Höhe vom Zuschneidebereich in {{unit}}"
|
|
750
750
|
}
|
|
751
751
|
},
|
|
752
|
-
"
|
|
752
|
+
"image": {
|
|
753
753
|
"heading": "Bild",
|
|
754
754
|
"x": {
|
|
755
755
|
"label": "X Versatz",
|
|
@@ -1114,7 +1114,7 @@
|
|
|
1114
1114
|
"fixedFrame": { "description": "Feste Größe aktivieren" }
|
|
1115
1115
|
},
|
|
1116
1116
|
|
|
1117
|
-
"
|
|
1117
|
+
"image": {
|
|
1118
1118
|
"crop": { "description": "Bild beschneiden" },
|
|
1119
1119
|
"filter": { "description": "Filter anwenden" }
|
|
1120
1120
|
},
|
package/assets/i18n/en.json
CHANGED
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
"label": "Text Background Color"
|
|
500
500
|
}
|
|
501
501
|
},
|
|
502
|
-
"
|
|
502
|
+
"image": {
|
|
503
503
|
"crop": {
|
|
504
504
|
"label": "Image Crop"
|
|
505
505
|
},
|
|
@@ -722,7 +722,7 @@
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
},
|
|
725
|
-
"
|
|
725
|
+
"image": {
|
|
726
726
|
"label": "Image",
|
|
727
727
|
"select": { "label": "$t(common.select)" },
|
|
728
728
|
"scope": {
|
|
@@ -749,7 +749,7 @@
|
|
|
749
749
|
"description": "Height of the crop frame in {{unit}}"
|
|
750
750
|
}
|
|
751
751
|
},
|
|
752
|
-
"
|
|
752
|
+
"image": {
|
|
753
753
|
"heading": "Image",
|
|
754
754
|
"x": {
|
|
755
755
|
"label": "X Offset",
|
|
@@ -1187,7 +1187,7 @@
|
|
|
1187
1187
|
"fixedFrame": { "description": "Enable fixed frame" }
|
|
1188
1188
|
},
|
|
1189
1189
|
|
|
1190
|
-
"
|
|
1190
|
+
"image": {
|
|
1191
1191
|
"crop": { "description": "Crop image" },
|
|
1192
1192
|
"filter": { "description": "Apply filter" }
|
|
1193
1193
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ubq-dark{--ubq-elevation-2: hsl(210, 7.5%, 20%);--ubq-elevation-1: hsl(210, 15%, 15%);--ubq-canvas: hsl(210, 30%, 10%);--ubq-foreground-default: hsla(210, 0%, 100%, 0.9);--ubq-foreground-light: hsla(210, 0%, 100%, 0.7);--ubq-foreground-info: hsla(210, 0%, 100%, 0.5);--ubq-foreground-active: hsla(210, 30%, 10%, 0.9);--ubq-foreground-accent: hsla(210, 0%, 100%, 1);--ubq-interactive-default: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.1);--ubq-interactive-hover: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.15);--ubq-interactive-pressed: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.02);--ubq-interactive-active-default: linear-gradient( to bottom, hsla(0, 0%, 100%, 1), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.88);--ubq-interactive-active-hover: linear-gradient( to bottom, hsla(0, 0%, 100%, 1), hsla(0, 0%, 100%, 0) ), hsla(210, 100%, 95%, 0.98);--ubq-interactive-active-pressed: linear-gradient( to bottom, hsla(0, 0%, 100%, 1), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.5);--ubq-interactive-accent-default: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 0.8);--ubq-interactive-accent-hover: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 1);--ubq-interactive-accent-pressed: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 0.7);--ubq-interactive-template-default: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(165, 54, 252, 0.4);--ubq-interactive-template-hover: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(165, 54, 252, 0.6);--ubq-interactive-template-pressed: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(165, 54, 252, 0.3);--ubq-input-default: linear-gradient( to bottom, hsla(0, 0%, 0%, 0.2), hsla(0, 0%, 0%, 0) ), hsla(0, 0%, 0%, 0.2);--ubq-input-hover: linear-gradient( to bottom, hsla(0, 0%, 0%, 0.2), hsla(0, 0%, 0%, 0) ), hsla(0, 0%, 0%, 0.4);--ubq-interactive-group-active: rgba(255, 255, 255, 0.05);--ubq-border-outline: hsla(210, 0%, 100%, 0.16);--ubq-border-divider: hsla(210, 0%, 100%, 0.08);--ubq-border-contrast: hsla(210, 0%, 100%, 0.25);--ubq-focus-default: hsl(230, 90%, 80%);--ubq-focus-outline: hsl(210, 30%, 10%);--ubq-overlay: hsla(210, 30%, 10%, 0.8);--ubq-notice-info: hsla(0, 0%, 100%, 1);--ubq-notice-success: hsla(166, 90%, 37%, 1);--ubq-notice-warning: hsla(40, 100%, 60%, 1);--ubq-notice-error: hsla(338, 64%, 62%, 1);--ubq-effect-shadow: 0px 4px 16px -4px rgba(16, 22, 28, 0.14), 0px 1px 20px -4px rgba(16, 22, 28, 0.12), 0px 2px 12px -4px rgba(16, 22, 28, 0.2);--ubq-effect-focus: 0 0 0 calc(var(--ubq-scale-base) / 2) var(--ubq-focus-outline), 0 0 0 var(--ubq-scale-base) var(--ubq-focus-default);--ubq-Slider-track-progress-color: hsla( 210, 0%, 100%, 0.16 );--ubq-Slider-background-color: hsla( 210, 0%, 100%, 0.08 );--ubq-static-selection-frame: hsl(230, 100%, 60%);--ubq-static-contrast-white: hsl(210, 0%, 100%);--ubq-static-contrast-black: hsl(210, 0%, 0%);--ubq-static-snapping: hsl(338, 100%, 50%);--ubq-static-bleed: hsl(334, 73%, 43%);--ubq-static-text-variable: hsl(274, 97%, 60%);--ubq-static-card-label-background: linear-gradient( 180deg, rgba(0, 0, 0, 0) 14.46%, rgba(0, 0, 0, 0.6) 100% )}.ubq-light{--ubq-elevation-2: hsl(210, 10%, 95%);--ubq-elevation-1: hsl(210, 10%, 90%);--ubq-canvas: hsl(210, 10%, 85%);--ubq-foreground-default: hsla(210, 30%, 10%, 0.9);--ubq-foreground-light: hsla(210, 30%, 10%, 0.7);--ubq-foreground-info: hsla(210, 30%, 10%, 0.5);--ubq-foreground-active: hsla(210, 0%, 100%, 0.9);--ubq-foreground-accent: hsla(210, 0%, 100%, 1);--ubq-interactive-default: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.8), hsla(0, 0%, 100%, 0) ), hsla(0, 50%, 100%, 0.6);--ubq-interactive-hover: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 0%, 0.15);--ubq-interactive-pressed: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.02%);--ubq-interactive-active-default: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(210, 60%, 5%, 0.85);--ubq-interactive-active-hover: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(210, 60%, 8%, 0.8);--ubq-interactive-active-pressed: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(210, 60%, 5%, 0.95);--ubq-interactive-accent-default: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 0.8);--ubq-interactive-accent-hover: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 1);--ubq-interactive-accent-pressed: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 0.7);--ubq-interactive-template-default: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(142, 4, 251, 0.4);--ubq-interactive-template-hover: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(142, 4, 251, 0.6);--ubq-interactive-template-pressed: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(142, 4, 251, 0.3);--ubq-input-default: linear-gradient( to bottom, hsla(0, 0%, 0%, 0.04), hsla(0, 0%, 0%, 0) ), hsla(0, 0%, 0%, 0.08);--ubq-input-hover: linear-gradient( to bottom, hsla(0, 0%, 0%, 0.04), hsla(0, 0%, 0%, 0) ), hsla(0, 0%, 0%, 0.2);--ubq-border-outline: hsla(210, 0%, 0%, 0.16);--ubq-border-divider: hsla(210, 0%, 0%, 0.08);--ubq-border-contrast: hsla(210, 0%, 0%, 0.25);--ubq-focus-default: hsl(230, 100%, 60%);--ubq-focus-outline: hsl(210, 10%, 85%);--ubq-overlay: hsla(210, 10%, 85%, 0.8);--ubq-notice-info: hsla(208, 29%, 10%, 1);--ubq-notice-success: hsla(166, 90%, 37%, 1);--ubq-notice-warning: hsla(46, 100%, 29%, 1);--ubq-notice-error: hsla(338, 64%, 51%, 1);--ubq-effect-shadow: 0px 4px 16px -4px rgba(16, 22, 28, 0.14), 0px 1px 20px -4px rgba(16, 22, 28, 0.12), 0px 2px 12px -4px rgba(16, 22, 28, 0.2);--ubq-effect-focus: 0 0 0 calc(var(--ubq-scale-base) / 2) var(--ubq-focus-outline), 0 0 0 var(--ubq-scale-base) var(--ubq-focus-default);--ubq-Slider-track-progress-color: hsla( 210, 0%, 0%, 0.16 );--ubq-Slider-background-color: hsla( 210, 0%, 0%, 0.08 );--ubq-static-selection-frame: hsl(230, 100%, 60%);--ubq-static-contrast-white: hsl(210, 0%, 100%);--ubq-static-contrast-black: hsl(210, 0%, 0%);--ubq-static-snapping: hsl(338, 100%, 50%);--ubq-static-bleed: hsl(334, 73%, 43%);--ubq-static-text-variable: hsl(274, 97%, 60%);--ubq-static-card-label-background: linear-gradient( 180deg, rgba(0, 0, 0, 0) 14.46%, rgba(0, 0, 0, 0.6) 100% )}.ubq-normal{--ubq-typography-headline-l-size: 16px;--ubq-typography-headline-l-line_height: 20px;--ubq-typography-headline-l-letter_spacing: 0.01em;--ubq-typography-headline-l-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-headline-l-weight: 600;--ubq-typography-headline-m-size: 12px;--ubq-typography-headline-m-line_height: 16px;--ubq-typography-headline-m-letter_spacing: 0.03em;--ubq-typography-headline-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-headline-m-weight: 600;--ubq-typography-label-m-size: 12px;--ubq-typography-label-m-line_height: 16px;--ubq-typography-label-m-letter_spacing: 0.02em;--ubq-typography-label-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-label-m-weight: normal;--ubq-typography-label-s-size: 10px;--ubq-typography-label-s-line_height: 14px;--ubq-typography-label-s-letter_spacing: 0.02em;--ubq-typography-label-s-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-label-s-weight: normal;--ubq-typography-body-m-size: 12px;--ubq-typography-body-m-line_height: 18px;--ubq-typography-body-m-letter_spacing: 0.02em;--ubq-typography-body-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-body-m-weight: normal;--ubq-typography-input-m-size: 12px;--ubq-typography-input-m-line_height: 16px;--ubq-typography-input-m-letter_spacing: 0.02em;--ubq-typography-input-m-font_family: var( --ubq-typography-font_family, "Overpass Mono", monospace );--ubq-typography-input-m-weight: 500;--ubq-typography-button-m-size: 12px;--ubq-typography-button-m-line_height: 16px;--ubq-typography-button-m-letter_spacing: 0.02em;--ubq-typography-button-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-button-m-weight: normal;--ubq-scale-base: 4px;--ubq-margin-base: 4px;--ubq-margin-xs: 4px;--ubq-margin-s: 8px;--ubq-margin-m: 12px;--ubq-margin-l: 16px;--ubq-border_radius-base: 3px;--ubq-border_radius-s: 3px;--ubq-border_radius-m: 6px;--ubq-border_radius-l: 12px}.ubq-large{--ubq-typography-headline-l-size: 20px;--ubq-typography-headline-l-line_height: 25px;--ubq-typography-headline-l-letter_spacing: 0.01em;--ubq-typography-headline-l-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-headline-l-weight: 600;--ubq-typography-headline-m-size: 15px;--ubq-typography-headline-m-line_height: 20px;--ubq-typography-headline-m-letter_spacing: 0.03em;--ubq-typography-headline-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-headline-m-weight: 600;--ubq-typography-label-m-size: 15px;--ubq-typography-label-m-line_height: 20px;--ubq-typography-label-m-letter_spacing: 0.02em;--ubq-typography-label-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-label-m-weight: normal;--ubq-typography-label-s-size: 12.5px;--ubq-typography-label-s-line_height: 17.5px;--ubq-typography-label-s-letter_spacing: 0.02em;--ubq-typography-label-s-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-label-s-weight: normal;--ubq-typography-body-m-size: 15px;--ubq-typography-body-m-line_height: 22.5px;--ubq-typography-body-m-letter_spacing: 0.02em;--ubq-typography-body-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-body-m-weight: normal;--ubq-typography-input-m-size: 15px;--ubq-typography-input-m-line_height: 20px;--ubq-typography-input-m-letter_spacing: 0.02em;--ubq-typography-input-m-font_family: var( --ubq-typography-font_family, "Overpass Mono", monospace );--ubq-typography-input-m-weight: 500;--ubq-typography-button-m-size: 15px;--ubq-typography-button-m-line_height: 20px;--ubq-typography-button-m-letter_spacing: 0.02em;--ubq-typography-button-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-button-m-weight: normal;--ubq-scale-base: 5px;--ubq-margin-base: 5px;--ubq-margin-xs: 5px;--ubq-margin-s: 10px;--ubq-margin-m: 15px;--ubq-margin-l: 20px;--ubq-border_radius-base: 3.75px;--ubq-border_radius-s: 3.75px;--ubq-border_radius-m: 7.5px;--ubq-border_radius-l: 15px}
|
|
1
|
+
.ubq-dark{--ubq-elevation-2: hsl(210, 7.5%, 20%);--ubq-elevation-1: hsl(210, 15%, 15%);--ubq-canvas: hsl(210, 30%, 10%);--ubq-foreground-default: hsla(210, 0%, 100%, 0.9);--ubq-foreground-light: hsla(210, 0%, 100%, 0.7);--ubq-foreground-info: hsla(210, 0%, 100%, 0.5);--ubq-foreground-active: hsla(210, 30%, 10%, 0.9);--ubq-foreground-accent: hsla(210, 0%, 100%, 1);--ubq-interactive-default: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.1);--ubq-interactive-hover: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.15);--ubq-interactive-pressed: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.02);--ubq-interactive-active-default: linear-gradient( to bottom, hsla(0, 0%, 100%, 1), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.88);--ubq-interactive-active-hover: linear-gradient( to bottom, hsla(0, 0%, 100%, 1), hsla(0, 0%, 100%, 0) ), hsla(210, 100%, 95%, 0.98);--ubq-interactive-active-pressed: linear-gradient( to bottom, hsla(0, 0%, 100%, 1), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.5);--ubq-interactive-accent-default: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 0.8);--ubq-interactive-accent-hover: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 1);--ubq-interactive-accent-pressed: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 0.7);--ubq-interactive-template-default: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(165, 54, 252, 0.4);--ubq-interactive-template-hover: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(165, 54, 252, 0.6);--ubq-interactive-template-pressed: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(165, 54, 252, 0.3);--ubq-input-default: linear-gradient( to bottom, hsla(0, 0%, 0%, 0.2), hsla(0, 0%, 0%, 0) ), hsla(0, 0%, 0%, 0.2);--ubq-input-hover: linear-gradient( to bottom, hsla(0, 0%, 0%, 0.2), hsla(0, 0%, 0%, 0) ), hsla(0, 0%, 0%, 0.4);--ubq-interactive-group-active: rgba(255, 255, 255, 0.05);--ubq-border-outline: hsla(210, 0%, 100%, 0.16);--ubq-border-divider: hsla(210, 0%, 100%, 0.08);--ubq-border-contrast: hsla(210, 0%, 100%, 0.25);--ubq-focus-default: hsl(230, 90%, 80%);--ubq-focus-outline: hsl(210, 30%, 10%);--ubq-overlay: hsla(210, 30%, 10%, 0.8);--ubq-notice-info: hsla(0, 0%, 100%, 1);--ubq-notice-success: hsla(166, 90%, 37%, 1);--ubq-notice-warning: hsla(40, 100%, 60%, 1);--ubq-notice-error: hsla(338, 64%, 62%, 1);--ubq-effect-shadow: 0px 4px 16px -4px rgba(16, 22, 28, 0.14), 0px 1px 20px -4px rgba(16, 22, 28, 0.12), 0px 2px 12px -4px rgba(16, 22, 28, 0.2);--ubq-effect-focus: 0 0 0 calc(var(--ubq-scale-base) / 2 - 0.01px) var(--ubq-focus-outline), 0 0 0 var(--ubq-scale-base) var(--ubq-focus-default);--ubq-Slider-track-progress-color: hsla( 210, 0%, 100%, 0.16 );--ubq-Slider-background-color: hsla( 210, 0%, 100%, 0.08 );--ubq-static-selection-frame: hsl(230, 100%, 60%);--ubq-static-contrast-white: hsl(210, 0%, 100%);--ubq-static-contrast-black: hsl(210, 0%, 0%);--ubq-static-snapping: hsl(338, 100%, 50%);--ubq-static-bleed: hsl(334, 73%, 43%);--ubq-static-text-variable: hsl(274, 97%, 60%);--ubq-static-card-label-background: linear-gradient( 180deg, rgba(0, 0, 0, 0) 14.46%, rgba(0, 0, 0, 0.6) 100% )}.ubq-light{--ubq-elevation-2: hsl(210, 10%, 95%);--ubq-elevation-1: hsl(210, 10%, 90%);--ubq-canvas: hsl(210, 10%, 85%);--ubq-foreground-default: hsla(210, 30%, 10%, 0.9);--ubq-foreground-light: hsla(210, 30%, 10%, 0.7);--ubq-foreground-info: hsla(210, 30%, 10%, 0.5);--ubq-foreground-active: hsla(210, 0%, 100%, 0.9);--ubq-foreground-accent: hsla(210, 0%, 100%, 1);--ubq-interactive-default: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.8), hsla(0, 0%, 100%, 0) ), hsla(0, 50%, 100%, 0.6);--ubq-interactive-hover: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 0%, 0.15);--ubq-interactive-pressed: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.4), hsla(0, 0%, 100%, 0) ), hsla(0, 0%, 100%, 0.02%);--ubq-interactive-active-default: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(210, 60%, 5%, 0.85);--ubq-interactive-active-hover: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(210, 60%, 8%, 0.8);--ubq-interactive-active-pressed: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.04), hsla(0, 0%, 100%, 0) ), hsla(210, 60%, 5%, 0.95);--ubq-interactive-accent-default: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 0.8);--ubq-interactive-accent-hover: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 1);--ubq-interactive-accent-pressed: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(61, 92, 245, 0.7);--ubq-interactive-template-default: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(142, 4, 251, 0.4);--ubq-interactive-template-hover: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(142, 4, 251, 0.6);--ubq-interactive-template-pressed: linear-gradient( 180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100% ), rgba(142, 4, 251, 0.3);--ubq-input-default: linear-gradient( to bottom, hsla(0, 0%, 0%, 0.04), hsla(0, 0%, 0%, 0) ), hsla(0, 0%, 0%, 0.08);--ubq-input-hover: linear-gradient( to bottom, hsla(0, 0%, 0%, 0.04), hsla(0, 0%, 0%, 0) ), hsla(0, 0%, 0%, 0.2);--ubq-border-outline: hsla(210, 0%, 0%, 0.16);--ubq-border-divider: hsla(210, 0%, 0%, 0.08);--ubq-border-contrast: hsla(210, 0%, 0%, 0.25);--ubq-focus-default: hsl(230, 100%, 60%);--ubq-focus-outline: hsl(210, 10%, 85%);--ubq-overlay: hsla(210, 10%, 85%, 0.8);--ubq-notice-info: hsla(208, 29%, 10%, 1);--ubq-notice-success: hsla(166, 90%, 37%, 1);--ubq-notice-warning: hsla(46, 100%, 29%, 1);--ubq-notice-error: hsla(338, 64%, 51%, 1);--ubq-effect-shadow: 0px 4px 16px -4px rgba(16, 22, 28, 0.14), 0px 1px 20px -4px rgba(16, 22, 28, 0.12), 0px 2px 12px -4px rgba(16, 22, 28, 0.2);--ubq-effect-focus: 0 0 0 calc(var(--ubq-scale-base) / 2 - 0.01px) var(--ubq-focus-outline), 0 0 0 var(--ubq-scale-base) var(--ubq-focus-default);--ubq-Slider-track-progress-color: hsla( 210, 0%, 0%, 0.16 );--ubq-Slider-background-color: hsla( 210, 0%, 0%, 0.08 );--ubq-static-selection-frame: hsl(230, 100%, 60%);--ubq-static-contrast-white: hsl(210, 0%, 100%);--ubq-static-contrast-black: hsl(210, 0%, 0%);--ubq-static-snapping: hsl(338, 100%, 50%);--ubq-static-bleed: hsl(334, 73%, 43%);--ubq-static-text-variable: hsl(274, 97%, 60%);--ubq-static-card-label-background: linear-gradient( 180deg, rgba(0, 0, 0, 0) 14.46%, rgba(0, 0, 0, 0.6) 100% )}.ubq-normal{--ubq-typography-headline-l-size: 16px;--ubq-typography-headline-l-line_height: 20px;--ubq-typography-headline-l-letter_spacing: 0.01em;--ubq-typography-headline-l-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-headline-l-weight: 600;--ubq-typography-headline-m-size: 12px;--ubq-typography-headline-m-line_height: 16px;--ubq-typography-headline-m-letter_spacing: 0.03em;--ubq-typography-headline-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-headline-m-weight: 600;--ubq-typography-label-m-size: 12px;--ubq-typography-label-m-line_height: 16px;--ubq-typography-label-m-letter_spacing: 0.02em;--ubq-typography-label-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-label-m-weight: normal;--ubq-typography-label-s-size: 10px;--ubq-typography-label-s-line_height: 14px;--ubq-typography-label-s-letter_spacing: 0.02em;--ubq-typography-label-s-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-label-s-weight: normal;--ubq-typography-body-m-size: 12px;--ubq-typography-body-m-line_height: 18px;--ubq-typography-body-m-letter_spacing: 0.02em;--ubq-typography-body-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-body-m-weight: normal;--ubq-typography-input-m-size: 12px;--ubq-typography-input-m-line_height: 16px;--ubq-typography-input-m-letter_spacing: 0.02em;--ubq-typography-input-m-font_family: var( --ubq-typography-font_family, "Overpass Mono", monospace );--ubq-typography-input-m-weight: 500;--ubq-typography-button-m-size: 12px;--ubq-typography-button-m-line_height: 16px;--ubq-typography-button-m-letter_spacing: 0.02em;--ubq-typography-button-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-button-m-weight: normal;--ubq-scale-base: 4px;--ubq-margin-base: 4px;--ubq-margin-xs: 4px;--ubq-margin-s: 8px;--ubq-margin-m: 12px;--ubq-margin-l: 16px;--ubq-border_radius-base: 3px;--ubq-border_radius-s: 3px;--ubq-border_radius-m: 6px;--ubq-border_radius-l: 12px}.ubq-large{--ubq-typography-headline-l-size: 20px;--ubq-typography-headline-l-line_height: 25px;--ubq-typography-headline-l-letter_spacing: 0.01em;--ubq-typography-headline-l-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-headline-l-weight: 600;--ubq-typography-headline-m-size: 15px;--ubq-typography-headline-m-line_height: 20px;--ubq-typography-headline-m-letter_spacing: 0.03em;--ubq-typography-headline-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-headline-m-weight: 600;--ubq-typography-label-m-size: 15px;--ubq-typography-label-m-line_height: 20px;--ubq-typography-label-m-letter_spacing: 0.02em;--ubq-typography-label-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-label-m-weight: normal;--ubq-typography-label-s-size: 12.5px;--ubq-typography-label-s-line_height: 17.5px;--ubq-typography-label-s-letter_spacing: 0.02em;--ubq-typography-label-s-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-label-s-weight: normal;--ubq-typography-body-m-size: 15px;--ubq-typography-body-m-line_height: 22.5px;--ubq-typography-body-m-letter_spacing: 0.02em;--ubq-typography-body-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-body-m-weight: normal;--ubq-typography-input-m-size: 15px;--ubq-typography-input-m-line_height: 20px;--ubq-typography-input-m-letter_spacing: 0.02em;--ubq-typography-input-m-font_family: var( --ubq-typography-font_family, "Overpass Mono", monospace );--ubq-typography-input-m-weight: 500;--ubq-typography-button-m-size: 15px;--ubq-typography-button-m-line_height: 20px;--ubq-typography-button-m-letter_spacing: 0.02em;--ubq-typography-button-m-font_family: var( --ubq-typography-font_family, "Inter", sans-serif );--ubq-typography-button-m-weight: normal;--ubq-scale-base: 5px;--ubq-margin-base: 5px;--ubq-margin-xs: 5px;--ubq-margin-s: 10px;--ubq-margin-m: 15px;--ubq-margin-l: 20px;--ubq-border_radius-base: 3.75px;--ubq-border_radius-s: 3.75px;--ubq-border_radius-m: 7.5px;--ubq-border_radius-l: 15px}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import BlockAPI from './BlockAPI';
|
|
2
|
+
import SceneAPI from './SceneAPI';
|
|
3
|
+
import VariableAPI from './VariableAPI';
|
|
4
|
+
import { UserConfiguration } from './types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A headless implementation that just initializes & exposes the Document API
|
|
8
|
+
*/
|
|
9
|
+
export default class CreativeEngine {
|
|
10
|
+
block: BlockAPI;
|
|
11
|
+
|
|
12
|
+
scene: SceneAPI;
|
|
13
|
+
|
|
14
|
+
variable: VariableAPI;
|
|
15
|
+
|
|
16
|
+
private constructor(...args: unknown[]);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Dispose the engine.
|
|
20
|
+
*/
|
|
21
|
+
dispose(): void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Initialize a `CreativeEngine` using the given `canvas` element and an optional config.
|
|
25
|
+
* @param canvas The canvas to use for drawing. Optional, if no canvas is provided,
|
|
26
|
+
* the engine works with an internal offscreen-canvas.
|
|
27
|
+
* @param config A configuration object.
|
|
28
|
+
* @returns An engine instance.
|
|
29
|
+
*/
|
|
30
|
+
static init(
|
|
31
|
+
canvas?: HTMLCanvasElement,
|
|
32
|
+
config?: UserConfiguration
|
|
33
|
+
): Promise<CreativeEngine>;
|
|
34
|
+
}
|