@widgetic/file-browser 0.5.34 → 0.5.36

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 (68) hide show
  1. package/README.md +1 -0
  2. package/dist/components/FolderTree.svelte +46 -97
  3. package/dist/components/FolderTree.svelte.d.ts +7 -7
  4. package/dist/components/core/Dropzone.svelte +127 -0
  5. package/dist/components/core/Dropzone.svelte.d.ts +15 -0
  6. package/dist/components/core/FileBrowser.css +11 -79
  7. package/dist/components/core/FileBrowser.svelte +278 -150
  8. package/dist/components/core/FileBrowser.svelte.d.ts +0 -1
  9. package/dist/components/core/FileUploader.svelte +204 -418
  10. package/dist/components/core/FileUploader.svelte.d.ts +1 -0
  11. package/dist/components/core/Header.svelte +49 -58
  12. package/dist/components/core/Header.svelte.d.ts +1 -0
  13. package/dist/components/core/RecentFiles.svelte +135 -562
  14. package/dist/components/core/RecentFiles.svelte.d.ts +2 -4
  15. package/dist/components/core/UploadPanel.svelte +169 -0
  16. package/dist/components/core/UploadPanel.svelte.d.ts +40 -0
  17. package/dist/components/core/UploadRow.svelte +90 -0
  18. package/dist/components/core/UploadRow.svelte.d.ts +21 -0
  19. package/dist/components/core/UploadStatus.svelte +34 -128
  20. package/dist/components/core/UploadStatus.svelte.d.ts +0 -1
  21. package/dist/components/core/UploadStatusList.svelte +61 -77
  22. package/dist/components/items/FileItem.svelte +190 -532
  23. package/dist/components/items/FileItem.svelte.d.ts +1 -1
  24. package/dist/components/items/FolderItem.svelte +46 -36
  25. package/dist/components/items/FolderItem.svelte.d.ts +1 -1
  26. package/dist/components/modals/MoveDialog.svelte +142 -281
  27. package/dist/components/modals/NewFolderButton.svelte +13 -14
  28. package/dist/components/modals/SearchModal.svelte +112 -264
  29. package/dist/components/modals/SearchModal.svelte.d.ts +0 -1
  30. package/dist/components/modals/SelectedFilesModal.svelte +91 -167
  31. package/dist/components/previews/AudioPlayer.svelte +75 -58
  32. package/dist/components/previews/ErrorPreview.svelte +9 -6
  33. package/dist/components/previews/FilePreview.svelte +182 -53
  34. package/dist/components/previews/FontPreview.svelte +37 -54
  35. package/dist/components/previews/ImagePreview.svelte +9 -2
  36. package/dist/components/previews/ImagePreview.svelte.d.ts +1 -0
  37. package/dist/components/previews/PreviewHeaderBar.svelte +70 -0
  38. package/dist/components/previews/PreviewHeaderBar.svelte.d.ts +32 -0
  39. package/dist/components/previews/TextPreview.svelte +32 -40
  40. package/dist/components/previews/VideoPlayer.svelte +124 -149
  41. package/dist/components/previews/WaveformVisualizer.svelte +42 -222
  42. package/dist/components/previews/WaveformVisualizer.svelte.d.ts +1 -1
  43. package/dist/components/ui/ControlToolbar.svelte +113 -288
  44. package/dist/components/ui/ControlToolbar.svelte.d.ts +2 -3
  45. package/dist/components/ui/DragSelect.svelte +41 -248
  46. package/dist/components/ui/DropdownMenu.svelte +56 -55
  47. package/dist/components/ui/DropdownMenu.svelte.d.ts +1 -1
  48. package/dist/components/ui/FileIcon.svelte +168 -51
  49. package/dist/components/ui/FileIcon.svelte.d.ts +13 -20
  50. package/dist/components/ui/FileMetadata.svelte +20 -9
  51. package/dist/components/ui/LoadingSkeleton.svelte +5 -20
  52. package/dist/components/ui/SearchResults.svelte +50 -26
  53. package/dist/components/ui/SearchResults.svelte.d.ts +4 -0
  54. package/dist/components/ui/SelectedBadge.svelte +25 -0
  55. package/dist/components/ui/SelectedBadge.svelte.d.ts +9 -0
  56. package/dist/components/ui/TileSkeleton.svelte +15 -0
  57. package/dist/components/ui/TileSkeleton.svelte.d.ts +18 -0
  58. package/dist/components/ui/VirtualList.svelte +3 -0
  59. package/dist/components/ui/index.d.ts +1 -0
  60. package/dist/components/ui/index.js +1 -0
  61. package/dist/i18n/messages.d.ts +40 -27
  62. package/dist/i18n/messages.js +41 -28
  63. package/dist/stores/fileStore.d.ts +2 -2
  64. package/dist/stores/navigationStore.d.ts +1 -1
  65. package/dist/stores/persistentSelectStore.d.ts +1 -1
  66. package/dist/utils/gridLayout.d.ts +2 -0
  67. package/dist/utils/gridLayout.js +10 -0
  68. package/package.json +3 -4
package/README.md CHANGED
@@ -313,6 +313,7 @@ answers "which way is this language written" (`'rtl'` or `'ltr'`, never an error
313
313
  corner where a line starts. Menus open toward the end of the line, and the pop-up of an action comes up in the bottom
314
314
  corner where a line starts. Arrows that mean back and forward are mirrored; in the preview the arrow key that points
315
315
  toward the end of the line goes on to the next file.
316
+ - **Trying it.** The demo page of this package (`npm run dev`) turns around with `?dir=rtl` in its address.
316
317
  - **Names of files and folders** are read by their own first letter (`dir="auto"`), so a Latin name such as
317
318
  `2024 report.pdf` is not put in the wrong order in a row of Arabic ones. On a left to right screen nothing is added.
318
319
  - **A name inside a sentence** ("Failed to delete 2024 report.pdf") sits between two invisible marks, the Unicode
@@ -1,9 +1,12 @@
1
1
  <script lang="ts">
2
+ /**
3
+ * One folder and its nested subfolders in the Move dialog tree.
4
+ * Mirrors Figma "Folder Row" (274:1480) with 32px level indent and a 2px start guide line.
5
+ */
2
6
  import type { FileSystemItem } from '../types';
3
- import { getFolderIcon } from '../utils/folderUtils';
7
+ import { FileIcon } from './ui';
4
8
  import { useI18n } from '../i18n';
5
9
  import { dirForUserText, useTextDirection } from '@widgetic/design-system/components/textDirection';
6
- // Import IconArrowBounce
7
10
  import { IconArrowBounce } from '@widgetic/design-system/icons';
8
11
 
9
12
  interface FolderWithDisplay extends FileSystemItem {
@@ -14,23 +17,31 @@
14
17
  export let selectedFolder: FileSystemItem | undefined;
15
18
  export let immediateParentId: string | null;
16
19
  export let onSelect: (folder: FolderWithDisplay) => void;
20
+ /** Kept for callers; rows use FileIcon instead of dynamic folder artwork. */
17
21
  export let getFolderIconForItem: (folder: FileSystemItem) => string;
18
-
19
- // New props for custom styling
20
- export let customClasses = "";
21
- export let iconSize = "40"; // Now expecting a number string for direct width/height
22
- export let textClass = "text-base flex-grow text-start";
23
- export let selectedIconClass = "w-5 h-5 text-[hsl(var(--info))]";
24
- export let currentLocationClass = "text-sm text-[hsl(var(--info))] me-2";
22
+
23
+ // Legacy styling props — kept so existing callers compile; Folder Row uses fixed Figma tokens.
24
+ export let customClasses = '';
25
+ export let iconSize = '40';
26
+ export let textClass = '';
27
+ export let selectedIconClass = '';
28
+ export let currentLocationClass = '';
25
29
  export let selectedIcon = IconArrowBounce;
26
30
 
31
+ void getFolderIconForItem;
32
+ void customClasses;
33
+ void iconSize;
34
+ void textClass;
35
+ void selectedIconClass;
36
+ void currentLocationClass;
37
+ void selectedIcon;
38
+
27
39
  const { t } = useI18n();
28
- // The reading direction of the screen: a name a visitor wrote keeps a direction of its own on a right to left screen.
29
40
  const textDirection = useTextDirection();
30
41
  $: nameDirection = dirForUserText($textDirection);
31
42
 
32
- // Filter children to only include folders
33
- $: folderChildren = folder.children?.filter(item => item.type === 'folder') || [];
43
+ $: folderChildren =
44
+ (folder.displayChildren ?? folder.children)?.filter((item) => item.type === 'folder') || [];
34
45
  $: isSelected = selectedFolder?.id === folder.id;
35
46
  $: isCurrentLocation = immediateParentId === folder.id;
36
47
 
@@ -41,49 +52,35 @@
41
52
  }
42
53
  </script>
43
54
 
44
- <div class="folder-item widgetic-colors widgetic-radius group">
55
+ <div class="folder-tree-node flex flex-col">
45
56
  <button
46
- class="folder-button flex items-center gap-4 w-full rounded-large {customClasses}
47
- {isSelected ? 'bg-[hsl(var(--light-green))] light-green-bg' : ''}
48
- {isCurrentLocation ? 'relative' : ''}"
57
+ type="button"
58
+ class="folder-tree-row flex h-12 w-full min-w-0 items-center gap-3 rounded-xl py-2 ps-2 pe-3 text-start transition-colors duration-fast
59
+ {isSelected ? 'bg-brand-subtle' : 'hover:bg-accent'}
60
+ {isCurrentLocation ? 'cursor-default' : 'cursor-pointer'}
61
+ focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
49
62
  onclick={handleClick}
50
63
  disabled={isCurrentLocation}
51
- class:cursor-default={isCurrentLocation}
52
- class:cursor-pointer={!isCurrentLocation}
53
- class:hover:bg-transparent={isCurrentLocation || isSelected}
54
- class:hover:bg-[hsl(var(--grey1))]={!isCurrentLocation && !isSelected}
55
- class:hover:bg-[hsl(var(--light-green))]={!isCurrentLocation && isSelected}
64
+ aria-current={isCurrentLocation ? 'location' : undefined}
56
65
  >
57
- <div class="w-[62px] h-[54px] shrink-0 flex items-center justify-center relative">
58
- <div
59
- class="thumbnail-button absolute inset-0 flex items-center justify-center
60
- {isSelected ? 'is-selected' : ''}
61
- {!isCurrentLocation ? 'can-hover' : ''}"
62
- >
63
- <img
64
- src={getFolderIconForItem(folder)}
65
- alt={folder.name}
66
- width="62"
67
- height="54"
68
- style="width: 62px; height: 54px; object-fit: contain;"
69
- class=""
70
- />
71
- </div>
72
- </div>
73
- <span dir={nameDirection} class="flex-grow text-start {isCurrentLocation ? 'text-[hsl(var(--grey3))]' : 'text-[hsl(var(--grey7))]'} {isSelected ? 'font-bold' : 'font-normal'} body-medium truncate">{folder.name}</span>
74
- <div class="flex items-center ms-auto">
75
- {#if isCurrentLocation}
76
- <span class="h6 text-[hsl(var(--sage-green))] relative z-10">{$t('folder.currentLocation')}</span>
77
- {/if}
78
- {#if isSelected}
79
- <svelte:component this={selectedIcon} class="{selectedIconClass} rtl:-scale-x-100" />
80
- {/if}
81
- </div>
66
+ <FileIcon kind="folder" size="sm" class={isCurrentLocation ? 'opacity-50' : ''} />
67
+ <span
68
+ dir={nameDirection}
69
+ class="min-w-0 flex-1 truncate text-body-medium {isCurrentLocation ? 'text-muted-foreground' : 'text-foreground'}"
70
+ >
71
+ {folder.name}
72
+ </span>
73
+ {#if isCurrentLocation}
74
+ <span class="shrink-0 text-caption text-muted-foreground">{$t('folder.currentLocation')}</span>
75
+ {:else if isSelected}
76
+ <IconArrowBounce class="size-4 shrink-0 stroke-[1.333] text-foreground rtl:rotate-180" aria-hidden="true" />
77
+ {/if}
82
78
  </button>
79
+
83
80
  {#if folderChildren.length > 0}
84
- <div class="ps-8">
85
- {#each folderChildren as child}
86
- <svelte:self
81
+ <div class="flex flex-col border-s-2 border-border ps-8">
82
+ {#each folderChildren as child (child.id)}
83
+ <svelte:self
87
84
  folder={child}
88
85
  {selectedFolder}
89
86
  {immediateParentId}
@@ -100,51 +97,3 @@
100
97
  </div>
101
98
  {/if}
102
99
  </div>
103
-
104
- <style>
105
- .folder-item {
106
- position: relative;
107
- }
108
-
109
- .folder-item::before {
110
- content: '';
111
- position: absolute;
112
- inset-inline-start: 0;
113
- top: 0;
114
- bottom: 0;
115
- width: 2px;
116
- background-color: hsl(var(--grey1));
117
- opacity: 0.5;
118
- }
119
-
120
- /* Apply appropriate padding for icon placement */
121
- .folder-button {
122
- padding-inline-end: 24px;
123
- }
124
-
125
- /* Explicitly handle the selected state to override the default hover */
126
- .folder-button.light-green-bg:not(:disabled):hover {
127
- background-color: hsl(var(--light-green)) !important;
128
- }
129
-
130
- /* Thumbnail button styling - no transform effects */
131
- .thumbnail-button {
132
- border-radius: var(--radius-large);
133
- -webkit-font-smoothing: antialiased;
134
- transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
135
- }
136
-
137
- /* No scaling for selected state, only opacity changes */
138
- .thumbnail-button.is-selected {
139
- opacity: 0.9;
140
- }
141
-
142
- .thumbnail-button.can-hover:hover {
143
- opacity: 0.8;
144
- }
145
-
146
- /* Remove scaling hover effect - keep opacity only */
147
- :global(.group:hover:not(.cursor-default):not(.bg-\[hsl\(var\(--light-green\)\)\])) .thumbnail-button.can-hover:not(.is-selected) {
148
- opacity: 0.8;
149
- }
150
- </style>
@@ -1,3 +1,7 @@
1
+ /**
2
+ * One folder and its nested subfolders in the Move dialog tree.
3
+ * Mirrors Figma "Folder Row" (274:1480) with 32px level indent and a 2px start guide line.
4
+ */
1
5
  import type { FileSystemItem } from '../types';
2
6
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
7
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
@@ -13,15 +17,11 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
13
17
  z_$$bindings?: Bindings;
14
18
  }
15
19
  declare const FolderTree: $$__sveltets_2_IsomorphicComponent<{
16
- folder: FileSystemItem & {
17
- displayChildren?: FileSystemItem[];
18
- };
20
+ folder: any;
19
21
  selectedFolder: FileSystemItem | undefined;
20
22
  immediateParentId: string | null;
21
- onSelect: (folder: FileSystemItem & {
22
- displayChildren?: FileSystemItem[];
23
- }) => void;
24
- getFolderIconForItem: (folder: FileSystemItem) => string;
23
+ onSelect: (folder: any) => void;
24
+ /** Kept for callers; rows use FileIcon instead of dynamic folder artwork. */ getFolderIconForItem: (folder: FileSystemItem) => string;
25
25
  customClasses?: string;
26
26
  iconSize?: string;
27
27
  textClass?: string;
@@ -0,0 +1,127 @@
1
+ <!--
2
+ Figma: Dropzone (component set 271:971, page File Browser)
3
+ -->
4
+ <script lang="ts">
5
+ import { Button, Tooltip } from '@widgetic/design-system/components';
6
+ import { IconCloudUpload, IconHelp } from '@widgetic/design-system/icons';
7
+ import { useI18n } from '../../i18n/context';
8
+ import { splitAround } from '../../i18n/text';
9
+
10
+ export type DropzoneState = 'idle' | 'hover' | 'drag-valid' | 'drag-invalid';
11
+
12
+ interface Props {
13
+ compact?: boolean;
14
+ state?: DropzoneState;
15
+ isDraggingFolder?: boolean;
16
+ allowedTypesDisplayText: string;
17
+ /** Every kind of file is taken: the sentences do not name a kind ("Upload files") */
18
+ acceptsAnyKind?: boolean;
19
+ tooltipTypesText: string;
20
+ showInitialUploading?: boolean;
21
+ onBrowse: () => void;
22
+ }
23
+
24
+ let {
25
+ compact = false,
26
+ state = 'idle',
27
+ isDraggingFolder = false,
28
+ allowedTypesDisplayText,
29
+ acceptsAnyKind = false,
30
+ tooltipTypesText,
31
+ showInitialUploading = false,
32
+ onBrowse
33
+ }: Props = $props();
34
+
35
+ const { t } = useI18n();
36
+
37
+ const dragInvalid = $derived(state === 'drag-invalid');
38
+ const dragValid = $derived(state === 'drag-valid');
39
+
40
+ // What the zone says when the dragged file cannot be taken (a folder, or a kind the zone does not accept)
41
+ const invalidMessage = $derived(
42
+ isDraggingFolder ? $t('upload.foldersNotAllowed') : $t('upload.invalidType', { types: allowedTypesDisplayText })
43
+ );
44
+
45
+ const zoneClasses = $derived.by(() => {
46
+ const base =
47
+ 'relative flex w-full items-center justify-center rounded-xl bg-background transition-colors duration-fast motion-reduce:transition-none';
48
+ if (dragInvalid) return `${base} bg-background`;
49
+ if (dragValid) return `${base} bg-brand-subtle`;
50
+ return `${base} hover:bg-accent`;
51
+ });
52
+
53
+ const outlineClasses = $derived.by(() => {
54
+ const base = 'pointer-events-none absolute inset-0 rounded-xl border border-dashed';
55
+ if (dragInvalid) return `${base} border-destructive`;
56
+ if (dragValid) return `${base} border-2 border-brand`;
57
+ return `${base} border-muted-foreground/40`;
58
+ });
59
+ </script>
60
+
61
+ <div class={[zoneClasses, { 'h-14': compact, 'h-28': !compact, 'px-4': compact, 'p-4': !compact }]}>
62
+ <div class={outlineClasses} aria-hidden="true"></div>
63
+
64
+ <div class="relative z-[1] flex w-full flex-col items-center gap-2 text-center">
65
+ {#if showInitialUploading}
66
+ <p class="text-caption text-muted-foreground">{$t('upload.uploading')}</p>
67
+ {:else if dragInvalid && compact}
68
+ <!-- Figma Dropzone "Size=Compact, State=Invalid": the icon and the message, both in the destructive colour -->
69
+ <div class="inline-flex max-w-full items-center gap-2 px-4 text-body text-destructive">
70
+ <IconCloudUpload class="size-4 shrink-0 stroke-[1.333]" aria-hidden="true" />
71
+ <span>{invalidMessage}</span>
72
+ </div>
73
+ {:else if dragValid}
74
+ <div class="flex items-center gap-2 text-body-medium text-foreground">
75
+ <IconCloudUpload class="size-4 shrink-0 stroke-[1.333]" aria-hidden="true" />
76
+ <span>{acceptsAnyKind ? $t('upload.dropActiveAny') : $t('upload.dropActive', { types: allowedTypesDisplayText })}</span>
77
+ </div>
78
+ {:else if compact}
79
+ {@const compactSentence = splitAround(
80
+ acceptsAnyKind ? $t('upload.chooseOrDropAny') : $t('upload.chooseOrDrop', { types: allowedTypesDisplayText }),
81
+ $t('upload.chooseOrDropLink')
82
+ )}
83
+ <button
84
+ type="button"
85
+ class="inline-flex max-w-full items-center gap-2 text-body text-muted-foreground transition-colors duration-fast hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
86
+ onclick={onBrowse}
87
+ >
88
+ <IconCloudUpload class="size-4 shrink-0 stroke-[1.333]" aria-hidden="true" />
89
+ <span>
90
+ {compactSentence.before}{#if compactSentence.link}<span class="text-foreground underline">{compactSentence.link}</span>{/if}{compactSentence.after}
91
+ </span>
92
+ </button>
93
+ {:else}
94
+ <Button variant="outline" size="sm" class="press-feedback" onclick={onBrowse}>
95
+ <IconCloudUpload class="size-4 stroke-[1.333]" aria-hidden="true" />
96
+ {acceptsAnyKind ? $t('upload.buttonAny') : $t('upload.button', { types: allowedTypesDisplayText })}
97
+ </Button>
98
+ <!-- Figma Dropzone "Size=Page, State=Invalid": the button stays and the hint becomes the message in the destructive colour -->
99
+ <p class="text-caption {dragInvalid ? 'text-destructive' : 'text-muted-foreground'}">
100
+ {#if dragInvalid}
101
+ {invalidMessage}
102
+ {:else}
103
+ {acceptsAnyKind ? $t('upload.dragHintAny') : $t('upload.dragHint', { types: allowedTypesDisplayText })}
104
+ {/if}
105
+ </p>
106
+ {/if}
107
+ </div>
108
+
109
+ <div class="absolute end-4 top-4 z-[2]">
110
+ <Tooltip.Provider delayDuration={200}>
111
+ <Tooltip.Root>
112
+ <Tooltip.Trigger class="inline-flex focus-visible:outline-hidden">
113
+ <span
114
+ class="inline-flex size-4 items-center justify-center text-muted-foreground transition-colors duration-fast hover:text-foreground"
115
+ >
116
+ <IconHelp class="size-4 stroke-[1.333]" aria-hidden="true" />
117
+ </span>
118
+ </Tooltip.Trigger>
119
+ <Tooltip.Portal>
120
+ <Tooltip.Content side="top" sideOffset={8} class="max-w-[250px] whitespace-pre-line break-words">
121
+ <p class="text-caption">{tooltipTypesText}</p>
122
+ </Tooltip.Content>
123
+ </Tooltip.Portal>
124
+ </Tooltip.Root>
125
+ </Tooltip.Provider>
126
+ </div>
127
+ </div>
@@ -0,0 +1,15 @@
1
+ export type DropzoneState = 'idle' | 'hover' | 'drag-valid' | 'drag-invalid';
2
+ interface Props {
3
+ compact?: boolean;
4
+ state?: DropzoneState;
5
+ isDraggingFolder?: boolean;
6
+ allowedTypesDisplayText: string;
7
+ /** Every kind of file is taken: the sentences do not name a kind ("Upload files") */
8
+ acceptsAnyKind?: boolean;
9
+ tooltipTypesText: string;
10
+ showInitialUploading?: boolean;
11
+ onBrowse: () => void;
12
+ }
13
+ declare const Dropzone: import("svelte").Component<Props, {}, "">;
14
+ type Dropzone = ReturnType<typeof Dropzone>;
15
+ export default Dropzone;
@@ -1,79 +1,11 @@
1
- @layer base {
2
- /* Define custom properties for theming */
3
- :root {
4
- --background: 0 0% 100%;
5
- --foreground: 222.2 84% 4.9%;
6
-
7
- --muted: 210 40% 96.1%;
8
- --muted-foreground: 215.4 16.3% 46.9%;
9
-
10
- --popover: 0 0% 100%;
11
- --popover-foreground: 222.2 84% 4.9%;
12
-
13
- --card: 0 0% 100%;
14
- --card-foreground: 222.2 84% 4.9%;
15
-
16
- --border: 214.3 31.8% 91.4%;
17
- --input: 214.3 31.8% 91.4%;
18
-
19
- --primary: 222.2 47.4% 11.2%;
20
- --primary-foreground: 210 40% 98%;
21
-
22
- --secondary: 210 40% 96.1%;
23
- --secondary-foreground: 222.2 47.4% 11.2%;
24
-
25
- --accent: 210 40% 96.1%;
26
- --accent-foreground: 222.2 47.4% 11.2%;
27
-
28
- --destructive: 0 72.2% 50.6%;
29
- --destructive-foreground: 210 40% 98%;
30
-
31
- --ring: 222.2 84% 4.9%;
32
-
33
- --radius: 0.5rem;
34
- }
35
-
36
- /* Dark theme custom properties */
37
- .dark {
38
- --background: 222.2 84% 4.9%;
39
- --foreground: 210 40% 98%;
40
-
41
- --muted: 217.2 32.6% 17.5%;
42
- --muted-foreground: 215 20.2% 65.1%;
43
-
44
- --popover: 222.2 84% 4.9%;
45
- --popover-foreground: 210 40% 98%;
46
-
47
- --card: 222.2 84% 4.9%;
48
- --card-foreground: 210 40% 98%;
49
-
50
- --border: 217.2 32.6% 17.5%;
51
- --input: 217.2 32.6% 17.5%;
52
-
53
- --primary: 210 40% 98%;
54
- --primary-foreground: 222.2 47.4% 11.2%;
55
-
56
- --secondary: 217.2 32.6% 17.5%;
57
- --secondary-foreground: 210 40% 98%;
58
-
59
- --accent: 217.2 32.6% 17.5%;
60
- --accent-foreground: 210 40% 98%;
61
-
62
- --destructive: 0 62.8% 30.6%;
63
- --destructive-foreground: 210 40% 98%;
64
-
65
- --ring: 212.7 26.8% 83.9%;
66
- }
67
- }
68
-
69
- @layer base {
70
- /* Apply border to all elements */
71
- * {
72
- border-color: hsl(var(--border));
73
- }
74
- /* Set default background and text color, and font family */
75
- body {
76
- background-color: hsl(var(--background));
77
- color: hsl(var(--foreground));
78
- }
79
- }
1
+ /* Intentionally empty of rules.
2
+ *
3
+ * This file used to declare the shadcn theme tokens as HSL triplets (`--background: 0 0% 100%` ...),
4
+ * plus `* { border-color: hsl(var(--border)) }` and a `body` color rule. The Widgetic design system
5
+ * (@widgetic/design-system/styles) owns those tokens now, as plain colors, and the old copy would
6
+ * break `bg-background`, `border` and the rest wherever both are loaded.
7
+ *
8
+ * The file stays at this path because host apps import it by path
9
+ * (`@widgetic/file-browser/dist/components/core/FileBrowser.css`); removing it would break their build.
10
+ * Hosts that compile the File Browser need `@widgetic/design-system/styles` (the component imports it itself).
11
+ */