@weasel-js/labkit 1.3.0-pre.0 → 1.3.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.
Files changed (110) hide show
  1. package/dist/_dts/{index-DgcNdEdh.d.ts → types-BttTIent.d.ts} +2 -2
  2. package/dist/_dts/{types-AHlQxBNN.d.ts → types-DCGEcMO_.d.ts} +1 -1
  3. package/dist/canvas/index.d.ts +2 -2
  4. package/dist/canvas/index.js +3 -2
  5. package/dist/chrome/index.d.ts +3 -3
  6. package/dist/chrome/index.js +6 -5
  7. package/dist/chunk-3XXPU73K.js +138 -0
  8. package/dist/chunk-3XXPU73K.js.map +1 -0
  9. package/dist/{chunk-PO6L3NSH.js → chunk-6X5RBC6G.js} +17 -17
  10. package/dist/chunk-6X5RBC6G.js.map +1 -0
  11. package/dist/{chunk-NS54R52R.js → chunk-BDJXIBRZ.js} +5 -17
  12. package/dist/chunk-BDJXIBRZ.js.map +1 -0
  13. package/dist/{chunk-V7PRSIRQ.js → chunk-BMW4TDP5.js} +4 -4
  14. package/dist/chunk-BMW4TDP5.js.map +1 -0
  15. package/dist/{chunk-O7NVSCLN.js → chunk-JDROYQM3.js} +8 -8
  16. package/dist/chunk-JDROYQM3.js.map +1 -0
  17. package/dist/{chunk-HFDVGF4X.js → chunk-LGKRIUSW.js} +3 -3
  18. package/dist/{chunk-HFDVGF4X.js.map → chunk-LGKRIUSW.js.map} +1 -1
  19. package/dist/{chunk-Z6HJ5FEM.js → chunk-QCICIHEO.js} +19 -7
  20. package/dist/{chunk-Z6HJ5FEM.js.map → chunk-QCICIHEO.js.map} +1 -1
  21. package/dist/{chunk-RVNN4CHQ.js → chunk-QRYPXSGP.js} +5 -5
  22. package/dist/{chunk-RVNN4CHQ.js.map → chunk-QRYPXSGP.js.map} +1 -1
  23. package/dist/chunk-RGT4EJIB.js +6961 -0
  24. package/dist/chunk-RGT4EJIB.js.map +1 -0
  25. package/dist/chunk-SBXNQW4G.js +3 -0
  26. package/dist/chunk-SBXNQW4G.js.map +1 -0
  27. package/dist/chunk-T66HU3HX.js +17 -0
  28. package/dist/chunk-T66HU3HX.js.map +1 -0
  29. package/dist/chunk-WTI26YTM.js +266 -0
  30. package/dist/chunk-WTI26YTM.js.map +1 -0
  31. package/dist/controls/index.d.ts +2 -2
  32. package/dist/controls/index.js +3 -3
  33. package/dist/dragdrop/index.d.ts +44 -3
  34. package/dist/dragdrop/index.js +3 -1
  35. package/dist/index.d.ts +571 -541
  36. package/dist/index.js +69 -541
  37. package/dist/index.js.map +1 -1
  38. package/dist/layers/index.d.ts +3 -3
  39. package/dist/layers/index.js +4 -2
  40. package/dist/passthrough/weasel-canvas.js +1 -1
  41. package/dist/passthrough/weasel-ui.d.ts +15 -2
  42. package/dist/passthrough/weasel-ui.js +3 -2
  43. package/dist/primitives/index.js +5 -4
  44. package/dist/styles.css +1 -703
  45. package/dist/surface/index.js +2 -2
  46. package/dist/ui/layers/index.d.ts +8 -2
  47. package/dist/ui/layers/index.js +2 -4
  48. package/dist/undo/index.d.ts +2 -2
  49. package/package.json +5 -5
  50. package/src/config/builder.test.ts +7 -1
  51. package/src/config/builder.ts +1 -5
  52. package/src/config/resolve.test.ts +1 -2
  53. package/src/controls/ControlPanel.stories.tsx +41 -2
  54. package/src/controls/ControlPanel.test.tsx +31 -9
  55. package/src/controls/ControlPanel.tsx +56 -22
  56. package/src/dragdrop/index.ts +11 -0
  57. package/src/index.ts +49 -2
  58. package/src/lab/index.ts +1 -1
  59. package/src/layers/AGENTS.md +1 -1
  60. package/src/layers/LayerList.tsx +1 -1
  61. package/src/passthrough/weasel-ui.ts +22 -17
  62. package/src/styles.less +0 -4
  63. package/src/theme/Interstellar.stories.tsx +1 -1
  64. package/src/trial/Trial.config.test.tsx +3 -8
  65. package/src/ui/layers/index.ts +5 -1
  66. package/dist/chunk-NS54R52R.js.map +0 -1
  67. package/dist/chunk-O2BULFHX.js +0 -152
  68. package/dist/chunk-O2BULFHX.js.map +0 -1
  69. package/dist/chunk-O7NVSCLN.js.map +0 -1
  70. package/dist/chunk-PO6L3NSH.js.map +0 -1
  71. package/dist/chunk-PQJ5B2U2.js +0 -27
  72. package/dist/chunk-PQJ5B2U2.js.map +0 -1
  73. package/dist/chunk-TLGRYALP.js +0 -6151
  74. package/dist/chunk-TLGRYALP.js.map +0 -1
  75. package/dist/chunk-V7PRSIRQ.js.map +0 -1
  76. package/dist/chunk-ZZAYVX4X.js +0 -505
  77. package/dist/chunk-ZZAYVX4X.js.map +0 -1
  78. package/src/primitives/DragHandleGlyph.tsx +0 -29
  79. package/src/ui/format.test.ts +0 -33
  80. package/src/ui/format.ts +0 -30
  81. package/src/ui/layers/LayerStack.less +0 -143
  82. package/src/ui/layers/LayerStack.stories.tsx +0 -45
  83. package/src/ui/layers/LayerStack.test.tsx +0 -170
  84. package/src/ui/layers/LayerStack.tsx +0 -208
  85. package/src/ui/properties/CheckboxRow.stories.tsx +0 -27
  86. package/src/ui/properties/ColorRow.stories.tsx +0 -106
  87. package/src/ui/properties/CurveField.less +0 -48
  88. package/src/ui/properties/CurveField.stories.tsx +0 -20
  89. package/src/ui/properties/CurveField.test.tsx +0 -127
  90. package/src/ui/properties/CurveField.tsx +0 -184
  91. package/src/ui/properties/EffectCard.tsx +0 -324
  92. package/src/ui/properties/Gallery.stories.tsx +0 -178
  93. package/src/ui/properties/NumberRow.stories.tsx +0 -65
  94. package/src/ui/properties/PropertyGroup.less +0 -50
  95. package/src/ui/properties/PropertyGroup.stories.tsx +0 -34
  96. package/src/ui/properties/PropertyGroup.test.tsx +0 -33
  97. package/src/ui/properties/PropertyGroup.tsx +0 -45
  98. package/src/ui/properties/PropertyList.stories.tsx +0 -83
  99. package/src/ui/properties/PropertyPanel.less +0 -606
  100. package/src/ui/properties/PropertyPanel.stories.tsx +0 -190
  101. package/src/ui/properties/PropertyPanel.test.tsx +0 -193
  102. package/src/ui/properties/PropertyPanel.tsx +0 -469
  103. package/src/ui/properties/PropertyRow.stories.tsx +0 -53
  104. package/src/ui/properties/SelectRow.stories.tsx +0 -58
  105. package/src/ui/properties/SliderRow.stories.tsx +0 -74
  106. package/src/ui/properties/SpeechBalloonPanels.stories.tsx +0 -398
  107. package/src/ui/properties/TextRow.stories.tsx +0 -62
  108. package/src/ui/properties/ToggleRow.stories.tsx +0 -57
  109. package/src/ui/properties/index.ts +0 -39
  110. package/src/ui/properties/storyLayouts.tsx +0 -36
@@ -1,45 +0,0 @@
1
- import type { ReactNode } from 'react';
2
-
3
- /** Props for `<PropertyGroup>`. */
4
- export interface PropertyGroupProps {
5
- /** Title rendered between two rules at the top of the group. */
6
- title: ReactNode;
7
- /** When true the group renders nothing — useful for conditional sections. */
8
- hidden?: boolean;
9
- children: ReactNode;
10
- className?: string;
11
- /**
12
- * How rows pack into the 2-column grid.
13
- * - `'auto-color'` (default): only color rows pair side-by-side; everything
14
- * else spans the full width.
15
- * - `'pairs'`: every row auto-places into the 2-column grid two-per-row.
16
- */
17
- pack?: 'auto-color' | 'pairs';
18
- }
19
-
20
- /**
21
- * Visually-bordered group inside a PropertyList. Use to scope a set of
22
- * related rows under a heading (e.g. "Aqua", "Bevel", "Dome" sections
23
- * inside a fill effect's controls).
24
- */
25
- export function PropertyGroup({
26
- title,
27
- hidden,
28
- children,
29
- className,
30
- pack = 'auto-color',
31
- }: PropertyGroupProps) {
32
- if (hidden) return null;
33
- const packClass = pack === 'pairs' ? ' lk-property-group--pairs' : '';
34
- const cls = `lk-property-group${packClass}${className ? ` ${className}` : ''}`;
35
- return (
36
- <div className={cls}>
37
- <h3 className="lk-property-group__title">
38
- <hr />
39
- <span>{title}</span>
40
- <hr />
41
- </h3>
42
- <div className="lk-property-group__body">{children}</div>
43
- </div>
44
- );
45
- }
@@ -1,83 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
- import { useState } from 'react';
3
- import { CheckboxRow, ColorRow, PropertyList, PropertyRow, SliderRow } from './PropertyPanel';
4
-
5
- const meta: Meta<typeof PropertyList> = {
6
- title: 'labkit/UI/Properties/PropertyList',
7
- component: PropertyList,
8
- };
9
- export default meta;
10
- type Story = StoryObj<typeof PropertyList>;
11
-
12
- function Mixed() {
13
- const [opacity, setOpacity] = useState(0.5);
14
- const [fill, setFill] = useState('#b08adb');
15
- const [stroke, setStroke] = useState('#1a1428');
16
- const [visible, setVisible] = useState(true);
17
- return (
18
- <div style={{ width: 320 }}>
19
- <PropertyList>
20
- <SliderRow
21
- label="Opacity"
22
- value={opacity}
23
- min={0}
24
- max={1}
25
- step={0.01}
26
- onChange={setOpacity}
27
- format={(v) => v.toFixed(2)}
28
- />
29
- <ColorRow label="Fill" value={fill} onChange={setFill} />
30
- <ColorRow label="Stroke" value={stroke} onChange={setStroke} />
31
- <CheckboxRow label="Visible" value={visible} onChange={setVisible} />
32
- </PropertyList>
33
- </div>
34
- );
35
- }
36
-
37
- /** Standalone (no chrome) — drop into a sidebar or any container. */
38
- export const Standalone: Story = {
39
- render: () => <Mixed />,
40
- };
41
-
42
- /** Four ColorRows pack into two rows of two via the 2-col grid. */
43
- export const FourColors: Story = {
44
- render: () => (
45
- <div style={{ width: 320 }}>
46
- <PropertyList>
47
- <ColorRow label="A" value="#b08adb" onChange={() => {}} />
48
- <ColorRow label="B" value="#7fb069" onChange={() => {}} />
49
- <ColorRow label="C" value="#e07a5f" onChange={() => {}} />
50
- <ColorRow label="D" value="#74c69d" onChange={() => {}} />
51
- </PropertyList>
52
- </div>
53
- ),
54
- };
55
-
56
- /** An odd number of ColorRows leaves the trailing cell empty. */
57
- export const ThreeColors: Story = {
58
- render: () => (
59
- <div style={{ width: 320 }}>
60
- <PropertyList>
61
- <ColorRow label="A" value="#b08adb" onChange={() => {}} />
62
- <ColorRow label="B" value="#7fb069" onChange={() => {}} />
63
- <ColorRow label="C" value="#e07a5f" onChange={() => {}} />
64
- </PropertyList>
65
- </div>
66
- ),
67
- };
68
-
69
- /** A non-color row in the middle breaks color pairing — A pairs with the empty cell. */
70
- export const ColorPairingBrokenBySlider: Story = {
71
- render: () => (
72
- <div style={{ width: 320 }}>
73
- <PropertyList>
74
- <ColorRow label="A" value="#b08adb" onChange={() => {}} />
75
- <PropertyRow label="Divider">
76
- <input type="text" defaultValue="full width row" />
77
- </PropertyRow>
78
- <ColorRow label="B" value="#7fb069" onChange={() => {}} />
79
- <ColorRow label="C" value="#e07a5f" onChange={() => {}} />
80
- </PropertyList>
81
- </div>
82
- ),
83
- };