@widgetic/editor 4.1.14 → 4.1.16

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 (76) hide show
  1. package/dist/components/PreviewChromeControls.svelte +15 -21
  2. package/dist/components/WidgetPreview.svelte +136 -105
  3. package/dist/components/color-select/ColorSelect.svelte +203 -224
  4. package/dist/components/color-select/constants.d.ts +4 -2
  5. package/dist/components/color-select/constants.js +4 -2
  6. package/dist/components/color-select/render.js +10 -9
  7. package/dist/components/editors/CompositionEditorApp.svelte +47 -40
  8. package/dist/components/editors/EditLeaseNotice.svelte +44 -33
  9. package/dist/components/editors/EmbedEditor.svelte +133 -259
  10. package/dist/components/editors/PropsEditor.svelte +418 -1338
  11. package/dist/components/editors/props-editor.css +5 -68
  12. package/dist/components/ic/AngleInputController.svelte +202 -277
  13. package/dist/components/ic/BrowserInputController.svelte +813 -803
  14. package/dist/components/ic/CheckboxInputController.svelte +92 -169
  15. package/dist/components/ic/CheckboxInputController.svelte.d.ts +2 -8
  16. package/dist/components/ic/ColorPickerInputController.svelte +1589 -1587
  17. package/dist/components/ic/ColorPickerInputController.svelte.d.ts +3 -3
  18. package/dist/components/ic/DateFieldInputController.svelte +455 -465
  19. package/dist/components/ic/DatePickerInputController.svelte +355 -368
  20. package/dist/components/ic/DatePickerInputController.svelte.d.ts +1 -1
  21. package/dist/components/ic/DropdownInputController.svelte +130 -200
  22. package/dist/components/ic/FixedPositionInputController.svelte +255 -276
  23. package/dist/components/ic/FixedPositionInputController.svelte.d.ts +5 -1
  24. package/dist/components/ic/FontInputController.svelte +2110 -2231
  25. package/dist/components/ic/FontInputController.svelte.d.ts +11 -11
  26. package/dist/components/ic/InputControllerHeader.svelte +141 -147
  27. package/dist/components/ic/InputControllerRow.svelte +74 -0
  28. package/dist/components/ic/InputControllerRow.svelte.d.ts +14 -0
  29. package/dist/components/ic/KnowledgeDocumentsInputController.svelte +84 -47
  30. package/dist/components/ic/KnowledgeTextForm.svelte +35 -33
  31. package/dist/components/ic/NumberControls.svelte +303 -269
  32. package/dist/components/ic/NumberControls.svelte.d.ts +4 -1
  33. package/dist/components/ic/NumberInputController.svelte +361 -301
  34. package/dist/components/ic/NumberInputController.svelte.d.ts +2 -0
  35. package/dist/components/ic/PositionInputController.svelte +253 -176
  36. package/dist/components/ic/PositionInputController.svelte.d.ts +2 -0
  37. package/dist/components/ic/RadioGroupInputController.svelte +71 -137
  38. package/dist/components/ic/RadioGroupInputController.svelte.d.ts +2 -8
  39. package/dist/components/ic/RangeCalendarInputController.svelte +233 -270
  40. package/dist/components/ic/RangeCalendarInputController.svelte.d.ts +2 -2
  41. package/dist/components/ic/RoundedCornersInputController.svelte +412 -435
  42. package/dist/components/ic/RoundedCornersInputController.svelte.d.ts +2 -0
  43. package/dist/components/ic/SliderInputController.svelte +263 -332
  44. package/dist/components/ic/SliderInputController.svelte.d.ts +1 -1
  45. package/dist/components/ic/SliderRangeInputController.svelte +140 -144
  46. package/dist/components/ic/SliderRangeInputController.svelte.d.ts +3 -3
  47. package/dist/components/ic/SwitchInputController.svelte +47 -109
  48. package/dist/components/ic/TagsInputController.svelte +95 -110
  49. package/dist/components/ic/TextAreaInputController.svelte +1794 -1935
  50. package/dist/components/ic/TextAreaPreviewInputController.svelte +436 -438
  51. package/dist/components/ic/TextAreaPreviewInputController.svelte.d.ts +2 -2
  52. package/dist/components/ic/TextInputController.svelte +65 -75
  53. package/dist/components/ic/TextInputController.svelte.d.ts +2 -0
  54. package/dist/components/ic/TimeInputController.svelte +433 -431
  55. package/dist/components/ic/VectorInputController.svelte +1833 -1831
  56. package/dist/components/ic/VectorInputController.svelte.d.ts +10 -10
  57. package/dist/components/ic/index.d.ts +1 -0
  58. package/dist/components/ic/index.js +1 -0
  59. package/dist/components/ic/shared/CategoryTabs.svelte +28 -35
  60. package/dist/components/ic/shared/ItemGrid.svelte +145 -179
  61. package/dist/components/ic/shared/RecentItemsSection.svelte +208 -271
  62. package/dist/components/ic/shared/RecentItemsSection.svelte.d.ts +1 -1
  63. package/dist/components/ui/arrows/OpacitySliderArrows.svelte +23 -38
  64. package/dist/components/ui/arrows/OpacitySliderArrows.svelte.d.ts +1 -4
  65. package/dist/components/ui/calendar-editor-fit/EditorCalendarStyles.svelte +45 -0
  66. package/dist/components/ui/calendar-editor-fit/EditorCalendarStyles.svelte.d.ts +26 -0
  67. package/dist/components/ui/checkerboard-background/CheckerboardBackground.svelte +20 -12
  68. package/dist/components/ui/shadow-picker-host/ShadowPickerHost.svelte +39 -0
  69. package/dist/components/ui/shadow-picker-host/ShadowPickerHost.svelte.d.ts +10 -0
  70. package/dist/i18n/language.d.ts +44 -281
  71. package/dist/i18n/messages.d.ts +41 -34
  72. package/dist/i18n/messages.js +47 -34
  73. package/dist/i18n/translate.d.ts +1 -1
  74. package/dist/utils.d.ts +7 -0
  75. package/dist/utils.js +26 -2
  76. package/package.json +5 -5
@@ -1,4 +1,6 @@
1
1
  import type { InputControllerConfig } from './index';
2
+ /** Declared props contract — export lets below are annotated from it so the
3
+ * interface cannot drift from what the component actually reads. */
2
4
  /** Declared props contract — export lets below are annotated from it so the
3
5
  * interface cannot drift from what the component actually reads. */
4
6
  export interface NumberInputControllerProps {
@@ -18,31 +18,41 @@
18
18
  -->
19
19
 
20
20
  <script module lang="ts">
21
+ /** Declared props contract — export lets below are annotated from it so the
22
+ * interface cannot drift from what the component actually reads. */
21
23
  /** Declared props contract — export lets below are annotated from it so the
22
24
  * interface cannot drift from what the component actually reads. */
23
- export interface PositionInputControllerProps {
24
- value?: { x: number; y: number };
25
- onChange: (newValue: { x: number; y: number }) => void;
26
- onFocus?: () => void;
27
- maskThumb?: boolean;
28
- onDragStateChange?: (isDragging: boolean) => void;
29
- }
25
+ export interface PositionInputControllerProps {
26
+ value?: { x: number; y: number };
27
+ onChange: (newValue: { x: number; y: number }) => void;
28
+ onFocus?: () => void;
29
+ maskThumb?: boolean;
30
+ onDragStateChange?: (isDragging: boolean) => void;
31
+ }
30
32
  </script>
31
33
 
32
34
  <script lang="ts">
33
- // Svelte imports
34
- import { onMount, onDestroy } from 'svelte';
35
+ // Svelte imports
36
+ import { onMount, onDestroy } from 'svelte';
35
37
 
36
- // Component config
37
- import type { InputControllerConfig } from './index';
38
+ // Component config
39
+ import type { InputControllerConfig } from './index';
38
40
 
39
- // The cursor of a drag is shown on the module's element, not on the body of the customer's page
40
- import { lockPointerStyle } from '../../utils/shadowDom';
41
- import { useEditorLanguage } from '../../i18n/language';
41
+ // The cursor of a drag is shown on the module's element, not on the body of the customer's page
42
+ import { lockPointerStyle } from '../../utils/shadowDom';
43
+ import { useEditorLanguage } from '../../i18n/language';
42
44
 
43
- // The words of the editor in the language of the page.
44
- const { t } = useEditorLanguage();
45
-
45
+ // The words of the editor in the language of the page.
46
+ const { t } = useEditorLanguage();
47
+
48
+ /**
49
+ * Core state and configuration props
50
+ * value: Current position coordinates
51
+ * onChange: Callback for position updates
52
+ * config: Additional configuration options
53
+ * onFocus: Focus event handler
54
+ * onDragStateChange: Callback for dragging state changes
55
+ */
46
56
  /**
47
57
  * Core state and configuration props
48
58
  * value: Current position coordinates
@@ -51,45 +61,58 @@
51
61
  * onFocus: Focus event handler
52
62
  * onDragStateChange: Callback for dragging state changes
53
63
  */
54
- export let value: PositionInputControllerProps['value'] = undefined;
55
- export let onChange: PositionInputControllerProps['onChange'];
56
- export let onFocus: PositionInputControllerProps['onFocus'] = () => {};
57
- export let maskThumb: PositionInputControllerProps['maskThumb'] = true;
58
- export let onDragStateChange: PositionInputControllerProps['onDragStateChange'] = () => {};
64
+ export let value: PositionInputControllerProps['value'] = undefined;
65
+ export let onChange: PositionInputControllerProps['onChange'];
66
+ export let onFocus: PositionInputControllerProps['onFocus'] = () => {};
67
+ export let maskThumb: PositionInputControllerProps['maskThumb'] = true;
68
+ export let onDragStateChange: PositionInputControllerProps['onDragStateChange'] = () => {};
59
69
 
70
+ /**
71
+ * DOM references and state
72
+ * Used for position calculations and drag handling
73
+ */
60
74
  /**
61
75
  * DOM references and state
62
76
  * Used for position calculations and drag handling
63
77
  */
64
- let joystickContainer: HTMLDivElement;
65
- let joystickHandle: HTMLDivElement;
66
- let isDragging = false;
67
- let isHovering = false;
68
- // Puts back the cursor the page had before the drag (does nothing when no drag is going on)
69
- let releasePointerStyle: () => void = () => {};
78
+ let joystickContainer: HTMLDivElement;
79
+ let joystickHandle: HTMLDivElement;
80
+ let isDragging = false;
81
+ let isHovering = false;
82
+ // Puts back the cursor the page had before the drag (does nothing when no drag is going on)
83
+ let releasePointerStyle: () => void = () => {};
70
84
 
85
+ /**
86
+ * Reactive position state
87
+ * Defaults to center (50,50) if no value provided
88
+ */
71
89
  /**
72
90
  * Reactive position state
73
91
  * Defaults to center (50,50) if no value provided
74
92
  */
75
- $: position = value || { x: 50, y: 50 };
93
+ $: position = value || { x: 50, y: 50 };
76
94
 
95
+ /**
96
+ * Formatted display values with fixed precision
97
+ * Handles null/undefined gracefully
98
+ */
77
99
  /**
78
100
  * Formatted display values with fixed precision
79
101
  * Handles null/undefined gracefully
80
102
  */
81
- $: formattedX = (position?.x ?? 0).toFixed(0);
82
- $: formattedY = (position?.y ?? 0).toFixed(0);
83
-
84
- /**
85
- * Reactive indicator position
86
- * Moves indicators to top when thumb is in lower half
87
- */
88
- $: shouldShowAtTop = position.y > 50;
103
+ $: formattedX = (position?.x ?? 0).toFixed(0);
104
+ $: formattedY = (position?.y ?? 0).toFixed(0);
89
105
 
90
- // Compute whether to mask the thumb based on interaction state
91
- $: shouldMaskThumb = maskThumb && !isDragging && !isHovering;
106
+ // Compute whether to mask the thumb based on interaction state
107
+ $: shouldMaskThumb = maskThumb && !isDragging && !isHovering;
92
108
 
109
+ /**
110
+ * Updates position based on cursor/touch coordinates
111
+ * Converts screen coordinates to percentage values
112
+ * Enforces boundaries (0-100%)
113
+ * @param clientX - Screen X coordinate
114
+ * @param clientY - Screen Y coordinate
115
+ */
93
116
  /**
94
117
  * Updates position based on cursor/touch coordinates
95
118
  * Converts screen coordinates to percentage values
@@ -97,176 +120,230 @@
97
120
  * @param clientX - Screen X coordinate
98
121
  * @param clientY - Screen Y coordinate
99
122
  */
100
- function updatePosition(clientX: number, clientY: number) {
101
- if (!joystickContainer) return;
102
-
103
- const rect = joystickContainer.getBoundingClientRect();
104
-
105
- // Convert pixel coordinates to percentages
106
- let x = ((clientX - rect.left) / rect.width) * 100;
107
- let y = ((clientY - rect.top) / rect.height) * 100;
108
-
109
- // Clamp values to valid range
110
- x = Math.max(0, Math.min(100, x));
111
- y = Math.max(0, Math.min(100, y));
112
-
113
- position = { x, y };
114
- onChange(position);
115
- }
123
+ function updatePosition(clientX: number, clientY: number) {
124
+ if (!joystickContainer) return;
125
+
126
+ const rect = joystickContainer.getBoundingClientRect();
127
+
128
+ // Convert pixel coordinates to percentages
129
+ let x = ((clientX - rect.left) / rect.width) * 100;
130
+ let y = ((clientY - rect.top) / rect.height) * 100;
116
131
 
132
+ // Clamp values to valid range
133
+ x = Math.max(0, Math.min(100, x));
134
+ y = Math.max(0, Math.min(100, y));
135
+
136
+ position = { x, y };
137
+ onChange(position);
138
+ }
139
+
140
+ /**
141
+ * Mouse event handlers
142
+ * Manages dragging state and cursor appearance
143
+ * Prevents text selection during drag
144
+ */
117
145
  /**
118
146
  * Mouse event handlers
119
147
  * Manages dragging state and cursor appearance
120
148
  * Prevents text selection during drag
121
149
  */
122
- function handleMouseEnter() {
123
- isHovering = true;
124
- }
125
-
126
- function handleMouseLeave() {
127
- isHovering = false;
128
- }
129
-
130
- function handleMouseDown(event: MouseEvent) {
131
- isDragging = true;
132
- onDragStateChange(true);
133
- onFocus();
134
- updatePosition(event.clientX, event.clientY);
135
- document.addEventListener('mousemove', handleMouseMove);
136
- document.addEventListener('mouseup', handleMouseUp);
150
+ function handleMouseEnter() {
151
+ isHovering = true;
152
+ }
153
+
154
+ function handleMouseLeave() {
155
+ isHovering = false;
156
+ }
157
+
158
+ function handleMouseDown(event: MouseEvent) {
159
+ isDragging = true;
160
+ onDragStateChange(true);
161
+ onFocus();
162
+ updatePosition(event.clientX, event.clientY);
163
+ document.addEventListener('mousemove', handleMouseMove);
164
+ document.addEventListener('mouseup', handleMouseUp);
165
+ // A second press before the first one was let go must not leave the first lock behind
166
+ // Only undoes what this drag did (it used to clear the cursor and the text selection of the whole page)
137
167
  // A second press before the first one was let go must not leave the first lock behind
138
- releasePointerStyle();
139
- releasePointerStyle = lockPointerStyle(joystickContainer, 'grabbing');
140
- }
141
-
142
- function handleMouseMove(event: MouseEvent) {
143
- if (!isDragging) return;
144
- updatePosition(event.clientX, event.clientY);
145
- }
146
-
147
- function handleMouseUp() {
148
- isDragging = false;
149
- onDragStateChange(false);
150
- document.removeEventListener('mousemove', handleMouseMove);
151
- document.removeEventListener('mouseup', handleMouseUp);
152
- releasePointerStyle();
153
- }
168
+ releasePointerStyle();
169
+ releasePointerStyle = lockPointerStyle(joystickContainer, 'grabbing');
170
+ }
171
+
172
+ function handleMouseMove(event: MouseEvent) {
173
+ if (!isDragging) return;
174
+ updatePosition(event.clientX, event.clientY);
175
+ }
154
176
 
177
+ function handleMouseUp() {
178
+ isDragging = false;
179
+ onDragStateChange(false);
180
+ document.removeEventListener('mousemove', handleMouseMove);
181
+ document.removeEventListener('mouseup', handleMouseUp);
182
+ releasePointerStyle();
183
+ }
184
+
185
+ /**
186
+ * Touch event handlers
187
+ * Provides touch support with similar behavior to mouse events
188
+ */
155
189
  /**
156
190
  * Touch event handlers
157
191
  * Provides touch support with similar behavior to mouse events
158
192
  */
159
- function handleTouchStart(event: TouchEvent) {
160
- isDragging = true;
161
- onDragStateChange(true);
162
- onFocus();
163
- updatePosition(event.touches[0].clientX, event.touches[0].clientY);
164
- }
165
-
166
- function handleTouchMove(event: TouchEvent) {
167
- if (!isDragging) return;
168
- updatePosition(event.touches[0].clientX, event.touches[0].clientY);
169
- }
170
-
171
- function handleTouchEnd() {
172
- isDragging = false;
173
- onDragStateChange(false);
174
- }
193
+ function handleTouchStart(event: TouchEvent) {
194
+ isDragging = true;
195
+ onDragStateChange(true);
196
+ onFocus();
197
+ updatePosition(event.touches[0].clientX, event.touches[0].clientY);
198
+ }
199
+
200
+ function handleTouchMove(event: TouchEvent) {
201
+ if (!isDragging) return;
202
+ updatePosition(event.touches[0].clientX, event.touches[0].clientY);
203
+ }
204
+
205
+ function handleTouchEnd() {
206
+ isDragging = false;
207
+ onDragStateChange(false);
208
+ }
175
209
 
210
+ /**
211
+ * Lifecycle hooks
212
+ * Setup and cleanup of event listeners
213
+ */
176
214
  /**
177
215
  * Lifecycle hooks
178
216
  * Setup and cleanup of event listeners
179
217
  */
180
- onMount(() => {
181
- return () => {
182
- document.removeEventListener('mousemove', handleMouseMove);
183
- document.removeEventListener('mouseup', handleMouseUp);
184
- };
185
- });
186
-
187
- onDestroy(() => {
188
- // Only undoes what this drag did (it used to clear the cursor and the text selection of the whole page)
189
- releasePointerStyle();
190
- });
218
+ onMount(() => {
219
+ return () => {
220
+ document.removeEventListener('mousemove', handleMouseMove);
221
+ document.removeEventListener('mouseup', handleMouseUp);
222
+ };
223
+ });
224
+
225
+ onDestroy(() => {
226
+ // Only undoes what this drag did (it used to clear the cursor and the text selection of the whole page)
227
+ releasePointerStyle();
228
+ });
191
229
  </script>
192
230
 
193
- <div class="position-input-controller widgetic-colors" class:position-input-controller-dragging={isDragging}>
231
+ <!-- Percentage display with dynamic positioning -->
232
+ <!-- Position indicator thumb -->
233
+ <!-- svelte-ignore element_invalid_self_closing_tag -->
194
234
  <!-- Joystick UI -->
195
235
  <!-- svelte-ignore a11y_no_static_element_interactions -->
196
- <div
197
- bind:this={joystickContainer}
198
- dir="ltr"
199
- class="relative w-[185px] h-[185px] bg-grey1 rounded-large border border-grey2 joystick-container transition-colors duration-200 hover:border-forest-green"
200
- class:overflow-hidden={shouldMaskThumb}
201
- on:mouseenter={handleMouseEnter}
202
- on:mouseleave={handleMouseLeave}
203
- on:mousedown={handleMouseDown}
204
- on:touchstart={handleTouchStart}
205
- on:touchmove={handleTouchMove}
206
- on:touchend={handleTouchEnd}
207
- >
236
+ <div class="position-input-controller" class:position-input-controller-dragging={isDragging}>
237
+ <!-- Joystick UI -->
238
+ <!-- svelte-ignore a11y_no_static_element_interactions -->
239
+ <div
240
+ bind:this={joystickContainer}
241
+ dir="ltr"
242
+ class="joystick-container relative h-[185px] w-full max-w-editor-control rounded-lg bg-accent transition-colors duration-fast hover:bg-accent-hover focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background"
243
+ class:overflow-hidden={shouldMaskThumb}
244
+ on:mouseenter={handleMouseEnter}
245
+ on:mouseleave={handleMouseLeave}
246
+ on:mousedown={handleMouseDown}
247
+ on:touchstart={handleTouchStart}
248
+ on:touchmove={handleTouchMove}
249
+ on:touchend={handleTouchEnd}
250
+ >
251
+ <!-- Grid lines -->
208
252
  <!-- Grid lines -->
209
- <div class="absolute inset-0 grid-background"></div>
253
+ <div class="absolute inset-0 grid-background"></div>
210
254
 
211
- <!-- Position indicator thumb -->
212
- <!-- svelte-ignore element_invalid_self_closing_tag -->
213
- <div
214
- bind:this={joystickHandle}
215
- class="absolute w-[24px] h-[24px] bg-white rounded-full -translate-x-1/2 -translate-y-1/2 border-2 border-grey5 z-10 {isDragging ? 'border-grey7 scale-110' : 'hover:border-grey7 hover:scale-110 transition-all duration-150'}"
216
- style="left: {position.x}%; top: {position.y}%; /* rtl-ok: x counts from the left edge of the pad, which is a left to right island */"
217
- />
255
+ <!-- Position indicator thumb -->
256
+ <!-- svelte-ignore element_invalid_self_closing_tag -->
257
+ <div
258
+ bind:this={joystickHandle}
259
+ class="absolute z-10 size-5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-primary bg-background transition-transform duration-fast {isDragging
260
+ ? 'scale-110'
261
+ : 'hover:scale-110'}"
262
+ style="left: {position.x}%; top: {position.y}%; /* rtl-ok: x counts from the left edge of the pad, which is a left to right island */"
263
+ />
218
264
 
219
- <!-- Percentage display with dynamic positioning -->
220
- <div
221
- class="absolute start-4 end-4 flex justify-between items-center transition-all duration-300 ease-in-out"
222
- class:bottom-2={!shouldShowAtTop}
223
- class:top-2={shouldShowAtTop}
224
- style="opacity: {isDragging ? 0.5 : 1}"
225
- >
226
- <div class="flex items-center gap-2 w-[50px]">
227
- <span class="caption text-grey7 w-[12px]">{$t('editor.position.x')}</span>
228
- <span class="subtext text-grey7 w-[32px]">{formattedX}%</span>
229
- </div>
230
- <div class="flex items-center gap-2 w-[50px]">
231
- <span class="caption text-grey7 w-[12px]">{$t('editor.position.y')}</span>
232
- <span class="subtext text-grey7 w-[32px]">{formattedY}%</span>
233
- </div>
234
- </div>
235
- </div>
265
+ <!-- Figma readout: y=56, 185×20, centred above the thumb at default position (not on the thumb). -->
266
+ <p
267
+ class="position-readout pointer-events-none absolute inset-x-0 top-14 z-[5] h-5 text-center text-body text-foreground transition-opacity duration-fast"
268
+ style="opacity: {isDragging ? 0.5 : 1}"
269
+ >
270
+ {$t('editor.position.readout', { x: formattedX, y: formattedY })}
271
+ </p>
272
+ </div>
236
273
  </div>
237
274
 
238
275
  <style>
276
+ /* While dragging, everything inside the controller shows the grabbing cursor (this used to be a class on the page's body) */
239
277
  /* While dragging, everything inside the controller shows the grabbing cursor (this used to be a class on the page's body) */
240
- .position-input-controller-dragging :global(*) {
241
- cursor: grabbing !important;
242
- user-select: none !important;
243
- -webkit-user-select: none !important;
244
- -moz-user-select: none !important;
245
- -ms-user-select: none !important;
246
- }
278
+ .position-input-controller-dragging :global(*) {
279
+ cursor: grabbing !important;
280
+ user-select: none !important;
281
+ -webkit-user-select: none !important;
282
+ -moz-user-select: none !important;
283
+ -ms-user-select: none !important;
284
+ }
247
285
 
286
+ /* Add pointer cursor for interactive areas */
248
287
  /* Add pointer cursor for interactive areas */
249
- .joystick-container {
250
- cursor: grab !important;
251
- }
288
+ .joystick-container {
289
+ cursor: grab !important;
290
+ }
252
291
 
253
- .joystick-container:active {
254
- cursor: grabbing !important;
255
- }
292
+ .joystick-container:active {
293
+ cursor: grabbing !important;
294
+ }
256
295
 
296
+ /* Remove default focus outline */
257
297
  /* Remove default focus outline */
258
- .joystick-container:focus {
259
- outline: none !important;
260
- }
298
+ .joystick-container:focus {
299
+ outline: none !important;
300
+ }
261
301
 
302
+ /* Grid lines at x/y 46, 93, 139 px on the 185px pad (Figma IC Position). */
262
303
  /* Grid background using gradients */
263
- .grid-background {
264
- background-image:
265
- linear-gradient(to right, transparent 24.99%, hsl(var(--forest-green) / 0.5) 25%, hsl(var(--forest-green) / 0.5) calc(25% + 1px), transparent calc(25% + 1px)),
266
- linear-gradient(to right, transparent 49.99%, hsl(var(--forest-green) / 0.5) 50%, hsl(var(--forest-green) / 0.5) calc(50% + 1px), transparent calc(50% + 1px)),
267
- linear-gradient(to right, transparent 74.99%, hsl(var(--forest-green) / 0.5) 75%, hsl(var(--forest-green) / 0.5) calc(75% + 1px), transparent calc(75% + 1px)),
268
- linear-gradient(to bottom, transparent 24.99%, hsl(var(--forest-green) / 0.5) 25%, hsl(var(--forest-green) / 0.5) calc(25% + 1px), transparent calc(25% + 1px)),
269
- linear-gradient(to bottom, transparent 49.99%, hsl(var(--forest-green) / 0.5) 50%, hsl(var(--forest-green) / 0.5) calc(50% + 1px), transparent calc(50% + 1px)),
270
- linear-gradient(to bottom, transparent 74.99%, hsl(var(--forest-green) / 0.5) 75%, hsl(var(--forest-green) / 0.5) calc(75% + 1px), transparent calc(75% + 1px));
271
- }
304
+ .grid-background {
305
+ background-image:
306
+ linear-gradient(
307
+ to right,
308
+ transparent calc(46px - 0.01px),
309
+ var(--brand-subtle) 46px,
310
+ var(--brand-subtle) calc(46px + 1px),
311
+ transparent calc(46px + 1px)
312
+ ),
313
+ linear-gradient(
314
+ to right,
315
+ transparent calc(93px - 0.01px),
316
+ var(--brand-subtle) 93px,
317
+ var(--brand-subtle) calc(93px + 1px),
318
+ transparent calc(93px + 1px)
319
+ ),
320
+ linear-gradient(
321
+ to right,
322
+ transparent calc(139px - 0.01px),
323
+ var(--brand-subtle) 139px,
324
+ var(--brand-subtle) calc(139px + 1px),
325
+ transparent calc(139px + 1px)
326
+ ),
327
+ linear-gradient(
328
+ to bottom,
329
+ transparent calc(46px - 0.01px),
330
+ var(--brand-subtle) 46px,
331
+ var(--brand-subtle) calc(46px + 1px),
332
+ transparent calc(46px + 1px)
333
+ ),
334
+ linear-gradient(
335
+ to bottom,
336
+ transparent calc(93px - 0.01px),
337
+ var(--brand-subtle) 93px,
338
+ var(--brand-subtle) calc(93px + 1px),
339
+ transparent calc(93px + 1px)
340
+ ),
341
+ linear-gradient(
342
+ to bottom,
343
+ transparent calc(139px - 0.01px),
344
+ var(--brand-subtle) 139px,
345
+ var(--brand-subtle) calc(139px + 1px),
346
+ transparent calc(139px + 1px)
347
+ );
348
+ }
272
349
  </style>
@@ -1,3 +1,5 @@
1
+ /** Declared props contract — export lets below are annotated from it so the
2
+ * interface cannot drift from what the component actually reads. */
1
3
  /** Declared props contract — export lets below are annotated from it so the
2
4
  * interface cannot drift from what the component actually reads. */
3
5
  export interface PositionInputControllerProps {