svelte-tweakpane-ui 1.0.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/LICENSE +21 -0
- package/README.md +36 -0
- package/dist/control/ButtonGrid.svelte +49 -0
- package/dist/control/ButtonGrid.svelte.d.ts +190 -0
- package/dist/control/Checkbox.svelte +6 -0
- package/dist/control/Checkbox.svelte.d.ts +113 -0
- package/dist/control/Color.svelte +79 -0
- package/dist/control/Color.svelte.d.ts +177 -0
- package/dist/control/CubicBezier.svelte +74 -0
- package/dist/control/CubicBezier.svelte.d.ts +204 -0
- package/dist/control/Image.svelte +23 -0
- package/dist/control/Image.svelte.d.ts +177 -0
- package/dist/control/IntervalSlider.svelte +37 -0
- package/dist/control/IntervalSlider.svelte.d.ts +196 -0
- package/dist/control/List.svelte +69 -0
- package/dist/control/List.svelte.d.ts +122 -0
- package/dist/control/Point.svelte +100 -0
- package/dist/control/Point.svelte.d.ts +374 -0
- package/dist/control/RadioGrid.svelte +42 -0
- package/dist/control/RadioGrid.svelte.d.ts +231 -0
- package/dist/control/Ring.svelte +19 -0
- package/dist/control/Ring.svelte.d.ts +220 -0
- package/dist/control/RotationEuler.svelte +67 -0
- package/dist/control/RotationEuler.svelte.d.ts +273 -0
- package/dist/control/RotationQuaternion.svelte +65 -0
- package/dist/control/RotationQuaternion.svelte.d.ts +276 -0
- package/dist/control/Slider.svelte +6 -0
- package/dist/control/Slider.svelte.d.ts +165 -0
- package/dist/control/Text.svelte +25 -0
- package/dist/control/Text.svelte.d.ts +129 -0
- package/dist/control/Textarea.svelte +47 -0
- package/dist/control/Textarea.svelte.d.ts +149 -0
- package/dist/control/Wheel.svelte +15 -0
- package/dist/control/Wheel.svelte.d.ts +186 -0
- package/dist/core/Binding.svelte +68 -0
- package/dist/core/Binding.svelte.d.ts +116 -0
- package/dist/core/Blade.svelte +61 -0
- package/dist/core/Blade.svelte.d.ts +90 -0
- package/dist/core/Button.svelte +59 -0
- package/dist/core/Button.svelte.d.ts +65 -0
- package/dist/core/Folder.svelte +69 -0
- package/dist/core/Folder.svelte.d.ts +78 -0
- package/dist/core/Pane.svelte +51 -0
- package/dist/core/Pane.svelte.d.ts +500 -0
- package/dist/core/Separator.svelte +14 -0
- package/dist/core/Separator.svelte.d.ts +85 -0
- package/dist/core/TabGroup.svelte +64 -0
- package/dist/core/TabGroup.svelte.d.ts +72 -0
- package/dist/core/TabPage.svelte +85 -0
- package/dist/core/TabPage.svelte.d.ts +82 -0
- package/dist/extra/AutoObject.svelte +46 -0
- package/dist/extra/AutoObject.svelte.d.ts +108 -0
- package/dist/extra/AutoValue.svelte +11 -0
- package/dist/extra/AutoValue.svelte.d.ts +123 -0
- package/dist/extra/Element.svelte +53 -0
- package/dist/extra/Element.svelte.d.ts +170 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.js +39 -0
- package/dist/internal/ClsPad.svelte +34 -0
- package/dist/internal/ClsPad.svelte.d.ts +95 -0
- package/dist/internal/GenericBinding.svelte +22 -0
- package/dist/internal/GenericBinding.svelte.d.ts +116 -0
- package/dist/internal/GenericBladeFolding.svelte +38 -0
- package/dist/internal/GenericBladeFolding.svelte.d.ts +95 -0
- package/dist/internal/GenericInput.svelte +19 -0
- package/dist/internal/GenericInput.svelte.d.ts +116 -0
- package/dist/internal/GenericInputFolding.svelte +40 -0
- package/dist/internal/GenericInputFolding.svelte.d.ts +140 -0
- package/dist/internal/GenericMonitor.svelte +24 -0
- package/dist/internal/GenericMonitor.svelte.d.ts +139 -0
- package/dist/internal/GenericPane.svelte +100 -0
- package/dist/internal/GenericPane.svelte.d.ts +84 -0
- package/dist/internal/GenericSlider.svelte +27 -0
- package/dist/internal/GenericSlider.svelte.d.ts +146 -0
- package/dist/internal/InternalMonitorBoolean.svelte +17 -0
- package/dist/internal/InternalMonitorBoolean.svelte.d.ts +154 -0
- package/dist/internal/InternalMonitorNumber.svelte +31 -0
- package/dist/internal/InternalMonitorNumber.svelte.d.ts +178 -0
- package/dist/internal/InternalMonitorString.svelte +23 -0
- package/dist/internal/InternalMonitorString.svelte.d.ts +162 -0
- package/dist/internal/InternalPaneDraggable.svelte +368 -0
- package/dist/internal/InternalPaneDraggable.svelte.d.ts +178 -0
- package/dist/internal/InternalPaneFixed.svelte +28 -0
- package/dist/internal/InternalPaneFixed.svelte.d.ts +119 -0
- package/dist/internal/InternalPaneInline.svelte +29 -0
- package/dist/internal/InternalPaneInline.svelte.d.ts +106 -0
- package/dist/monitor/FpsGraph.svelte +86 -0
- package/dist/monitor/FpsGraph.svelte.d.ts +230 -0
- package/dist/monitor/Monitor.svelte +14 -0
- package/dist/monitor/Monitor.svelte.d.ts +526 -0
- package/dist/monitor/Profiler.svelte +72 -0
- package/dist/monitor/Profiler.svelte.d.ts +265 -0
- package/dist/monitor/WaveformMonitor.svelte +26 -0
- package/dist/monitor/WaveformMonitor.svelte.d.ts +176 -0
- package/dist/theme.d.ts +91 -0
- package/dist/theme.js +332 -0
- package/dist/utils.d.ts +157 -0
- package/dist/utils.js +238 -0
- package/package.json +280 -0
package/dist/utils.js
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
// type aliases and utility functions
|
|
2
|
+
// utility functions
|
|
3
|
+
/**
|
|
4
|
+
* For CLS SSR calculation
|
|
5
|
+
*/
|
|
6
|
+
export function rowsForMonitor(buffer = undefined, rows = undefined, graph = undefined) {
|
|
7
|
+
if (graph) {
|
|
8
|
+
return Math.max(rows ?? 3, 3);
|
|
9
|
+
} else if (buffer === undefined && rows === undefined) {
|
|
10
|
+
return 1;
|
|
11
|
+
} else if (buffer === undefined && rows !== undefined) {
|
|
12
|
+
return 1;
|
|
13
|
+
} else if (buffer !== undefined && rows === undefined) {
|
|
14
|
+
return buffer > 1 ? 3 : 1;
|
|
15
|
+
} else if (buffer === 1) {
|
|
16
|
+
return 1;
|
|
17
|
+
} else {
|
|
18
|
+
// both defined
|
|
19
|
+
return rows ?? 1; // TODO
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Fills an array of length `quantity` with a `value`
|
|
24
|
+
*/
|
|
25
|
+
export function fillWith(value, quantity) {
|
|
26
|
+
return [...Array(quantity).fill(value)];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* There's no way to enforce readonly properties in Svelte components, so this is a workaround. See
|
|
30
|
+
* [general approach](https://github.com/sveltejs/svelte/issues/7712#issuecomment-1642470141) and
|
|
31
|
+
* [runtime error approach](https://github.com/sveltejs/svelte/issues/7712#issuecomment-1642817764)
|
|
32
|
+
*
|
|
33
|
+
* Generally:
|
|
34
|
+
* ```svelte
|
|
35
|
+
* <script>
|
|
36
|
+
* export let value = "foo"
|
|
37
|
+
* let _value;
|
|
38
|
+
* // if you want to set init value from outside
|
|
39
|
+
* // uncomment this line:
|
|
40
|
+
* // _value = value;
|
|
41
|
+
* $: value = _value;
|
|
42
|
+
* $: enforceReadonly(_value, value, "value");
|
|
43
|
+
* </script>
|
|
44
|
+
*
|
|
45
|
+
* <input bind:value={_value} />
|
|
46
|
+
*
|
|
47
|
+
* This is not perfect and there are some edge cases it doesn't catch because we have to
|
|
48
|
+
* allow assignment to undefined in some internal cases (via the `allowAssignmentToUndefined` flag).
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export function enforceReadonly(
|
|
52
|
+
internal,
|
|
53
|
+
external,
|
|
54
|
+
componentName,
|
|
55
|
+
propName,
|
|
56
|
+
allowAssignmentToUndefined
|
|
57
|
+
) {
|
|
58
|
+
allowAssignmentToUndefined ??= false;
|
|
59
|
+
if (
|
|
60
|
+
!(
|
|
61
|
+
external === internal ||
|
|
62
|
+
(allowAssignmentToUndefined && internal === undefined && external !== undefined)
|
|
63
|
+
)
|
|
64
|
+
) {
|
|
65
|
+
const componentString = componentName ? `<${componentName}> ` : '';
|
|
66
|
+
const propString = propName ? `property "${propName}" ` : '';
|
|
67
|
+
console.error(
|
|
68
|
+
`Svelte component ${componentString}property ${propString}is intended for readonly use.\nAssigning\n"${external}"\nto\n"${internal}"\nis not allowed.`
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export function isRootPane(container) {
|
|
73
|
+
return container.constructor.name === 'Pane';
|
|
74
|
+
}
|
|
75
|
+
export function clamp(value, min, max) {
|
|
76
|
+
// prioritize min over max
|
|
77
|
+
return Math.min(Math.max(value, min), max);
|
|
78
|
+
}
|
|
79
|
+
export function getElementIndex(element) {
|
|
80
|
+
let index = 0;
|
|
81
|
+
let sibling = element;
|
|
82
|
+
while ((sibling = sibling.previousElementSibling) !== null) {
|
|
83
|
+
index++;
|
|
84
|
+
}
|
|
85
|
+
return index;
|
|
86
|
+
}
|
|
87
|
+
// doesn't create a new object, only works with string keys
|
|
88
|
+
export function removeKeys(obj, ...keys) {
|
|
89
|
+
keys.forEach((key) => {
|
|
90
|
+
if (key in obj) {
|
|
91
|
+
delete obj[key];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return obj;
|
|
95
|
+
}
|
|
96
|
+
function clickBlocker(e) {
|
|
97
|
+
// only block user clicks, not programmatic ones
|
|
98
|
+
console.log(e.detail);
|
|
99
|
+
if (e.isTrusted) e.stopPropagation();
|
|
100
|
+
}
|
|
101
|
+
// used by folder and pane TODO rewrite to use getSwatchButton etc.
|
|
102
|
+
export function updateCollapsibility(isUserExpandableEnabled, element, titleBarClass, iconClass) {
|
|
103
|
+
if (element) {
|
|
104
|
+
const titleBarElement = element.getElementsByClassName(titleBarClass)[0];
|
|
105
|
+
if (titleBarElement !== undefined) {
|
|
106
|
+
const iconElement = iconClass ? element.getElementsByClassName(iconClass)[0] : undefined;
|
|
107
|
+
if (isUserExpandableEnabled) {
|
|
108
|
+
titleBarElement.removeEventListener('click', clickBlocker, { capture: true });
|
|
109
|
+
titleBarElement.style.cursor = 'pointer';
|
|
110
|
+
if (iconElement) iconElement.style.display = 'block';
|
|
111
|
+
} else {
|
|
112
|
+
//expanded = true;
|
|
113
|
+
titleBarElement.addEventListener('click', clickBlocker, { capture: true });
|
|
114
|
+
titleBarElement.style.cursor = 'default';
|
|
115
|
+
if (iconElement) iconElement.style.display = 'none';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
} else {
|
|
119
|
+
console.warn(`Title bar element not found with class "${titleBarClass}"`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Infers grid dimensions for a given number of items, respecting optional maximums for rows and
|
|
124
|
+
* columns.
|
|
125
|
+
*
|
|
126
|
+
* If no constraints are provided, it creates the most square grid possible.
|
|
127
|
+
*
|
|
128
|
+
* If a single constraint is provided, it lets the undefined axis grow / shrink as needed.
|
|
129
|
+
*
|
|
130
|
+
* If both constraints are provided, values may be clipped.
|
|
131
|
+
*/
|
|
132
|
+
export function getGridDimensions(itemCount, maxColumns, maxRows) {
|
|
133
|
+
let rows, columns;
|
|
134
|
+
if (maxColumns && maxRows) {
|
|
135
|
+
// No flexing; items can exceed the available slots
|
|
136
|
+
rows = Math.min(Math.ceil(itemCount / maxColumns), maxRows);
|
|
137
|
+
columns = Math.min(maxColumns, itemCount);
|
|
138
|
+
} else if (maxColumns) {
|
|
139
|
+
// Only maxColumns defined, so rows will flex
|
|
140
|
+
rows = Math.ceil(itemCount / maxColumns);
|
|
141
|
+
columns = maxColumns;
|
|
142
|
+
} else if (maxRows) {
|
|
143
|
+
// Only maxRows defined, so columns will flex
|
|
144
|
+
columns = Math.ceil(itemCount / maxRows);
|
|
145
|
+
rows = maxRows;
|
|
146
|
+
} else {
|
|
147
|
+
// Neither maxColumns nor maxRows defined; create a square grid
|
|
148
|
+
columns = Math.ceil(Math.sqrt(itemCount));
|
|
149
|
+
rows = Math.ceil(itemCount / columns);
|
|
150
|
+
}
|
|
151
|
+
return { columns, rows };
|
|
152
|
+
}
|
|
153
|
+
export function tupleToObject(tuple, keys) {
|
|
154
|
+
const result = {};
|
|
155
|
+
keys.forEach((key, index) => {
|
|
156
|
+
// Assert that the assignment is safe
|
|
157
|
+
result[key] = tuple[index];
|
|
158
|
+
});
|
|
159
|
+
return result;
|
|
160
|
+
}
|
|
161
|
+
export function objectToTuple(obj, keys) {
|
|
162
|
+
return keys.map((key) => obj[key]);
|
|
163
|
+
}
|
|
164
|
+
// tweakpane helpers
|
|
165
|
+
export function pickerIsOpen(blade) {
|
|
166
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
167
|
+
return blade.controller.valueController?.foldable_?.valMap_?.expanded?.value_;
|
|
168
|
+
}
|
|
169
|
+
export function getSwatchButton(blade) {
|
|
170
|
+
const swatch =
|
|
171
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
172
|
+
blade.controller?.valueController?.view?.swatchElement?.querySelector('button') ??
|
|
173
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
174
|
+
blade.controller?.valueController?.view?.buttonElement;
|
|
175
|
+
return swatch;
|
|
176
|
+
}
|
|
177
|
+
// utility functions
|
|
178
|
+
function quaternionToCssTransform(quaternion) {
|
|
179
|
+
const [x, y, z, w] = Array.isArray(quaternion)
|
|
180
|
+
? quaternion
|
|
181
|
+
: [quaternion.x, quaternion.y, quaternion.z, quaternion.w];
|
|
182
|
+
const m11 = 1 - 2 * y * y - 2 * z * z;
|
|
183
|
+
const m12 = 2 * x * y - 2 * z * w;
|
|
184
|
+
const m13 = 2 * x * z + 2 * y * w;
|
|
185
|
+
const m21 = 2 * x * y + 2 * z * w;
|
|
186
|
+
const m22 = 1 - 2 * x * x - 2 * z * z;
|
|
187
|
+
const m23 = 2 * y * z - 2 * x * w;
|
|
188
|
+
const m31 = 2 * x * z - 2 * y * w;
|
|
189
|
+
const m32 = 2 * y * z + 2 * x * w;
|
|
190
|
+
const m33 = 1 - 2 * x * x - 2 * y * y;
|
|
191
|
+
return `matrix3d(
|
|
192
|
+
${m11}, ${m12}, ${m13}, 0,
|
|
193
|
+
${m21}, ${m22}, ${m23}, 0,
|
|
194
|
+
${m31}, ${m32}, ${m33}, 0,
|
|
195
|
+
0, 0, 0, 1
|
|
196
|
+
)`;
|
|
197
|
+
}
|
|
198
|
+
function eulerToCssTransform(
|
|
199
|
+
rotation,
|
|
200
|
+
units = 'rad' // rad is component default
|
|
201
|
+
) {
|
|
202
|
+
const [x, y, z] = Array.isArray(rotation) ? rotation : [rotation.x, rotation.y, rotation.z];
|
|
203
|
+
// note negative z
|
|
204
|
+
return `rotateX(${x}${units}) rotateY(${y}${units}) rotateZ(${-z}${units})`;
|
|
205
|
+
}
|
|
206
|
+
function cubicBezierToEaseFunction(cubicBezier) {
|
|
207
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
208
|
+
const [x1, y1, x2, y2] = Array.isArray(cubicBezier)
|
|
209
|
+
? cubicBezier
|
|
210
|
+
: [cubicBezier.x1, cubicBezier.y1, cubicBezier.x2, cubicBezier.y2];
|
|
211
|
+
return (t) => {
|
|
212
|
+
return (1 - t) ** 3 * 0 + (1 - t) ** 2 * t * 3 * y1 + (1 - t) * t ** 2 * 3 * y2 + t ** 3 * 1;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
// library exports
|
|
216
|
+
export default {
|
|
217
|
+
/**
|
|
218
|
+
* Convenience function for creating easing functions ready for Svelte's tween and animation
|
|
219
|
+
* systems
|
|
220
|
+
* @param cubicBezier - `CubicBezierValue`, probably from a `<CubicBezier>` component
|
|
221
|
+
* @returns Tween function
|
|
222
|
+
*/
|
|
223
|
+
cubicBezierToEaseFunction,
|
|
224
|
+
/**
|
|
225
|
+
* Convenience function for creating CSS-ready euler rotation transforms
|
|
226
|
+
* @param rotation - `RotationEulerValue`, probably from a `<RotationEuler>` component
|
|
227
|
+
* @param quaternion
|
|
228
|
+
* @returns CSS rotateX/Y/Z string ready to be passed into a CSS transform
|
|
229
|
+
*/
|
|
230
|
+
eulerToCssTransform,
|
|
231
|
+
/**
|
|
232
|
+
* Convenience function for creating CSS-ready quaternion rotation transforms
|
|
233
|
+
* @param rotation - RotationQuaternionValue, probably from a <RotationQuaternionValue>
|
|
234
|
+
* component
|
|
235
|
+
* @returns CSS matrix3d string ready to be passed into a CSS transform
|
|
236
|
+
*/
|
|
237
|
+
quaternionToCssTransform
|
|
238
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "svelte-tweakpane-ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/kitschpatrol/svelte-tweakpane-ui"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https:///kitschpatrol.com/svelte-tweakpane-ui",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/kitschpatrol/svelte-tweakpane-ui/issues",
|
|
12
|
+
"email": "eric@ericmika.com"
|
|
13
|
+
},
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Eric Mika",
|
|
16
|
+
"email": "eric@ericmika.com",
|
|
17
|
+
"url": "https://ericmika.com"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18.0.0",
|
|
22
|
+
"pnpm": ">=8.0.0"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"svelte": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./ButtonGrid.svelte": {
|
|
30
|
+
"types": "./dist/control/ButtonGrid.svelte.d.ts",
|
|
31
|
+
"svelte": "./dist/control/ButtonGrid.svelte"
|
|
32
|
+
},
|
|
33
|
+
"./Checkbox.svelte": {
|
|
34
|
+
"types": "./dist/control/Checkbox.svelte.d.ts",
|
|
35
|
+
"svelte": "./dist/control/Checkbox.svelte"
|
|
36
|
+
},
|
|
37
|
+
"./Color.svelte": {
|
|
38
|
+
"types": "./dist/control/Color.svelte.d.ts",
|
|
39
|
+
"svelte": "./dist/control/Color.svelte"
|
|
40
|
+
},
|
|
41
|
+
"./CubicBezier.svelte": {
|
|
42
|
+
"types": "./dist/control/CubicBezier.svelte.d.ts",
|
|
43
|
+
"svelte": "./dist/control/CubicBezier.svelte"
|
|
44
|
+
},
|
|
45
|
+
"./Image.svelte": {
|
|
46
|
+
"types": "./dist/control/Image.svelte.d.ts",
|
|
47
|
+
"svelte": "./dist/control/Image.svelte"
|
|
48
|
+
},
|
|
49
|
+
"./IntervalSlider.svelte": {
|
|
50
|
+
"types": "./dist/control/IntervalSlider.svelte.d.ts",
|
|
51
|
+
"svelte": "./dist/control/IntervalSlider.svelte"
|
|
52
|
+
},
|
|
53
|
+
"./List.svelte": {
|
|
54
|
+
"types": "./dist/control/List.svelte.d.ts",
|
|
55
|
+
"svelte": "./dist/control/List.svelte"
|
|
56
|
+
},
|
|
57
|
+
"./Point.svelte": {
|
|
58
|
+
"types": "./dist/control/Point.svelte.d.ts",
|
|
59
|
+
"svelte": "./dist/control/Point.svelte"
|
|
60
|
+
},
|
|
61
|
+
"./RadioGrid.svelte": {
|
|
62
|
+
"types": "./dist/control/RadioGrid.svelte.d.ts",
|
|
63
|
+
"svelte": "./dist/control/RadioGrid.svelte"
|
|
64
|
+
},
|
|
65
|
+
"./Ring.svelte": {
|
|
66
|
+
"types": "./dist/control/Ring.svelte.d.ts",
|
|
67
|
+
"svelte": "./dist/control/Ring.svelte"
|
|
68
|
+
},
|
|
69
|
+
"./RotationEuler.svelte": {
|
|
70
|
+
"types": "./dist/control/RotationEuler.svelte.d.ts",
|
|
71
|
+
"svelte": "./dist/control/RotationEuler.svelte"
|
|
72
|
+
},
|
|
73
|
+
"./RotationQuaternion.svelte": {
|
|
74
|
+
"types": "./dist/control/RotationQuaternion.svelte.d.ts",
|
|
75
|
+
"svelte": "./dist/control/RotationQuaternion.svelte"
|
|
76
|
+
},
|
|
77
|
+
"./Slider.svelte": {
|
|
78
|
+
"types": "./dist/control/Slider.svelte.d.ts",
|
|
79
|
+
"svelte": "./dist/control/Slider.svelte"
|
|
80
|
+
},
|
|
81
|
+
"./Text.svelte": {
|
|
82
|
+
"types": "./dist/control/Text.svelte.d.ts",
|
|
83
|
+
"svelte": "./dist/control/Text.svelte"
|
|
84
|
+
},
|
|
85
|
+
"./Textarea.svelte": {
|
|
86
|
+
"types": "./dist/control/Textarea.svelte.d.ts",
|
|
87
|
+
"svelte": "./dist/control/Textarea.svelte"
|
|
88
|
+
},
|
|
89
|
+
"./Wheel.svelte": {
|
|
90
|
+
"types": "./dist/control/Wheel.svelte.d.ts",
|
|
91
|
+
"svelte": "./dist/control/Wheel.svelte"
|
|
92
|
+
},
|
|
93
|
+
"./Binding.svelte": {
|
|
94
|
+
"types": "./dist/core/Binding.svelte.d.ts",
|
|
95
|
+
"svelte": "./dist/core/Binding.svelte"
|
|
96
|
+
},
|
|
97
|
+
"./Blade.svelte": {
|
|
98
|
+
"types": "./dist/core/Blade.svelte.d.ts",
|
|
99
|
+
"svelte": "./dist/core/Blade.svelte"
|
|
100
|
+
},
|
|
101
|
+
"./Button.svelte": {
|
|
102
|
+
"types": "./dist/core/Button.svelte.d.ts",
|
|
103
|
+
"svelte": "./dist/core/Button.svelte"
|
|
104
|
+
},
|
|
105
|
+
"./Folder.svelte": {
|
|
106
|
+
"types": "./dist/core/Folder.svelte.d.ts",
|
|
107
|
+
"svelte": "./dist/core/Folder.svelte"
|
|
108
|
+
},
|
|
109
|
+
"./Pane.svelte": {
|
|
110
|
+
"types": "./dist/core/Pane.svelte.d.ts",
|
|
111
|
+
"svelte": "./dist/core/Pane.svelte"
|
|
112
|
+
},
|
|
113
|
+
"./Separator.svelte": {
|
|
114
|
+
"types": "./dist/core/Separator.svelte.d.ts",
|
|
115
|
+
"svelte": "./dist/core/Separator.svelte"
|
|
116
|
+
},
|
|
117
|
+
"./TabGroup.svelte": {
|
|
118
|
+
"types": "./dist/core/TabGroup.svelte.d.ts",
|
|
119
|
+
"svelte": "./dist/core/TabGroup.svelte"
|
|
120
|
+
},
|
|
121
|
+
"./TabPage.svelte": {
|
|
122
|
+
"types": "./dist/core/TabPage.svelte.d.ts",
|
|
123
|
+
"svelte": "./dist/core/TabPage.svelte"
|
|
124
|
+
},
|
|
125
|
+
"./AutoObject.svelte": {
|
|
126
|
+
"types": "./dist/extra/AutoObject.svelte.d.ts",
|
|
127
|
+
"svelte": "./dist/extra/AutoObject.svelte"
|
|
128
|
+
},
|
|
129
|
+
"./AutoValue.svelte": {
|
|
130
|
+
"types": "./dist/extra/AutoValue.svelte.d.ts",
|
|
131
|
+
"svelte": "./dist/extra/AutoValue.svelte"
|
|
132
|
+
},
|
|
133
|
+
"./Element.svelte": {
|
|
134
|
+
"types": "./dist/extra/Element.svelte.d.ts",
|
|
135
|
+
"svelte": "./dist/extra/Element.svelte"
|
|
136
|
+
},
|
|
137
|
+
"./FpsGraph.svelte": {
|
|
138
|
+
"types": "./dist/monitor/FpsGraph.svelte.d.ts",
|
|
139
|
+
"svelte": "./dist/monitor/FpsGraph.svelte"
|
|
140
|
+
},
|
|
141
|
+
"./Monitor.svelte": {
|
|
142
|
+
"types": "./dist/monitor/Monitor.svelte.d.ts",
|
|
143
|
+
"svelte": "./dist/monitor/Monitor.svelte"
|
|
144
|
+
},
|
|
145
|
+
"./Profiler.svelte": {
|
|
146
|
+
"types": "./dist/monitor/Profiler.svelte.d.ts",
|
|
147
|
+
"svelte": "./dist/monitor/Profiler.svelte"
|
|
148
|
+
},
|
|
149
|
+
"./WaveformMonitor.svelte": {
|
|
150
|
+
"types": "./dist/monitor/WaveformMonitor.svelte.d.ts",
|
|
151
|
+
"svelte": "./dist/monitor/WaveformMonitor.svelte"
|
|
152
|
+
},
|
|
153
|
+
"./ThemeUtils.js": {
|
|
154
|
+
"types": "./dist/theme.d.ts",
|
|
155
|
+
"default": "./dist/theme.js"
|
|
156
|
+
},
|
|
157
|
+
"./Utils.js": {
|
|
158
|
+
"types": "./dist/utils.d.ts",
|
|
159
|
+
"default": "./dist/utils.js"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"types": "./dist/index.d.ts",
|
|
163
|
+
"files": [
|
|
164
|
+
"./dist"
|
|
165
|
+
],
|
|
166
|
+
"keywords": [
|
|
167
|
+
"components",
|
|
168
|
+
"ui",
|
|
169
|
+
"tweaks",
|
|
170
|
+
"parameters",
|
|
171
|
+
"gui",
|
|
172
|
+
"component",
|
|
173
|
+
"svelte",
|
|
174
|
+
"sveltekit",
|
|
175
|
+
"tweakpane",
|
|
176
|
+
"svelte-ui",
|
|
177
|
+
"component-library",
|
|
178
|
+
"ui-components",
|
|
179
|
+
"ui-framework",
|
|
180
|
+
"components-library"
|
|
181
|
+
],
|
|
182
|
+
"peerDependencies": {
|
|
183
|
+
"svelte": "^4.0.0"
|
|
184
|
+
},
|
|
185
|
+
"dependencies": {
|
|
186
|
+
"@0b5vr/tweakpane-plugin-profiler": "^0.4.1",
|
|
187
|
+
"@0b5vr/tweakpane-plugin-rotation": "^0.2.0",
|
|
188
|
+
"@kitschpatrol/tweakpane-image-plugin": "^2.0.0",
|
|
189
|
+
"@kitschpatrol/tweakpane-textarea-plugin": "^2.0.1",
|
|
190
|
+
"@tweakpane/core": "^2.0.1",
|
|
191
|
+
"@tweakpane/plugin-camerakit": "^0.3.0",
|
|
192
|
+
"@tweakpane/plugin-essentials": "^0.2.0",
|
|
193
|
+
"esm-env": "^1.0.0",
|
|
194
|
+
"nanoid": "^5.0.3",
|
|
195
|
+
"svelte-local-storage-store": "^0.6.4",
|
|
196
|
+
"tweakpane": "^4.0.1",
|
|
197
|
+
"tweakpane-plugin-waveform": "^1.0.0"
|
|
198
|
+
},
|
|
199
|
+
"devDependencies": {
|
|
200
|
+
"@phenomnomnominal/tsquery": "^6.1.3",
|
|
201
|
+
"@stkb/rewrap": "^0.1.0",
|
|
202
|
+
"@sveltejs/adapter-static": "^2.0.3",
|
|
203
|
+
"@sveltejs/kit": "^1.27.6",
|
|
204
|
+
"@sveltejs/package": "^2.2.3",
|
|
205
|
+
"@types/eslint": "^8.44.8",
|
|
206
|
+
"@types/fs-extra": "^11.0.4",
|
|
207
|
+
"@types/node": "^20.10.2",
|
|
208
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
209
|
+
"@typescript-eslint/parser": "^6.13.1",
|
|
210
|
+
"cspell": "^8.1.0",
|
|
211
|
+
"eslint": "^8.55.0",
|
|
212
|
+
"eslint-config-prettier": "^9.0.0",
|
|
213
|
+
"eslint-plugin-perfectionist": "^2.5.0",
|
|
214
|
+
"eslint-plugin-svelte": "^2.35.1",
|
|
215
|
+
"fs-extra": "^11.2.0",
|
|
216
|
+
"glob": "^10.3.10",
|
|
217
|
+
"markdownlint": "^0.32.1",
|
|
218
|
+
"markdownlint-cli": "^0.37.0",
|
|
219
|
+
"npm-run-all": "^4.1.5",
|
|
220
|
+
"postcss-html": "^1.5.0",
|
|
221
|
+
"prettier": "^3.1.0",
|
|
222
|
+
"prettier-plugin-astro": "^0.12.2",
|
|
223
|
+
"prettier-plugin-pkg": "^0.18.0",
|
|
224
|
+
"prettier-plugin-svelte": "^3.1.2",
|
|
225
|
+
"publint": "^0.2.6",
|
|
226
|
+
"stylelint": "^15.11.0",
|
|
227
|
+
"stylelint-config-clean-order": "^5.2.0",
|
|
228
|
+
"stylelint-config-html": "^1.1.0",
|
|
229
|
+
"stylelint-config-standard": "^34.0.0",
|
|
230
|
+
"svelte": "^4.2.8",
|
|
231
|
+
"svelte-check": "^3.6.2",
|
|
232
|
+
"svelte-language-server": "^0.16.1",
|
|
233
|
+
"svelte2tsx": "^0.6.27",
|
|
234
|
+
"ts-morph": "^20.0.0",
|
|
235
|
+
"tslib": "^2.6.2",
|
|
236
|
+
"tsx": "^4.6.1",
|
|
237
|
+
"typescript": "^5.3.2",
|
|
238
|
+
"vite": "^4.5.0",
|
|
239
|
+
"yaml": "^2.3.4"
|
|
240
|
+
},
|
|
241
|
+
"scripts": {
|
|
242
|
+
"build": "run-s --print-label build:*",
|
|
243
|
+
"build:01-sync": "pnpm run check",
|
|
244
|
+
"build:02-exports": "tsx ./scripts/generate-exports.ts",
|
|
245
|
+
"build:03-add-source-links": "tsx ./scripts/add-source-links.ts",
|
|
246
|
+
"build:04-format": "pnpm run format",
|
|
247
|
+
"build:05-package": "svelte-package && publint",
|
|
248
|
+
"build:06-heal-dts-comments": "tsx ./scripts/heal-dts-comments.ts",
|
|
249
|
+
"build:07-strip-component-docs": "tsx ./scripts/strip-component-docs.ts",
|
|
250
|
+
"build:08-format-library": "prettier --ignore-path --plugin prettier-plugin-svelte --write ./dist",
|
|
251
|
+
"build:09-doc-data": "tsx ./scripts/generate-doc-data.ts",
|
|
252
|
+
"build:10-examples-to-kit": "tsx ./scripts/generate-kit-examples.ts",
|
|
253
|
+
"build:11-examples-to-docs": "tsx ./scripts/generate-example-components.ts",
|
|
254
|
+
"build:12-acknowledgments-data": "mkdir -p ./docs/src/content/acknowledgments && pnpm licenses list --json > ./docs/src/content/acknowledgments/acknowledgments-lib.json",
|
|
255
|
+
"build:13-build-docs": "pnpm run docs-build",
|
|
256
|
+
"check": "svelte-kit sync && svelte-check --ignore ./scratch --tsconfig ./tsconfig.json",
|
|
257
|
+
"check-watch": "svelte-kit sync && svelte-check --ignore ./scratch --tsconfig ./tsconfig.json --watch",
|
|
258
|
+
"clean": "git clean -fdX",
|
|
259
|
+
"docs-build": "pnpm -C ./docs run build",
|
|
260
|
+
"docs-dev": "pnpm -C ./docs run dev",
|
|
261
|
+
"docs-preview": "pnpm -C ./docs run preview",
|
|
262
|
+
"format": "run-s --print-label format:*",
|
|
263
|
+
"format:1-eslint": "eslint --fix ./src ./scripts ./docs/src",
|
|
264
|
+
"format:2-stylelint": "stylelint --fix './src/**/*.{css,svelte,html}'",
|
|
265
|
+
"format:3-rewrap": "rewrap -i --column 100 `find src \\( -name '*.svelte' -o -name '*.ts' -o -name '*.html' \\) -type f | grep -v src/examples`",
|
|
266
|
+
"format:4-prettier": "prettier --plugin=prettier-plugin-svelte --plugin=prettier-plugin-astro --write .",
|
|
267
|
+
"format:5-embedded": "tsx ./scripts/format-embedded-code.ts",
|
|
268
|
+
"kit-build": "pnpm run kit-examples && vite build",
|
|
269
|
+
"kit-dev": " pnpm run kit-examples && vite dev",
|
|
270
|
+
"kit-examples": "tsx ./scripts/generate-kit-examples.ts",
|
|
271
|
+
"kit-preview": "vite preview",
|
|
272
|
+
"lint": "run-p --print-label lint:*",
|
|
273
|
+
"lint:eslint": "eslint ./src ./scripts ./docs/src",
|
|
274
|
+
"lint:markdown": "markdownlint **/*.{md,mdx} --ignore node_modules",
|
|
275
|
+
"lint:prettier": "prettier --plugin=prettier-plugin-svelte --plugin=prettier-plugin-astro --check .",
|
|
276
|
+
"lint:spelling": "cspell --quiet .",
|
|
277
|
+
"lint:stylelint": "stylelint './src/**/*.{css,svelte,html}'",
|
|
278
|
+
"lint:typescript": "tsc --noEmit"
|
|
279
|
+
}
|
|
280
|
+
}
|