@weasel-js/labkit 1.5.0 → 1.5.2
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 +41 -4
- package/dist/_dts/{CanvasStackContext-CqkxkFJW.d.ts → CanvasStackContext-CMMo180l.d.ts} +1 -1
- package/dist/_dts/{PrefsForm.d-DDHFANkc.d.ts → PrefsForm.d-DPy9I8It.d.ts} +4 -0
- package/dist/_dts/Select.d-ZTiwzYyT.d.ts +479 -0
- package/dist/_dts/{frac-8R6UmlvN.d.ts → frac-B4hFJMiN.d.ts} +54 -6
- package/dist/_dts/{index-retnAut7.d.ts → index-8LiKe3A-.d.ts} +77 -10
- package/dist/_dts/{index-B8uu2ba7.d.ts → index-DlKolEIZ.d.ts} +20 -8
- package/dist/_dts/{types-Ca2LCnPq.d.ts → types-Db-3NNk1.d.ts} +28 -4
- package/dist/_dts/{usePanZoom-nS798rOF.d.ts → usePanZoom-SSTZe410.d.ts} +4 -47
- package/dist/_dts/{useTrialState-jcx_TdU6.d.ts → useTrialState-pnAE-UBD.d.ts} +1 -1
- package/dist/canvas/index.d.ts +5 -5
- package/dist/canvas/index.js +1 -1
- package/dist/chrome/index.d.ts +4 -4
- package/dist/chrome/index.js +7 -7
- package/dist/chunk-6BUQ77ZV.js +18 -0
- package/dist/chunk-6BUQ77ZV.js.map +1 -0
- package/dist/{chunk-KJALCDWE.js → chunk-753Y6HE6.js} +9 -9
- package/dist/chunk-753Y6HE6.js.map +1 -0
- package/dist/{chunk-6ZDGOZQV.js → chunk-A2ACAGW6.js} +72 -20
- package/dist/chunk-A2ACAGW6.js.map +1 -0
- package/dist/{chunk-NS64DXMN.js → chunk-CKUKF72R.js} +44 -21
- package/dist/chunk-CKUKF72R.js.map +1 -0
- package/dist/{chunk-MUKOW3TC.js → chunk-D35PFTS7.js} +4 -4
- package/dist/{chunk-MUKOW3TC.js.map → chunk-D35PFTS7.js.map} +1 -1
- package/dist/{chunk-UU3NJO6N.js → chunk-EMXAIRUJ.js} +3 -3
- package/dist/{chunk-UU3NJO6N.js.map → chunk-EMXAIRUJ.js.map} +1 -1
- package/dist/{chunk-ZPH5WTWF.js → chunk-ERFMC6WU.js} +142 -66
- package/dist/chunk-ERFMC6WU.js.map +1 -0
- package/dist/chunk-FKLT3ITC.js +590 -0
- package/dist/chunk-FKLT3ITC.js.map +1 -0
- package/dist/{chunk-QLSV2N3G.js → chunk-IJJUK4FU.js} +25 -13
- package/dist/chunk-IJJUK4FU.js.map +1 -0
- package/dist/{chunk-EKIICY6X.js → chunk-KJCUERQF.js} +37 -25
- package/dist/chunk-KJCUERQF.js.map +1 -0
- package/dist/chunk-LASCBWW7.js +13456 -0
- package/dist/chunk-LASCBWW7.js.map +1 -0
- package/dist/{chunk-67SJLMC7.js → chunk-LRI3MBGR.js} +45 -12
- package/dist/chunk-LRI3MBGR.js.map +1 -0
- package/dist/chunk-REOBGYMC.js +150 -0
- package/dist/chunk-REOBGYMC.js.map +1 -0
- package/dist/{chunk-PGETSEDK.js → chunk-TT5C5S6R.js} +11 -90
- package/dist/chunk-TT5C5S6R.js.map +1 -0
- package/dist/{chunk-NDRYLVOW.js → chunk-Z76KEZAX.js} +2 -2
- package/dist/chunk-Z76KEZAX.js.map +1 -0
- package/dist/config/index.d.ts +62 -19
- package/dist/config/index.js +6 -4
- package/dist/controls/index.d.ts +3 -3
- package/dist/controls/index.js +4 -4
- package/dist/dragdrop/index.d.ts +3 -3
- package/dist/index.d.ts +230 -62
- package/dist/index.js +1367 -1698
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +4 -4
- package/dist/layers/index.js +2 -2
- package/dist/loupe/index.d.ts +67 -16
- package/dist/loupe/index.js +1 -1
- package/dist/passthrough/weasel-ui.d.ts +57 -230
- package/dist/passthrough/weasel-ui.js +1 -1
- package/dist/primitives/index.d.ts +3 -1
- package/dist/primitives/index.js +3 -3
- package/dist/state/index.d.ts +5 -5
- package/dist/state/index.js +5 -3
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +266 -57
- package/dist/surface/index.js +1 -1
- package/dist/ui/layers/index.js +1 -1
- package/dist/undo/index.d.ts +3 -3
- package/package.json +9 -9
- package/src/annotations/AnnotationOverlay.tsx +3 -0
- package/src/annotations/Annotations.less +4 -0
- package/src/annotations/Annotations.overlay.test.tsx +20 -0
- package/src/annotations/svgNodes.ts +1 -0
- package/src/annotations/toolMap.test.ts +9 -5
- package/src/annotations/toolMap.ts +3 -0
- package/src/canvas/CanvasStack.stories.tsx +1 -1
- package/src/canvas/index.ts +0 -9
- package/src/canvas/usePanZoom.test.ts +28 -0
- package/src/canvas/usePanZoom.ts +11 -4
- package/src/chrome/ChromeRegions.stories.tsx +1 -1
- package/src/chrome/LabChrome.tsx +21 -5
- package/src/chrome/builtins.test.ts +1 -0
- package/src/chrome/builtins.tsx +1 -0
- package/src/chrome/index.ts +1 -0
- package/src/chrome/labTypes.ts +3 -3
- package/src/chrome/regions/PaletteRegion.test.tsx +18 -0
- package/src/chrome/regions/PaletteRegion.tsx +6 -10
- package/src/chrome/regions/SidebarRegion.stories.tsx +44 -0
- package/src/chrome/regions/TitleBarRegion.tsx +1 -1
- package/src/chrome/regions/ToolbarRegion.tsx +11 -7
- package/src/chrome/types.ts +11 -2
- package/src/config/auto.test.ts +12 -0
- package/src/config/auto.ts +15 -0
- package/src/config/autoConfig.test.ts +107 -0
- package/src/config/autoConfig.ts +153 -0
- package/src/config/builder.test.ts +38 -0
- package/src/config/builder.ts +55 -11
- package/src/config/index.ts +3 -0
- package/src/config/path.ts +7 -2
- package/src/config/resolve.test.ts +25 -0
- package/src/config/resolve.ts +17 -1
- package/src/config/types.ts +32 -2
- package/src/config/useResolvedConfig.ts +26 -0
- package/src/controls/AutoControls.stories.tsx +88 -0
- package/src/controls/ControlPanel.less +23 -0
- package/src/controls/ControlPanel.stories.tsx +83 -1
- package/src/controls/ControlPanel.test.tsx +457 -4
- package/src/controls/ControlPanel.tsx +534 -73
- package/src/index.test.ts +0 -2
- package/src/index.ts +33 -11
- package/src/instrument/serializers.ts +29 -1
- package/src/lab/Lab.chrome.test.tsx +16 -0
- package/src/lab/Lab.stories.tsx +1 -1
- package/src/lab/Lab.surface.test.tsx +7 -2
- package/src/lab/Lab.test.tsx +79 -1
- package/src/lab/Lab.tsx +124 -16
- package/src/lab/LabContext.ts +8 -0
- package/src/lab/LabFit.stories.tsx +4 -4
- package/src/lab/LabFullChrome.stories.tsx +1 -1
- package/src/lab/LabHeader.tsx +0 -1
- package/src/lab/LabRoot.test.tsx +56 -0
- package/src/lab/LabRoot.tsx +47 -0
- package/src/lab/LabShell.less +24 -3
- package/src/lab/LabShell.stories.tsx +50 -1
- package/src/lab/LabShell.tsx +18 -27
- package/src/lab/LabSwitcher.less +10 -10
- package/src/lab/LabSwitcher.test.tsx +14 -9
- package/src/lab/LabSwitcher.tsx +8 -4
- package/src/lab/Workspace.less +1 -1
- package/src/lab/Workspace.stories.tsx +1 -1
- package/src/lab/Workspace.surface.test.tsx +1 -1
- package/src/lab/index.ts +2 -0
- package/src/layers/LayerList.less +1 -1
- package/src/layers/LayerList.stories.tsx +2 -2
- package/src/loupe/AGENTS.md +16 -4
- package/src/loupe/LoupeGestures.tsx +67 -0
- package/src/loupe/TrialLoupe.tsx +43 -28
- package/src/loupe/index.ts +4 -0
- package/src/loupe/loupeActions.ts +98 -0
- package/src/loupe/useLoupe.test.tsx +59 -2
- package/src/loupe/useLoupe.ts +28 -48
- package/src/passthrough/weasel-ui.ts +3 -3
- package/src/primitives/FloatingPanel.stories.tsx +1 -1
- package/src/primitives/FpsMeter.less +6 -1
- package/src/primitives/FpsMeter.stories.tsx +1 -1
- package/src/primitives/FpsMeter.test.tsx +12 -4
- package/src/primitives/FpsMeter.tsx +6 -1
- package/src/primitives/JobProgress.stories.tsx +2 -2
- package/src/primitives/Legend.stories.tsx +1 -1
- package/src/primitives/ScaleIndicator.stories.tsx +1 -1
- package/src/primitives/Sidebar.less +7 -0
- package/src/primitives/Sidebar.stories.tsx +1 -1
- package/src/primitives/Split.test.tsx +25 -0
- package/src/primitives/Split.tsx +36 -20
- package/src/primitives/StatusBar.less +6 -0
- package/src/primitives/StatusBar.stories.tsx +1 -1
- package/src/primitives/Toolbar.stories.tsx +1 -1
- package/src/specimen/Specimen.less +95 -0
- package/src/specimen/Specimen.stories.tsx +13 -0
- package/src/specimen/Specimen.test.tsx +13 -0
- package/src/specimen/Specimen.tsx +888 -0
- package/src/state/Persistence.stories.tsx +4 -4
- package/src/state/store.test.ts +65 -0
- package/src/state/store.ts +32 -8
- package/src/state/types.ts +31 -2
- package/src/state/useTrialState.test.tsx +85 -0
- package/src/state/useTrialState.ts +9 -1
- package/src/state/view.test.ts +4 -4
- package/src/styles.less +1 -0
- package/src/surface/index.ts +1 -1
- package/src/surface/useSurfaceTile.test.tsx +1 -1
- package/src/surface/useTiledSurface.test.tsx +65 -10
- package/src/surface/useTiledSurface.ts +23 -11
- package/src/theme/Interstellar.stories.tsx +2 -2
- package/src/theme/interstellar.test.ts +16 -5
- package/src/theme/interstellar.theme.json +180 -0
- package/src/theme/interstellar.ts +8 -5
- package/src/tools/labTool.ts +3 -3
- package/src/trial/Trial.annotations.test.tsx +13 -4
- package/src/trial/Trial.canvas.test.tsx +36 -0
- package/src/trial/Trial.config.test.tsx +75 -2
- package/src/trial/Trial.less +4 -0
- package/src/trial/Trial.stories.tsx +4 -1
- package/src/trial/Trial.test.tsx +3 -0
- package/src/trial/Trial.tsx +21 -14
- package/src/trial/TrialChrome.tsx +17 -3
- package/src/trial/trialOps.test.ts +101 -1
- package/src/trial/trialOps.ts +62 -4
- package/dist/_dts/ToggleBar.d-DbHoWKIA.d.ts +0 -116
- package/dist/chunk-67SJLMC7.js.map +0 -1
- package/dist/chunk-6ZDGOZQV.js.map +0 -1
- package/dist/chunk-E44SU6XS.js +0 -50
- package/dist/chunk-E44SU6XS.js.map +0 -1
- package/dist/chunk-EKIICY6X.js.map +0 -1
- package/dist/chunk-KJALCDWE.js.map +0 -1
- package/dist/chunk-NDRYLVOW.js.map +0 -1
- package/dist/chunk-NS64DXMN.js.map +0 -1
- package/dist/chunk-PGETSEDK.js.map +0 -1
- package/dist/chunk-QLSV2N3G.js.map +0 -1
- package/dist/chunk-S2SHZRD7.js +0 -7681
- package/dist/chunk-S2SHZRD7.js.map +0 -1
- package/dist/chunk-TQBBYTAF.js +0 -280
- package/dist/chunk-TQBBYTAF.js.map +0 -1
- package/dist/chunk-ZPH5WTWF.js.map +0 -1
- package/src/canvas/useOrbit.test.ts +0 -167
- package/src/canvas/useOrbit.ts +0 -156
- package/src/theme/interstellar.tokens.json +0 -61
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@weasel-js/forge';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { applyConfigWrite } from '../config/autoConfig';
|
|
4
|
+
import { f } from '../config/builder';
|
|
5
|
+
import { resolveConfigSchema } from '../config/resolve';
|
|
6
|
+
import { ControlPanel } from './ControlPanel';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The ghosting and the muted accent are CSS, and jsdom resolves neither
|
|
10
|
+
* `var()` nor `color-mix()`. This story is the only place they can be checked.
|
|
11
|
+
*/
|
|
12
|
+
const meta: Meta<typeof ControlPanel> = {
|
|
13
|
+
title: 'labkit/Controls/AutoControls',
|
|
14
|
+
component: ControlPanel,
|
|
15
|
+
parameters: { layout: 'padded' },
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
|
|
19
|
+
type Story = StoryObj<typeof ControlPanel>;
|
|
20
|
+
|
|
21
|
+
const schema = f.schema({
|
|
22
|
+
width: f.number(432).range(64, 1024).label('Width'),
|
|
23
|
+
gap: f
|
|
24
|
+
.number(12)
|
|
25
|
+
.range(0, 48)
|
|
26
|
+
.suffix('px')
|
|
27
|
+
.auto((c) => Math.round((c.width as number) / 24))
|
|
28
|
+
.label('Gap'),
|
|
29
|
+
cols: f.number(3).range(1, 12).label('Columns'),
|
|
30
|
+
wave: f.enum('sine', ['sine', 'square', 'triangle']).label('Wave'),
|
|
31
|
+
mode: f.enum('fit', ['fit', 'fill']).radio().label('Mode'),
|
|
32
|
+
showGrid: f.boolean(true).label('Show grid'),
|
|
33
|
+
title: f.string('My experiment').placeholder('Title…').label('Title'),
|
|
34
|
+
tint: f.color('#3a86ff').label('Tint'),
|
|
35
|
+
seed: f.number(1).range(0, 99).manual().label('Seed'),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const resolved = resolveConfigSchema(schema, []);
|
|
39
|
+
|
|
40
|
+
/** Every path the panel will draw as auto, except the `.manual()` one. */
|
|
41
|
+
const EVERY_AUTO = ['gap', 'cols', 'wave', 'mode', 'showGrid', 'title', 'tint'];
|
|
42
|
+
|
|
43
|
+
function Panel({ start }: { start: readonly string[] }) {
|
|
44
|
+
const [state, setState] = useState(() => ({
|
|
45
|
+
config: schema.defaults() as Record<string, unknown>,
|
|
46
|
+
autoPaths: start,
|
|
47
|
+
}));
|
|
48
|
+
return (
|
|
49
|
+
<ControlPanel
|
|
50
|
+
schema={resolved}
|
|
51
|
+
config={state.config}
|
|
52
|
+
auto={new Set(state.autoPaths)}
|
|
53
|
+
setConfig={(path, value) =>
|
|
54
|
+
setState((prev) => applyConfigWrite(prev.config, prev.autoPaths, path, value))
|
|
55
|
+
}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function Pair() {
|
|
61
|
+
return (
|
|
62
|
+
<div style={{ display: 'flex', gap: 32, alignItems: 'flex-start' }}>
|
|
63
|
+
<div style={{ flex: '1 1 0', minWidth: 0 }}>
|
|
64
|
+
<h3>Pinned</h3>
|
|
65
|
+
<Panel start={[]} />
|
|
66
|
+
</div>
|
|
67
|
+
<div style={{ flex: '1 1 0', minWidth: 0 }}>
|
|
68
|
+
<h3>Auto</h3>
|
|
69
|
+
<Panel start={EVERY_AUTO} />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Both states of every row kind, side by side. What to look at: an auto row
|
|
77
|
+
* shows no control at all — only its label and the word `auto` — and still
|
|
78
|
+
* takes exactly the room it took while pinned, so nothing below it moves on
|
|
79
|
+
* the toggle. `Seed` is `.manual()` and does not toggle.
|
|
80
|
+
*/
|
|
81
|
+
export const BothStates: Story = {
|
|
82
|
+
render: () => <Pair />,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** One panel to click labels around in: the row must not resize as it toggles. */
|
|
86
|
+
export const Interactive: Story = {
|
|
87
|
+
render: () => <Panel start={['gap']} />,
|
|
88
|
+
};
|
|
@@ -5,3 +5,26 @@
|
|
|
5
5
|
.lk-control-panel {
|
|
6
6
|
padding: 0;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
// A cell in a paired row, with the caption naming the knob it holds. Case,
|
|
10
|
+
// tracking, alignment and width come from the --wzl-params-label-* properties,
|
|
11
|
+
// which inherit across the CSS-module boundary that keeps PropertyPanel's row
|
|
12
|
+
// label class out of reach from here.
|
|
13
|
+
.lk-pair-cell {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: var(--wzl-space-3, 6px);
|
|
17
|
+
min-width: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.lk-pair-label {
|
|
21
|
+
font-family: var(--wzl-font-display);
|
|
22
|
+
font-weight: var(--wzl-font-weight-light);
|
|
23
|
+
font-size: var(--wzl-font-size-sm);
|
|
24
|
+
color: var(--wzl-fg-muted);
|
|
25
|
+
text-transform: var(--wzl-params-label-case, uppercase);
|
|
26
|
+
letter-spacing: var(--wzl-params-label-tracking, var(--wzl-tracking-wide));
|
|
27
|
+
text-align: var(--wzl-params-label-align, start);
|
|
28
|
+
inline-size: var(--wzl-params-label-width, auto);
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ANGLE_RADIANS, prefUnit } from '@weasel-js/core';
|
|
2
|
+
import type { Meta, StoryObj } from '@weasel-js/forge';
|
|
2
3
|
import { PropertyRow } from '@weasel-js/ui';
|
|
3
4
|
import { useState } from 'react';
|
|
4
5
|
import { f } from '../config/builder';
|
|
@@ -234,3 +235,84 @@ export const Nested: Story = {
|
|
|
234
235
|
);
|
|
235
236
|
},
|
|
236
237
|
};
|
|
238
|
+
|
|
239
|
+
const degrees = prefUnit(ANGLE_RADIANS, 'deg', { precision: 1 });
|
|
240
|
+
|
|
241
|
+
const presentation = f.schema({
|
|
242
|
+
x: f.number(120).label('X').pair('Offset'),
|
|
243
|
+
y: f.number(-40).label('Y').pair('Offset'),
|
|
244
|
+
spin: f
|
|
245
|
+
.number(Math.PI / 4)
|
|
246
|
+
.range(0, Math.PI * 2)
|
|
247
|
+
.unit(degrees)
|
|
248
|
+
.label('Rotation'),
|
|
249
|
+
nudge: f
|
|
250
|
+
.number(Math.PI / 180)
|
|
251
|
+
.input()
|
|
252
|
+
.unit(degrees)
|
|
253
|
+
.label('Nudge'),
|
|
254
|
+
tint: f.color('#3a86ffcc').alpha().label('Tint'),
|
|
255
|
+
opaque: f.color('#3a86ff').label('Grid'),
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
/** The three presentation fields a leaf can declare: `pair` puts `X` and `Y`
|
|
259
|
+
* on one row the pair names, `unit` stores radians and edits degrees, and
|
|
260
|
+
* `alpha` gives the swatch an opacity track and stores `#rrggbbaa`. The dump
|
|
261
|
+
* shows what each control actually wrote. */
|
|
262
|
+
export const Presentation: Story = {
|
|
263
|
+
render: () => {
|
|
264
|
+
const schema = resolveConfigSchema(presentation, []);
|
|
265
|
+
const [config, setConfig] = useState<Record<string, unknown>>(presentation.defaults());
|
|
266
|
+
return (
|
|
267
|
+
<>
|
|
268
|
+
<ControlPanel
|
|
269
|
+
schema={schema}
|
|
270
|
+
config={config}
|
|
271
|
+
setConfig={(path, value) => setConfig((prev) => withValueAtPath(prev, path, value))}
|
|
272
|
+
/>
|
|
273
|
+
<pre>{JSON.stringify(config, null, 2)}</pre>
|
|
274
|
+
</>
|
|
275
|
+
);
|
|
276
|
+
},
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
const inline = f.schema({
|
|
280
|
+
folderPad: f.number(1.1).range(0, 4).step(0.1).label('Folder pad'),
|
|
281
|
+
glyphs: f.number(1_000_000).range(0, 2_000_000).format('compact'),
|
|
282
|
+
names: f.number(60).range(0, 100),
|
|
283
|
+
labels: f.number(0).range(0, 100),
|
|
284
|
+
placement: f.enum('spread', ['spread', 'stack', 'ring']),
|
|
285
|
+
lift: f.number(0.2).range(0, 1).step(0.05),
|
|
286
|
+
opacity: f.number(0.45).range(0, 1).step(0.05),
|
|
287
|
+
iconSet: f.enum('small', ['small', 'large']).label('Icon set'),
|
|
288
|
+
drawAsIcons: f.string('**/node_modules/**').label('Draw as icons'),
|
|
289
|
+
detail: f.number(1200).range(0, 4000).suffix('nodes'),
|
|
290
|
+
showCameraRoute: f.boolean(false).toggle().label('Show camera route'),
|
|
291
|
+
routeColor: f.enum('sweep', ['sweep', 'depth']).label('Route color'),
|
|
292
|
+
minimap: f.boolean(true).toggle(),
|
|
293
|
+
minimapSize: f.number(280).range(80, 600).label('Minimap size'),
|
|
294
|
+
pickHud: f.boolean(true).toggle().label('Pick HUD'),
|
|
295
|
+
pickOutlines: f.boolean(true).toggle().label('Pick outlines'),
|
|
296
|
+
markOverlay: f.boolean(false).toggle().label('Mark overlay'),
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
/** The shape a lab's sidebar draws: `layout="inline"` paired two to a row, in a
|
|
300
|
+
* narrow column. Every row kind meets here — slider, select, switch, text —
|
|
301
|
+
* and they have to share one base height, or the column reads as ragged. */
|
|
302
|
+
export const Inline: Story = {
|
|
303
|
+
render: () => {
|
|
304
|
+
const schema = resolveConfigSchema(inline, []);
|
|
305
|
+
const [config, setConfig] = useState<Record<string, unknown>>(inline.defaults());
|
|
306
|
+
return (
|
|
307
|
+
<div style={{ width: 360 }}>
|
|
308
|
+
<ControlPanel
|
|
309
|
+
schema={schema}
|
|
310
|
+
config={config}
|
|
311
|
+
setConfig={(path, value) => setConfig((prev) => withValueAtPath(prev, path, value))}
|
|
312
|
+
layout="inline"
|
|
313
|
+
align="center"
|
|
314
|
+
/>
|
|
315
|
+
</div>
|
|
316
|
+
);
|
|
317
|
+
},
|
|
318
|
+
};
|