@zylem/ui 0.9.6 → 0.9.8

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.
@@ -70,6 +70,7 @@ export { Separator, type SeparatorProps } from './Separator/Separator';
70
70
  // Composites
71
71
  export {
72
72
  WindowControls,
73
+ type DockOption,
73
74
  type DockPosition,
74
75
  type WindowControlsProps,
75
76
  } from './WindowControls/WindowControls';
@@ -144,6 +145,7 @@ export {
144
145
  ART_TOOL_ICONS,
145
146
  ART_TOOL_LABELS,
146
147
  type ArtTool,
148
+ type IconComponent,
147
149
  type ToolButtonProps,
148
150
  } from './ToolButton/ToolButton';
149
151
  export { AddTile, type AddTileProps, type AddTileVariant } from './AddTile/AddTile';
@@ -208,6 +210,8 @@ export {
208
210
  majorTickTimes,
209
211
  formatClock,
210
212
  formatBeats,
213
+ type ResolveClipDragOptions,
214
+ type RulerTickOptions,
211
215
  } from './TimelineLanes/lanes-math';
212
216
  export { TrackHeader, type TrackHeaderProps } from './TrackHeader/TrackHeader';
213
217
  export { PianoRoll, type PianoRollProps, type PianoRollNote } from './PianoRoll/PianoRoll';
@@ -216,6 +220,7 @@ export {
216
220
  isBlackKey,
217
221
  resolveNoteDrag,
218
222
  cellStart,
223
+ type NoteDragOptions,
219
224
  } from './PianoRoll/piano-roll-math';
220
225
  export { Knob, arcPath, type KnobProps } from './Mixer/Knob';
221
226
  export { MixerStrip, formatDb, formatPan, type MixerStripProps } from './Mixer/MixerStrip';
@@ -231,12 +236,21 @@ export {
231
236
  // Camera icons (Lucide-shaped originals; also `@zylem/ui/icons`)
232
237
  export {
233
238
  CAMERA_ICONS,
239
+ CAMERA_VIEWS,
234
240
  FreePerspective,
235
241
  GameCamera,
236
242
  IsometricPerspective,
237
243
  Perspective,
238
244
  SideviewPerspective,
239
245
  TopDownPerspective,
246
+ ViewBottom,
247
+ ViewIsoLeftBottom,
248
+ ViewIsoLeftTop,
249
+ ViewIsoRightBottom,
250
+ ViewIsoRightTop,
251
+ ViewLeft,
252
+ ViewRight,
253
+ ViewTop,
240
254
  Dock,
241
255
  cameraIconNodes,
242
256
  createZylemIcon,
@@ -73,6 +73,34 @@ export const DockNode: IconNode = [
73
73
  ],
74
74
  ];
75
75
 
76
+ /**
77
+ * One side-view camera — body on the left, lens pointing right, subject plane
78
+ * on the right — turned about the icon center. Positive degrees are clockwise,
79
+ * which is what puts the camera on that side of the subject:
80
+ * 0 left, 45 iso left/top, 90 top, 135 iso right/top, 180 right,
81
+ * 225 iso right/bottom, 270 bottom, 315 iso left/bottom.
82
+ */
83
+ const FACING_RIGHT: IconNode = [
84
+ ['rect', { x: '2', y: '8', width: '8', height: '8', rx: '2' }],
85
+ ['path', { d: 'm10 10 4-2v8l-4-2' }],
86
+ ['path', { d: 'M16 6h4v12h-4' }],
87
+ ];
88
+
89
+ function turnCamera(angle: number): IconNode {
90
+ if (angle === 0) return FACING_RIGHT;
91
+ const transform = `rotate(${angle} 12 12)`;
92
+ return FACING_RIGHT.map(([element, attrs]) => [element, { ...attrs, transform }]) as IconNode;
93
+ }
94
+
95
+ export const ViewLeftNode = turnCamera(0);
96
+ export const ViewIsoLeftTopNode = turnCamera(45);
97
+ export const ViewTopNode = turnCamera(90);
98
+ export const ViewIsoRightTopNode = turnCamera(135);
99
+ export const ViewRightNode = turnCamera(180);
100
+ export const ViewIsoRightBottomNode = turnCamera(225);
101
+ export const ViewBottomNode = turnCamera(270);
102
+ export const ViewIsoLeftBottomNode = turnCamera(315);
103
+
76
104
  export const cameraIconNodes = {
77
105
  perspective: PerspectiveNode,
78
106
  'sideview-perspective': SideviewPerspectiveNode,
@@ -80,6 +108,14 @@ export const cameraIconNodes = {
80
108
  'isometric-perspective': IsometricPerspectiveNode,
81
109
  'free-perspective': FreePerspectiveNode,
82
110
  'game-camera': GameCameraNode,
111
+ 'view-left': ViewLeftNode,
112
+ 'view-iso-left-top': ViewIsoLeftTopNode,
113
+ 'view-top': ViewTopNode,
114
+ 'view-iso-right-top': ViewIsoRightTopNode,
115
+ 'view-right': ViewRightNode,
116
+ 'view-iso-right-bottom': ViewIsoRightBottomNode,
117
+ 'view-bottom': ViewBottomNode,
118
+ 'view-iso-left-bottom': ViewIsoLeftBottomNode,
83
119
  } as const;
84
120
 
85
121
  export type CameraIconName = keyof typeof cameraIconNodes;
@@ -8,6 +8,14 @@ import {
8
8
  PerspectiveNode,
9
9
  SideviewPerspectiveNode,
10
10
  TopDownPerspectiveNode,
11
+ ViewBottomNode,
12
+ ViewIsoLeftBottomNode,
13
+ ViewIsoLeftTopNode,
14
+ ViewIsoRightBottomNode,
15
+ ViewIsoRightTopNode,
16
+ ViewLeftNode,
17
+ ViewRightNode,
18
+ ViewTopNode,
11
19
  } from './icon-nodes';
12
20
 
13
21
  export type { IconNode, CameraIconName } from './icon-nodes';
@@ -19,6 +27,14 @@ export {
19
27
  PerspectiveNode,
20
28
  SideviewPerspectiveNode,
21
29
  TopDownPerspectiveNode,
30
+ ViewBottomNode,
31
+ ViewIsoLeftBottomNode,
32
+ ViewIsoLeftTopNode,
33
+ ViewIsoRightBottomNode,
34
+ ViewIsoRightTopNode,
35
+ ViewLeftNode,
36
+ ViewRightNode,
37
+ ViewTopNode,
22
38
  } from './icon-nodes';
23
39
  export { createZylemIcon, type ZylemIconOptions, type ZylemIconProps } from './create-icon';
24
40
 
@@ -45,6 +61,23 @@ export const FreePerspective = createZylemIcon('FreePerspective', FreePerspectiv
45
61
  /** Recorder with controller buttons (game camera). */
46
62
  export const GameCamera = createZylemIcon('GameCamera', GameCameraNode);
47
63
 
64
+ /** Side camera on the left, looking right. */
65
+ export const ViewLeft = createZylemIcon('ViewLeft', ViewLeftNode);
66
+ /** Side camera on the right, looking left. */
67
+ export const ViewRight = createZylemIcon('ViewRight', ViewRightNode);
68
+ /** Camera above the subject, looking down. */
69
+ export const ViewTop = createZylemIcon('ViewTop', ViewTopNode);
70
+ /** Camera below the subject, looking up. */
71
+ export const ViewBottom = createZylemIcon('ViewBottom', ViewBottomNode);
72
+ /** Camera at the upper left, the iso left/top angle. */
73
+ export const ViewIsoLeftTop = createZylemIcon('ViewIsoLeftTop', ViewIsoLeftTopNode);
74
+ /** Camera at the upper right, the iso right/top angle. */
75
+ export const ViewIsoRightTop = createZylemIcon('ViewIsoRightTop', ViewIsoRightTopNode);
76
+ /** Camera at the lower right, the iso right/bottom angle. */
77
+ export const ViewIsoRightBottom = createZylemIcon('ViewIsoRightBottom', ViewIsoRightBottomNode);
78
+ /** Camera at the lower left, the iso left/bottom angle. */
79
+ export const ViewIsoLeftBottom = createZylemIcon('ViewIsoLeftBottom', ViewIsoLeftBottomNode);
80
+
48
81
  /** Filled window frame. Skips the 18px toolbar metric so `size` matches a chevron. */
49
82
  export const Dock = createZylemIcon('Dock', DockNode, {
50
83
  className: 'zylem-dock',
@@ -60,3 +93,18 @@ export const CAMERA_ICONS = [
60
93
  { name: 'free-perspective', label: 'Free / orbit', Icon: FreePerspective },
61
94
  { name: 'game-camera', label: 'Game camera', Icon: GameCamera },
62
95
  ] as const;
96
+
97
+ /**
98
+ * The eight angles around the view cube, clockwise from the top-left corner.
99
+ * Free, game, and perspective already live on `CAMERA_ICONS`.
100
+ */
101
+ export const CAMERA_VIEWS = [
102
+ { name: 'view-iso-left-top', label: 'Iso left/top', Icon: ViewIsoLeftTop },
103
+ { name: 'view-top', label: 'Top', Icon: ViewTop },
104
+ { name: 'view-iso-right-top', label: 'Iso right/top', Icon: ViewIsoRightTop },
105
+ { name: 'view-right', label: 'Right', Icon: ViewRight },
106
+ { name: 'view-iso-right-bottom', label: 'Iso right/bottom', Icon: ViewIsoRightBottom },
107
+ { name: 'view-bottom', label: 'Bottom', Icon: ViewBottom },
108
+ { name: 'view-iso-left-bottom', label: 'Iso left/bottom', Icon: ViewIsoLeftBottom },
109
+ { name: 'view-left', label: 'Left', Icon: ViewLeft },
110
+ ] as const;
@@ -93,7 +93,7 @@ export interface ResolvedLayer {
93
93
  /**
94
94
  * Resolve a tier to a portal target and a `z-index`.
95
95
  *
96
- * @param rank Offset within the tier, for ordering peers — raising a clicked
96
+ * @param rank - Offset within the tier, for ordering peers — raising a clicked
97
97
  * window above its siblings, say. Bands are 1000 apart, so ranks below that stay
98
98
  * inside their tier. The offset means the same thing inside a `LayerScope` as
99
99
  * out, so a panel can be lifted above a scope's tooltips while staying under its
package/src/theme.css.ts CHANGED
@@ -30,6 +30,8 @@ const tokens = {
30
30
 
31
31
  active: 'rgba(20, 255, 60, 0.7)',
32
32
  activeHover: 'rgba(20, 255, 60, 0.4)',
33
+ /** Electric blue for a toggle that is on. Brighter than the resting primary. */
34
+ on: '#2EE7FF',
33
35
  successHover: '#2a6734b3',
34
36
 
35
37
  text: '#E6EBEF',
@@ -79,6 +81,8 @@ const tokens = {
79
81
  'linear-gradient(180deg, rgba(218, 242, 255, 0.58), rgba(48, 137, 220, 0.86) 48%, rgba(11, 62, 112, 0.96))',
80
82
  buttonGlassActive:
81
83
  'linear-gradient(180deg, rgba(190, 255, 203, 0.42), rgba(28, 174, 63, 0.78) 50%, rgba(9, 86, 31, 0.95))',
84
+ buttonGlassOn:
85
+ 'linear-gradient(180deg, rgba(214, 251, 255, 0.55), rgba(0, 196, 255, 0.82) 48%, rgba(0, 72, 148, 0.96))',
82
86
  buttonGlassDanger:
83
87
  'linear-gradient(180deg, rgba(255, 210, 202, 0.36), rgba(230, 69, 52, 0.82) 50%, rgba(96, 18, 13, 0.94))',
84
88
  fieldGlass:
@@ -100,6 +104,7 @@ const tokens = {
100
104
 
101
105
  glowPrimary: '0 0 18px rgba(97, 166, 232, 0.28)',
102
106
  glowActive: '0 0 20px rgba(20, 255, 60, 0.26)',
107
+ glowOn: '0 0 20px rgba(46, 231, 255, 0.42)',
103
108
  glowDanger: '0 0 20px rgba(230, 69, 52, 0.24)',
104
109
 
105
110
  focusRing:
@@ -158,6 +163,7 @@ const varNames = {
158
163
 
159
164
  active: 'zylem-color-active',
160
165
  activeHover: 'zylem-color-active-hover',
166
+ on: 'zylem-color-on',
161
167
  successHover: 'zylem-color-success-hover',
162
168
 
163
169
  text: 'zylem-color-text',
@@ -197,6 +203,7 @@ const varNames = {
197
203
  buttonGlass: 'zylem-material-button-glass',
198
204
  buttonGlassHover: 'zylem-material-button-glass-hover',
199
205
  buttonGlassActive: 'zylem-material-button-glass-active',
206
+ buttonGlassOn: 'zylem-material-button-glass-on',
200
207
  buttonGlassDanger: 'zylem-material-button-glass-danger',
201
208
  fieldGlass: 'zylem-material-field-glass',
202
209
  panelHeaderGloss: 'zylem-material-panel-header-gloss',
@@ -212,6 +219,7 @@ const varNames = {
212
219
 
213
220
  glowPrimary: 'zylem-effect-glow-primary',
214
221
  glowActive: 'zylem-effect-glow-active',
222
+ glowOn: 'zylem-effect-glow-on',
215
223
  glowDanger: 'zylem-effect-glow-danger',
216
224
 
217
225
  focusRing: 'zylem-effect-focus-ring',
@@ -1 +0,0 @@
1
- var l={colors:{primary:"#61A6E8",primaryHover:"#3B8AD8",primaryActive:"#0C6EB8",accent:"#E64534",accentHover:"#C93A2C",accentActive:"#A82F24",background:"#11151C",backgroundTranslucent:"rgba(10, 20, 30, 0.46)",surface:"#1A1F27",surfaceHover:"#222831",border:"#2D3643",active:"rgba(20, 255, 60, 0.7)",activeHover:"rgba(20, 255, 60, 0.4)",successHover:"#2a6734b3",text:"#E6EBEF",textSecondary:"#88929E",consoleBackground:"rgba(20, 40, 60, 0.25)",consoleText:"#61A6E8"},spacing:{xxs:"0.125rem",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem",xxl:"2rem",xxxl:"3rem"},sizes:{icon:"28px",iconSm:"16px",iconLg:"96px"},typography:{fontFamily:"'Exo 2', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, monospace",fontSize:"14px"},borders:{radius:"12px",width:"1.5px"},material:{glassPanel:"linear-gradient(180deg, rgba(38, 76, 112, 0.74), rgba(10, 24, 38, 0.58))",glassPanelDark:"linear-gradient(180deg, rgba(26, 31, 39, 0.75), rgba(10, 20, 30, 0.68))",glossyBar:"linear-gradient(180deg, rgba(205, 232, 255, 0.55) 0%, rgba(97, 166, 232, 0.34) 38%, rgba(18, 54, 88, 0.86) 100%)",buttonGlass:"linear-gradient(180deg, rgba(178, 219, 255, 0.34), rgba(30, 94, 148, 0.72) 48%, rgba(9, 34, 58, 0.92))",buttonGlassHover:"linear-gradient(180deg, rgba(218, 242, 255, 0.58), rgba(48, 137, 220, 0.86) 48%, rgba(11, 62, 112, 0.96))",buttonGlassActive:"linear-gradient(180deg, rgba(190, 255, 203, 0.42), rgba(28, 174, 63, 0.78) 50%, rgba(9, 86, 31, 0.95))",buttonGlassDanger:"linear-gradient(180deg, rgba(255, 210, 202, 0.36), rgba(230, 69, 52, 0.82) 50%, rgba(96, 18, 13, 0.94))",fieldGlass:"linear-gradient(180deg, rgba(8, 19, 31, 0.82), rgba(15, 39, 62, 0.72))",panelHeaderGloss:"linear-gradient(180deg, rgba(190, 226, 255, 0.18), rgba(61, 118, 165, 0.16) 46%, rgba(10, 27, 44, 0.26))"},effects:{blurSm:"8px",blurMd:"14px",blurLg:"24px",shadowPanel:"0 22px 54px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.10)",shadowButton:"inset 0 1px 0 rgba(255,255,255,0.38), inset 0 -1px 0 rgba(0,0,0,0.45), 0 2px 7px rgba(0,0,0,0.35)",shadowInset:"inset 0 1px 2px rgba(0,0,0,0.42), inset 0 -1px 0 rgba(255,255,255,0.08)",glowPrimary:"0 0 18px rgba(97, 166, 232, 0.28)",glowActive:"0 0 20px rgba(20, 255, 60, 0.26)",glowDanger:"0 0 20px rgba(230, 69, 52, 0.24)",focusRing:"0 0 0 2px rgba(97, 166, 232, 0.38), 0 0 18px rgba(97, 166, 232, 0.22)"},radii:{window:"14px",panel:"12px",button:"7px",control:"6px",card:"10px"},motion:{fast:"120ms",normal:"160ms",easeOut:"cubic-bezier(.2,.8,.2,1)"},art:{checkerLight:"#4F5C72",checkerDark:"#3C4759",canvasBorder:"rgba(150, 210, 255, 0.5)"},layers:{base:"0",panel:"1000",modal:"2000",popover:"3000",tooltip:"4000",menu:"5000"}},o={colors:{primary:"var(--zylem-color-primary)",primaryHover:"var(--zylem-color-primary-hover)",primaryActive:"var(--zylem-color-primary-active)",accent:"var(--zylem-color-accent)",accentHover:"var(--zylem-color-accent-hover)",accentActive:"var(--zylem-color-accent-active)",background:"var(--zylem-color-background)",backgroundTranslucent:"var(--zylem-color-background-translucent)",surface:"var(--zylem-color-surface)",surfaceHover:"var(--zylem-color-surface-hover)",border:"var(--zylem-color-border)",active:"var(--zylem-color-active)",activeHover:"var(--zylem-color-active-hover)",successHover:"var(--zylem-color-success-hover)",text:"var(--zylem-color-text)",textSecondary:"var(--zylem-color-text-secondary)",consoleBackground:"var(--zylem-color-console-background)",consoleText:"var(--zylem-color-console-text)"},spacing:{xxs:"var(--zylem-spacing-xxs)",xs:"var(--zylem-spacing-xs)",sm:"var(--zylem-spacing-sm)",md:"var(--zylem-spacing-md)",lg:"var(--zylem-spacing-lg)",xl:"var(--zylem-spacing-xl)",xxl:"var(--zylem-spacing-xxl)",xxxl:"var(--zylem-spacing-xxxl)"},sizes:{icon:"var(--zylem-size-icon)",iconSm:"var(--zylem-size-icon-sm)",iconLg:"var(--zylem-size-icon-lg)"},typography:{fontFamily:"var(--zylem-font-family)",fontFamilyMono:"var(--zylem-font-family-mono)",fontSize:"var(--zylem-font-size)"},borders:{radius:"var(--zylem-radius)",width:"var(--zylem-border)"},material:{glassPanel:"var(--zylem-material-glass-panel)",glassPanelDark:"var(--zylem-material-glass-panel-dark)",glossyBar:"var(--zylem-material-glossy-bar)",buttonGlass:"var(--zylem-material-button-glass)",buttonGlassHover:"var(--zylem-material-button-glass-hover)",buttonGlassActive:"var(--zylem-material-button-glass-active)",buttonGlassDanger:"var(--zylem-material-button-glass-danger)",fieldGlass:"var(--zylem-material-field-glass)",panelHeaderGloss:"var(--zylem-material-panel-header-gloss)"},effects:{blurSm:"var(--zylem-effect-blur-sm)",blurMd:"var(--zylem-effect-blur-md)",blurLg:"var(--zylem-effect-blur-lg)",shadowPanel:"var(--zylem-effect-shadow-panel)",shadowButton:"var(--zylem-effect-shadow-button)",shadowInset:"var(--zylem-effect-shadow-inset)",glowPrimary:"var(--zylem-effect-glow-primary)",glowActive:"var(--zylem-effect-glow-active)",glowDanger:"var(--zylem-effect-glow-danger)",focusRing:"var(--zylem-effect-focus-ring)"},radii:{window:"var(--zylem-radius-window)",panel:"var(--zylem-radius-panel)",button:"var(--zylem-radius-button)",control:"var(--zylem-radius-control)",card:"var(--zylem-radius-card)"},motion:{fast:"var(--zylem-motion-fast)",normal:"var(--zylem-motion-normal)",easeOut:"var(--zylem-motion-ease-out)"},art:{checkerLight:"var(--zylem-art-checker-light)",checkerDark:"var(--zylem-art-checker-dark)",canvasBorder:"var(--zylem-art-canvas-border)"},layers:{base:"var(--zylem-layer-base)",panel:"var(--zylem-layer-panel)",modal:"var(--zylem-layer-modal)",popover:"var(--zylem-layer-popover)",tooltip:"var(--zylem-layer-tooltip)",menu:"var(--zylem-layer-menu)"}};export{l as a,o as b};