@widgetic/design-system 0.3.89 → 0.5.7

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 (79) hide show
  1. package/README.md +122 -690
  2. package/dist/components/CopyableHeader.svelte +11 -13
  3. package/dist/components/EmptyState.svelte +4 -2
  4. package/dist/components/EmptyState.svelte.d.ts +2 -1
  5. package/dist/components/GenerateLoader.svelte +50 -0
  6. package/dist/components/GenerateLoader.svelte.d.ts +21 -0
  7. package/dist/components/PasswordInput.svelte +5 -1
  8. package/dist/components/WScrollArea.svelte +3 -3
  9. package/dist/components/debug-grid/DebugGrid.svelte +1 -1
  10. package/dist/components/ic/browser/BrowserInputController.svelte +1 -1
  11. package/dist/components/index.d.ts +2 -2
  12. package/dist/components/index.js +2 -2
  13. package/dist/components/modals/BaseModal.svelte +1 -1
  14. package/dist/components/modals/BaseModal.svelte.d.ts +1 -1
  15. package/dist/components/modals/NewItemDialog.svelte +1 -1
  16. package/dist/components/modals/Portal.svelte +14 -15
  17. package/dist/components/modals/RenameDialog.svelte +7 -6
  18. package/dist/components/navigation/Breadcrumbs.svelte +65 -39
  19. package/dist/components/pdf/PDFViewer.svelte +10 -19
  20. package/dist/components/pdf/PDFViewer.svelte.d.ts +4 -4
  21. package/dist/components/search-input/SearchInput.svelte +3 -8
  22. package/dist/components/search-input/index.d.ts +3 -14
  23. package/dist/components/search-input/index.js +1 -2
  24. package/dist/components/search-input/index2.d.ts +14 -0
  25. package/dist/components/shad-editor/README.md +18 -0
  26. package/dist/components/shad-editor/custom/image-extended-component.svelte +1 -1
  27. package/dist/components/shad-editor/editor.css +8 -4
  28. package/dist/components/shad-editor/icons/table.svelte +3 -3
  29. package/dist/components/shad-editor/icons/text.svelte +1 -1
  30. package/dist/components/shad-editor/onedark.css +3 -0
  31. package/dist/components/shad-editor/shad-editor.svelte +1 -1
  32. package/dist/components/toast/ToasterModal.svelte +15 -9
  33. package/dist/components/ui/alert/index.d.ts +2 -2
  34. package/dist/components/ui/badge/badge.svelte +1 -1
  35. package/dist/components/ui/badge/badge.svelte.d.ts +2 -2
  36. package/dist/components/ui/button/button.svelte +1 -1
  37. package/dist/components/ui/calendar/calendar-day.svelte +4 -4
  38. package/dist/components/ui/card/card.svelte +1 -1
  39. package/dist/components/ui/checkbox/checkbox.svelte +1 -1
  40. package/dist/components/ui/collapsible/index.d.ts +1 -12
  41. package/dist/components/ui/command/command-dialog.svelte +1 -1
  42. package/dist/components/ui/command/command-input.svelte +1 -1
  43. package/dist/components/ui/command/command-item.svelte +1 -1
  44. package/dist/components/ui/command/command-link-item.svelte +1 -1
  45. package/dist/components/ui/dialog/dialog-content.svelte +1 -1
  46. package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
  47. package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +1 -1
  48. package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
  49. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
  50. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
  51. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
  52. package/dist/components/ui/dropdown-menu/index.d.ts +6 -14
  53. package/dist/components/ui/hover-card/hover-card-content.svelte +1 -1
  54. package/dist/components/ui/input/input.svelte +1 -1
  55. package/dist/components/ui/input-otp/input-otp.svelte +1 -1
  56. package/dist/components/ui/popover/popover-content.svelte +1 -1
  57. package/dist/components/ui/radio-group/radio-group-item.svelte +1 -1
  58. package/dist/components/ui/range-calendar/range-calendar-day.svelte +6 -6
  59. package/dist/components/ui/select/index.d.ts +1 -1
  60. package/dist/components/ui/select/select-item.svelte +1 -1
  61. package/dist/components/ui/select/select-trigger.svelte +1 -1
  62. package/dist/components/ui/slider/slider.svelte +1 -1
  63. package/dist/components/ui/switch/switch.svelte +1 -1
  64. package/dist/components/ui/tabs/tabs-content.svelte +1 -1
  65. package/dist/components/ui/tabs/tabs-trigger.svelte +1 -1
  66. package/dist/components/ui/textarea/textarea.svelte +1 -1
  67. package/dist/components/ui/toggle/toggle.svelte +1 -1
  68. package/dist/components/ui/toggle/toggle.svelte.d.ts +2 -2
  69. package/dist/components/ui/tooltip/index.d.ts +4 -4
  70. package/dist/components/widget-system/Moveable.svelte +100 -23
  71. package/dist/components/widget-system/Moveable.svelte.d.ts +3 -1
  72. package/dist/icons/eye-off.svg +1 -0
  73. package/dist/icons/eye.svg +1 -0
  74. package/dist/shad-editor/index.d.ts +1 -0
  75. package/dist/shad-editor/index.js +1 -0
  76. package/dist/styles/fonts.css +59 -47
  77. package/dist/styles/global.css +119 -52
  78. package/package.json +158 -34
  79. package/tailwind.config.ts +13 -6
@@ -6,6 +6,6 @@ import Trigger from "./select-trigger.svelte";
6
6
  import Separator from "./select-separator.svelte";
7
7
  import ScrollDownButton from "./select-scroll-down-button.svelte";
8
8
  import ScrollUpButton from "./select-scroll-up-button.svelte";
9
- declare const Root: import("svelte").Component<import("bits-ui").ComboboxRootPropsWithoutHTML, {}, "value" | "open">;
9
+ declare const Root: import("svelte").Component<import("bits-ui").SelectRootPropsWithoutHTML, {}, "value" | "open">;
10
10
  declare const Group: import("svelte").Component<SelectPrimitive.GroupProps, {}, "ref">;
11
11
  export { Root, Group, GroupHeading, Item, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton, Root as Select, Group as SelectGroup, GroupHeading as SelectGroupHeading, Item as SelectItem, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton };
@@ -22,7 +22,7 @@
22
22
  bind:ref
23
23
  {value}
24
24
  class={cn(
25
- "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
25
+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50",
26
26
  className
27
27
  )}
28
28
  {...restProps}
@@ -19,7 +19,7 @@
19
19
  <SelectPrimitive.Trigger
20
20
  bind:ref
21
21
  class={cn(
22
- "border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
22
+ "border-input bg-background ring-offset-background data-placeholder:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-hidden focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
23
23
  className
24
24
  )}
25
25
  {...restProps}
@@ -32,7 +32,7 @@ get along, so we shut typescript up by casting `value` to `never`.
32
32
  {#each thumbs as thumb}
33
33
  <SliderPrimitive.Thumb
34
34
  index={thumb}
35
- class="border-primary bg-background ring-offset-background focus-visible:ring-ring block size-5 rounded-full border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
35
+ class="border-primary bg-background ring-offset-background focus-visible:ring-ring block size-5 rounded-full border-2 transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
36
36
  />
37
37
  {/each}
38
38
  {/snippet}
@@ -19,7 +19,7 @@
19
19
  bind:ref
20
20
  bind:checked
21
21
  class={cn(
22
- "focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
22
+ "focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
23
23
  className
24
24
  )}
25
25
  {...restProps}
@@ -17,7 +17,7 @@
17
17
  <TabsPrimitive.Content
18
18
  bind:ref
19
19
  class={cn(
20
- "ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
20
+ "ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2",
21
21
  className
22
22
  )}
23
23
  {...restProps}
@@ -17,7 +17,7 @@
17
17
  <TabsPrimitive.Trigger
18
18
  bind:ref
19
19
  class={cn(
20
- "ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",
20
+ "ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-2xs",
21
21
  className
22
22
  )}
23
23
  {...restProps}
@@ -19,7 +19,7 @@
19
19
  <textarea
20
20
  bind:this={ref}
21
21
  class={cn(
22
- "border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[80px] w-full rounded-md border px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
22
+ "border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[80px] w-full rounded-md border px-3 py-2 text-sm focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
23
23
  className
24
24
  )}
25
25
  bind:value
@@ -2,7 +2,7 @@
2
2
  import { type VariantProps, tv } from "tailwind-variants";
3
3
 
4
4
  export const toggleVariants = tv({
5
- base: "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
5
+ base: "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
6
6
  variants: {
7
7
  variant: {
8
8
  default: "bg-transparent",
@@ -10,7 +10,7 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
10
10
  sm: string;
11
11
  lg: string;
12
12
  };
13
- }, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config").TVConfig<{
13
+ }, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config.js").TVConfig<{
14
14
  variant: {
15
15
  default: string;
16
16
  outline: string;
@@ -50,7 +50,7 @@ export declare const toggleVariants: import("tailwind-variants").TVReturnType<{
50
50
  sm: string;
51
51
  lg: string;
52
52
  };
53
- }, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config").TVConfig<{
53
+ }, undefined, "ring-offset-background hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", import("tailwind-variants/dist/config.js").TVConfig<{
54
54
  variant: {
55
55
  default: string;
56
56
  outline: string;
@@ -1,6 +1,6 @@
1
- import { Tooltip as TooltipPrimitive } from "bits-ui";
1
+ import type { Component } from "svelte";
2
2
  import Content from "./tooltip-content.svelte";
3
- declare const Root: import("svelte").Component<TooltipPrimitive.RootProps, {}, "open">;
4
- declare const Trigger: import("svelte").Component<TooltipPrimitive.TriggerProps, {}, "ref">;
5
- declare const Provider: import("svelte").Component<TooltipPrimitive.ProviderProps, {}, "">;
3
+ declare const Root: Component<any>;
4
+ declare const Trigger: Component<any>;
5
+ declare const Provider: Component<any>;
6
6
  export { Root, Trigger, Content, Provider, Root as Tooltip, Content as TooltipContent, Trigger as TooltipTrigger, Provider as TooltipProvider, };
@@ -1,13 +1,18 @@
1
1
  <script lang="ts">
2
2
  import { onMount, createEventDispatcher } from 'svelte';
3
3
 
4
- // Props
4
+ // COMPONENT PROPS
5
+ // Class & Style
6
+ let className = '';
7
+ export { className as class };
8
+ export let style: string = "";
9
+ // Dimensions
5
10
  export let width: string = "100%";
6
11
  export let height: string = "100%";
7
12
  export let minWidth: number = 50;
8
13
  export let minHeight: number = 50;
9
14
  export let enableResize: boolean = true;
10
- export let className: string = ""; // New prop for additional CSS classes
15
+ export let alwaysShowControls: boolean = false;
11
16
 
12
17
 
13
18
  // Internal state
@@ -47,7 +52,11 @@
47
52
 
48
53
  // Track key states
49
54
  function handleKeyDown(e: KeyboardEvent) {
50
- if (e.key === ' ') { // Space key
55
+ if ((isMac && e.key === 'Meta') || (!isMac && e.key === 'Control')) {
56
+ isCmdCtrlKeyDown = true;
57
+ updateContainerClasses();
58
+ console.log('[Moveable] Cmd/Ctrl key DOWN — drag mode enabled', { key: e.key, isMac });
59
+ } else if (e.key === ' ') { // Space key
51
60
  isSpaceKeyDown = true;
52
61
  updateContainerClasses();
53
62
  // Prevent page scrolling when space is pressed
@@ -102,10 +111,23 @@
102
111
  }
103
112
  }
104
113
 
114
+ // Reclaim focus from iframes so Cmd/Ctrl keydown reaches document listeners
115
+ let lastFocusReclaim = 0;
116
+ function reclaimFocusFromIframe() {
117
+ if (document.activeElement?.tagName === 'IFRAME') {
118
+ const now = Date.now();
119
+ if (now - lastFocusReclaim > 200) {
120
+ lastFocusReclaim = now;
121
+ window.focus();
122
+ }
123
+ }
124
+ }
125
+
105
126
  // Track hover state
106
127
  function handleMouseEnter() {
107
128
  if (isInitialized) {
108
129
  isHovering = true;
130
+ reclaimFocusFromIframe();
109
131
  }
110
132
  }
111
133
 
@@ -115,7 +137,21 @@
115
137
  }
116
138
  }
117
139
 
140
+ function handleHoverMouseMove() {
141
+ reclaimFocusFromIframe();
142
+ }
143
+
144
+
118
145
  onMount(() => {
146
+ // Detect if we're on a Mac (navigator.platform is deprecated, use userAgentData or fallback)
147
+ isMac = typeof navigator !== 'undefined' && (
148
+ // @ts-ignore — userAgentData is not yet in all TS typings
149
+ navigator.userAgentData?.platform === 'macOS' ||
150
+ navigator.platform?.toUpperCase().indexOf('MAC') >= 0 ||
151
+ /Mac|iPhone|iPad|iPod/.test(navigator.userAgent)
152
+ );
153
+ console.log('[Moveable] isMac detected:', isMac, 'platform:', navigator.platform);
154
+
119
155
  // Initialize from props first if they are in px format
120
156
  const initialWidth = parseSize(width);
121
157
  const initialHeight = parseSize(height);
@@ -125,17 +161,17 @@
125
161
  currentHeight = initialHeight;
126
162
  }
127
163
 
128
- // After first render, get actual container dimensions
129
- setTimeout(() => {
164
+ // After layout, get actual container dimensions and center
165
+ requestAnimationFrame(() => {
130
166
  const rect = container.getBoundingClientRect();
131
167
 
132
- // Only update if we couldn't parse from props
133
168
  if (currentWidth === 0) currentWidth = rect.width;
134
169
  if (currentHeight === 0) currentHeight = rect.height;
135
170
 
136
- // Set initial position (centered in the parent container if possible)
137
- if (container.parentElement) {
138
- const parentRect = container.parentElement.getBoundingClientRect();
171
+ // Center in the canvas (hoverContainer's parent = editable-widget-container)
172
+ const boundsElement = hoverContainer?.parentElement;
173
+ if (boundsElement) {
174
+ const parentRect = boundsElement.getBoundingClientRect();
139
175
  currentLeft = (parentRect.width - currentWidth) / 2;
140
176
  currentTop = (parentRect.height - currentHeight) / 2;
141
177
  } else {
@@ -143,10 +179,15 @@
143
179
  currentTop = 0;
144
180
  }
145
181
 
146
- // console.log("Moveable component initialized", { currentWidth, currentHeight, currentLeft, currentTop });
147
- // Set initialized to true only after component is fully set up
148
182
  isInitialized = true;
149
- }, 0);
183
+ });
184
+
185
+ // Native event listeners for hover (reliable across Svelte 4/5 compilation)
186
+ if (hoverContainer) {
187
+ hoverContainer.addEventListener('mouseenter', handleMouseEnter);
188
+ hoverContainer.addEventListener('mouseleave', handleMouseLeave);
189
+ hoverContainer.addEventListener('mousemove', handleHoverMouseMove);
190
+ }
150
191
 
151
192
  // Add key event listeners
152
193
  document.addEventListener('keydown', handleKeyDown);
@@ -160,13 +201,23 @@
160
201
  document.removeEventListener('keydown', handleKeyDown);
161
202
  document.removeEventListener('keyup', handleKeyUp);
162
203
  window.removeEventListener('blur', cancelOperation);
204
+ if (hoverContainer) {
205
+ hoverContainer.removeEventListener('mouseenter', handleMouseEnter);
206
+ hoverContainer.removeEventListener('mouseleave', handleMouseLeave);
207
+ hoverContainer.removeEventListener('mousemove', handleHoverMouseMove);
208
+ }
163
209
  };
164
210
  });
165
211
 
166
212
  // Handle mouse events for drag
167
213
  function handleMouseDown(e: MouseEvent) {
168
- // Only allow dragging when Space key is down
169
- if (!isSpaceKeyDown || isResizing) return;
214
+ console.log('[Moveable] mousedown on container', {
215
+ isCmdCtrlKeyDown, isSpaceKeyDown, isResizing,
216
+ target: (e.target as HTMLElement).className,
217
+ tagName: (e.target as HTMLElement).tagName
218
+ });
219
+ // Only allow dragging when Command/Control key or Space key is down
220
+ if (!(isCmdCtrlKeyDown || isSpaceKeyDown) || isResizing) return;
170
221
 
171
222
  // Prevent starting a drag on resize handles
172
223
  if ((e.target as HTMLElement).classList.contains('resize-handle')) {
@@ -422,12 +473,17 @@
422
473
  }
423
474
  </script>
424
475
 
476
+ <!-- Full-screen overlay during drag/resize to prevent iframe from swallowing mouseup -->
477
+ {#if isDragging || isResizing}
478
+ <div class="interaction-overlay"></div>
479
+ {/if}
480
+
425
481
  <!-- Hover area container with padding -->
426
482
  <!-- svelte-ignore a11y_no_static_element_interactions -->
427
483
  <div
428
484
  bind:this={hoverContainer}
429
- class="hover-container {className}"
430
- style="position: absolute; left: {currentLeft - 8}px; top: {currentTop - 8}px; width: {currentWidth + 16}px; height: {currentHeight + 16}px;"
485
+ class="{className ? className + ' ' : ''}moveable-root-ct hover-container"
486
+ style="{style ? style : ''}position: absolute; left: {currentLeft - 8}px; top: {currentTop - 8}px; width: {currentWidth + 16}px; height: {currentHeight + 16}px;"
431
487
  on:mouseenter={handleMouseEnter}
432
488
  on:mouseleave={handleMouseLeave}
433
489
  >
@@ -435,12 +491,18 @@
435
491
  <!-- svelte-ignore a11y_no_static_element_interactions -->
436
492
  <div
437
493
  bind:this={container}
438
- class="moveable-container {isSpaceKeyDown ? 'drag-mode' : ''} {isShiftKeyDown && !isAltOptKeyDown ? 'proportional-mode' : ''} {isAltOptKeyDown && !isShiftKeyDown ? 'symmetrical-mode' : ''} {isShiftKeyDown && isAltOptKeyDown ? 'combined-mode' : ''} {isResizing ? 'resizing-mode' : ''}"
439
- class:hovering={isHovering}
494
+ class="moveable-content-ct moveable-container {isCmdCtrlKeyDown || isSpaceKeyDown ? 'drag-mode' : ''} {isShiftKeyDown && !isAltOptKeyDown ? 'proportional-mode' : ''} {isAltOptKeyDown && !isShiftKeyDown ? 'symmetrical-mode' : ''} {isShiftKeyDown && isAltOptKeyDown ? 'combined-mode' : ''} {isResizing ? 'resizing-mode' : ''}"
495
+ class:hovering={isHovering || alwaysShowControls}
440
496
  style="position: absolute; left: 8px; top: 8px; width: {currentWidth}px; height: {currentHeight}px;"
441
497
  on:mousedown={handleMouseDown}
442
498
  >
443
499
  <slot></slot>
500
+
501
+ <!-- Drag overlay: real DOM element that sits above iframes to capture mouse events in drag mode -->
502
+ {#if isCmdCtrlKeyDown || isSpaceKeyDown}
503
+ <!-- svelte-ignore a11y_no_static_element_interactions -->
504
+ <div class="drag-overlay" on:mousedown={handleMouseDown}></div>
505
+ {/if}
444
506
 
445
507
  {#if enableResize}
446
508
  <!-- Resize handles for all corners -->
@@ -471,9 +533,9 @@
471
533
  {/if}
472
534
 
473
535
  <!-- Size information display -->
474
- {#if (isResizing || showSizeInfo) && currentWidth > 0 && currentHeight > 0}
536
+ {#if (alwaysShowControls || isHovering || isResizing || isDragging) && currentWidth > 0 && currentHeight > 0}
475
537
  <div class="size-info">
476
- {Math.round(currentWidth)} × {Math.round(currentHeight)}
538
+ {Math.round(currentWidth)}px × {Math.round(currentHeight)}px
477
539
  </div>
478
540
  {/if}
479
541
  </div>
@@ -487,6 +549,14 @@
487
549
  </div> -->
488
550
 
489
551
  <style>
552
+ /* Full-screen overlay to capture mouse events during drag/resize (prevents iframe from eating mouseup) */
553
+ .interaction-overlay {
554
+ position: fixed;
555
+ inset: 0;
556
+ z-index: 9999;
557
+ cursor: move;
558
+ }
559
+
490
560
  /* Color variables for mode styles */
491
561
  :root {
492
562
  /* Drag mode - Light Blue */
@@ -518,7 +588,7 @@
518
588
  box-sizing: border-box;
519
589
  cursor: default;
520
590
  border: 1px solid transparent;
521
- z-index: 1; /* Lower z-index for the widget */
591
+ z-index: 1;
522
592
  }
523
593
 
524
594
  /* Move cursor only when hovering the container in drag mode */
@@ -542,7 +612,15 @@
542
612
  background-color: rgba(33, 150, 243, 0.15);
543
613
  background-color: color-mix(in srgb, var(--drag-color), transparent calc(100% - calc(var(--drag-opacity) * 100%)));
544
614
  border-color: var(--drag-color);
545
- pointer-events: auto; /* Block pointer events when in drag mode */
615
+ pointer-events: none;
616
+ }
617
+
618
+ /* Real overlay that captures mouse events above iframes */
619
+ .drag-overlay {
620
+ position: absolute;
621
+ inset: 0;
622
+ z-index: 5;
623
+ cursor: move;
546
624
  }
547
625
 
548
626
  /* Make sure resize handles maintain their cursors even in drag mode */
@@ -681,7 +759,6 @@
681
759
  border-radius: 4px;
682
760
  font-size: 12px;
683
761
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
684
- width: -moz-fit-content;
685
762
  width: fit-content;
686
763
  z-index: 200; /* Highest z-index for info tooltip */
687
764
  }
@@ -1,12 +1,14 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
+ class?: string;
5
+ style?: string;
4
6
  width?: string;
5
7
  height?: string;
6
8
  minWidth?: number;
7
9
  minHeight?: number;
8
10
  enableResize?: boolean;
9
- className?: string;
11
+ alwaysShowControls?: boolean;
10
12
  getDimensions?: () => {
11
13
  width: number;
12
14
  height: number;
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-eye-off"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828" /><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87" /><path d="M3 3l18 18" /></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-eye"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" /></svg>
@@ -0,0 +1 @@
1
+ export { ShadEditor, type TipTapEditor, type TipTapEditorLevel } from '../components/shad-editor';
@@ -0,0 +1 @@
1
+ export { ShadEditor } from '../components/shad-editor';
@@ -1,3 +1,6 @@
1
+ /* Tailwind config */
2
+ /* @config "../../../tailwind.config.ts"; */
3
+
1
4
  /*** GLOBAL STYLE FONTS ***/
2
5
 
3
6
  /* BL MELODY FAMILY: rules and classes */
@@ -6,7 +9,8 @@
6
9
 
7
10
  @font-face {
8
11
  font-family: 'BL Melody';
9
- src: url('@widgetic/design-system/fonts/BLMelody/BLMelody-Medium.woff2') format('woff2');
12
+ /* Absolute /fonts/… so consumer Vite builds (site) resolve from static/, not _app/immutable/assets/ */
13
+ src: url('/fonts/BLMelody/BLMelody-Medium.woff2') format('woff2');
10
14
  font-weight: 500;
11
15
  font-style: normal;
12
16
  font-display: swap;
@@ -14,7 +18,7 @@
14
18
 
15
19
  @font-face {
16
20
  font-family: 'BL Melody';
17
- src: url('@widgetic/design-system/fonts/BLMelody/BLMelody-SemiBold.woff2') format('woff2');
21
+ src: url('/fonts/BLMelody/BLMelody-SemiBold.woff2') format('woff2');
18
22
  font-weight: 600;
19
23
  font-style: normal;
20
24
  font-display: swap;
@@ -22,53 +26,54 @@
22
26
 
23
27
  @font-face {
24
28
  font-family: 'BL Melody';
25
- src: url('@widgetic/design-system/fonts/BLMelody/BLMelody-Bold.woff2') format('woff2');
29
+ src: url('/fonts/BLMelody/BLMelody-Bold.woff2') format('woff2');
26
30
  font-weight: 700;
27
31
  font-style: normal;
28
32
  font-display: swap;
29
33
  }
30
34
 
31
- .h1 {
35
+ /* Convert classes to utilities */
36
+ @utility h1 {
32
37
  font-family: 'BL Melody';
33
38
  font-weight: 500;
34
39
  font-size: 144px;
35
40
  line-height: 0.85;
36
- }
41
+ }
37
42
 
38
- .h2 {
43
+ @utility h2 {
39
44
  font-family: 'BL Melody';
40
45
  font-weight: 500;
41
46
  font-size: 72px;
42
47
  line-height: 0.96;
43
- }
48
+ }
44
49
 
45
- .h3 {
50
+ @utility h3 {
46
51
  font-family: 'BL Melody';
47
52
  font-weight: 700;
48
53
  font-size: 56px;
49
54
  line-height: 1;
50
- }
55
+ }
51
56
 
52
- .h4 {
57
+ @utility h4 {
53
58
  font-family: 'BL Melody';
54
59
  font-weight: 600;
55
60
  font-size: 32px;
56
61
  line-height: 1.1;
57
- }
62
+ }
58
63
 
59
- .h5 {
64
+ @utility h5 {
60
65
  font-family: 'BL Melody';
61
66
  font-weight: 500;
62
67
  font-size: 24px;
63
68
  line-height: 1.2;
64
- }
69
+ }
65
70
 
66
- .h6 {
71
+ @utility h6 {
67
72
  font-family: 'BL Melody';
68
73
  font-weight: 600;
69
74
  font-size: 14px;
70
75
  line-height: 1;
71
- }
76
+ }
72
77
 
73
78
 
74
79
 
@@ -76,7 +81,7 @@
76
81
  /* Riegla Regular */
77
82
  @font-face {
78
83
  font-family: 'Riegla Regular';
79
- src: url('@widgetic/design-system/fonts/Riegla/Riegla-Regular.otf') format('opentype');
84
+ src: url('/fonts/Riegla/Riegla-Regular.otf') format('opentype');
80
85
  font-weight: 400;
81
86
  font-style: normal;
82
87
  font-display: swap;
@@ -85,7 +90,7 @@
85
90
  /* Riegla Italic */
86
91
  @font-face {
87
92
  font-family: 'Riegla Regular';
88
- src: url('@widgetic/design-system/fonts/Riegla/Riegla-Italic.otf') format('opentype');
93
+ src: url('/fonts/Riegla/Riegla-Italic.otf') format('opentype');
89
94
  font-weight: 400;
90
95
  font-style: italic;
91
96
  font-display: swap;
@@ -94,7 +99,7 @@
94
99
  /* Riegla Bold */
95
100
  @font-face {
96
101
  font-family: 'Riegla Regular';
97
- src: url('@widgetic/design-system/fonts/Riegla/Riegla-Bold.otf') format('opentype');
102
+ src: url('/fonts/Riegla/Riegla-Bold.otf') format('opentype');
98
103
  font-weight: 700;
99
104
  font-style: normal;
100
105
  font-display: swap;
@@ -103,7 +108,7 @@
103
108
  /* Riegla Bold Italic */
104
109
  @font-face {
105
110
  font-family: 'Riegla Regular';
106
- src: url('@widgetic/design-system/fonts/Riegla/Riegla-Bold Italic.otf') format('opentype');
111
+ src: url('/fonts/Riegla/Riegla-Bold Italic.otf') format('opentype');
107
112
  font-weight: 700;
108
113
  font-style: italic;
109
114
  font-display: swap;
@@ -112,61 +117,68 @@
112
117
  /* Riegla Medium */
113
118
  @font-face {
114
119
  font-family: 'Riegla Medium';
115
- src: url('@widgetic/design-system/fonts/Riegla/RieglaMedium-Regular.otf') format('opentype');
120
+ src: url('/fonts/Riegla/RieglaMedium-Regular.otf') format('opentype');
116
121
  font-weight: 400;
117
122
  font-style: normal;
118
123
  font-display: swap;
119
124
  }
120
125
 
121
- .subtitle1 {
126
+ @utility subtitle1 {
122
127
  font-family: 'Riegla Regular';
123
128
  font-size: 32px;
124
129
  line-height: 1.2;
125
- }
130
+ }
126
131
 
127
- .subtitle2 {
132
+ @utility subtitle2 {
128
133
  font-family: 'Riegla Regular';
129
134
  font-size: 24px;
130
135
  line-height: 1.3;
131
- }
136
+ }
132
137
 
133
- .body-medium {
134
- font-family: 'Riegla Medium' !important;
135
- font-size: 18px !important;
136
- font-weight: 400 !important;
137
- line-height: 1.4 !important;
138
- }
138
+ @utility body-medium {
139
+ font-family: 'Riegla Medium';
140
+ font-size: 18px;
141
+ font-weight: 400;
142
+ line-height: 1.4;
143
+ }
139
144
 
140
- .body {
141
- font-family: 'Riegla Regular' !important;
142
- font-size: 18px !important;
143
- line-height: 1.4 !important;
144
- }
145
+ @utility body {
146
+ font-family: 'Riegla Regular';
147
+ font-size: 18px;
148
+ line-height: 1.4;
149
+ }
145
150
 
146
- .subtext {
147
- font-family: 'Riegla Regular' !important;
148
- font-size: 16px !important;
149
- line-height: 1.4 !important;
150
- }
151
+ @utility body-bold {
152
+ font-family: 'Riegla Regular';
153
+ font-size: 18px;
154
+ line-height: 1.4;
155
+ font-weight: 700;
156
+ }
151
157
 
152
- .caption {
158
+ @utility subtext {
159
+ font-family: 'Riegla Regular';
160
+ font-size: 16px;
161
+ line-height: 1.4;
162
+ }
163
+
164
+ @utility caption {
153
165
  font-family: 'Riegla Medium';
154
- font-weight: 400 !important;
166
+ font-weight: 400;
155
167
  font-size: 14px;
156
168
  line-height: 1.2;
157
- }
169
+ }
158
170
 
159
- .link {
171
+ @utility link {
160
172
  font-family: 'Riegla Medium';
161
173
  font-size: 14px;
162
174
  line-height: 1;
163
175
  text-decoration: underline;
164
- }
176
+ }
165
177
 
166
- .tag {
178
+ @utility tag {
167
179
  font-family: 'Riegla Medium';
168
180
  font-size: 11px;
169
181
  line-height: 16px;
170
182
  text-transform: uppercase;
171
- }
183
+ }
172
184