@classic-homes/theme-svelte 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/__tests__/studio.test.js +223 -0
  2. package/dist/lib/components/Sheet.svelte +155 -0
  3. package/dist/lib/components/Sheet.svelte.d.ts +28 -0
  4. package/dist/lib/components/SortableList.svelte +251 -0
  5. package/dist/lib/components/SortableList.svelte.d.ts +64 -0
  6. package/dist/lib/components/studio/InsertPalette.svelte +192 -0
  7. package/dist/lib/components/studio/InsertPalette.svelte.d.ts +39 -0
  8. package/dist/lib/components/studio/IssuesButton.svelte +141 -0
  9. package/dist/lib/components/studio/IssuesButton.svelte.d.ts +33 -0
  10. package/dist/lib/components/studio/SaveStatus.svelte +110 -0
  11. package/dist/lib/components/studio/SaveStatus.svelte.d.ts +22 -0
  12. package/dist/lib/components/studio/Studio.svelte +189 -0
  13. package/dist/lib/components/studio/Studio.svelte.d.ts +49 -0
  14. package/dist/lib/components/studio/StudioBar.svelte +168 -0
  15. package/dist/lib/components/studio/StudioBar.svelte.d.ts +46 -0
  16. package/dist/lib/components/studio/StudioCanvas.svelte +87 -0
  17. package/dist/lib/components/studio/StudioCanvas.svelte.d.ts +30 -0
  18. package/dist/lib/components/studio/StudioCanvasItem.svelte +121 -0
  19. package/dist/lib/components/studio/StudioCanvasItem.svelte.d.ts +29 -0
  20. package/dist/lib/components/studio/StudioInspector.svelte +133 -0
  21. package/dist/lib/components/studio/StudioInspector.svelte.d.ts +37 -0
  22. package/dist/lib/components/studio/StudioInspectorSection.svelte +79 -0
  23. package/dist/lib/components/studio/StudioInspectorSection.svelte.d.ts +24 -0
  24. package/dist/lib/components/studio/StudioOutline.svelte +303 -0
  25. package/dist/lib/components/studio/StudioOutline.svelte.d.ts +55 -0
  26. package/dist/lib/components/studio/StudioPage.svelte +36 -0
  27. package/dist/lib/components/studio/StudioPage.svelte.d.ts +18 -0
  28. package/dist/lib/components/studio/context.d.ts +25 -0
  29. package/dist/lib/components/studio/context.js +9 -0
  30. package/dist/lib/components/studio/index.d.ts +12 -0
  31. package/dist/lib/components/studio/index.js +12 -0
  32. package/dist/lib/index.d.ts +3 -0
  33. package/dist/lib/index.js +6 -0
  34. package/dist/lib/schemas/common.d.ts +2 -2
  35. package/package.json +1 -1
@@ -0,0 +1,36 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+ import { cn } from '../../utils.js';
4
+
5
+ /**
6
+ * StudioPage - a full-width, scrolling page inside a Studio, for modes that
7
+ * configure rather than build (Settings, Share, Deck). Pass it as the
8
+ * Studio's `canvas` with no rail or inspector. Group its fields in Cards or
9
+ * `StudioInspectorSection`s with plain headings: Basics, Schedule, Privacy...
10
+ */
11
+ interface Props {
12
+ title?: string;
13
+ description?: string;
14
+ children: Snippet;
15
+ /** Content width (default: 42rem) */
16
+ maxWidth?: string;
17
+ class?: string;
18
+ }
19
+
20
+ let { title, description, children, maxWidth = '42rem', class: className }: Props = $props();
21
+ </script>
22
+
23
+ <div class="h-full overflow-y-auto bg-muted/40">
24
+ <div
25
+ class={cn('mx-auto w-full space-y-6 px-4 py-6 md:py-10', className)}
26
+ style:max-width={maxWidth}
27
+ >
28
+ {#if title || description}
29
+ <div>
30
+ {#if title}<h2 class="text-xl font-semibold">{title}</h2>{/if}
31
+ {#if description}<p class="mt-1 text-sm text-muted-foreground">{description}</p>{/if}
32
+ </div>
33
+ {/if}
34
+ {@render children()}
35
+ </div>
36
+ </div>
@@ -0,0 +1,18 @@
1
+ import type { Snippet } from 'svelte';
2
+ /**
3
+ * StudioPage - a full-width, scrolling page inside a Studio, for modes that
4
+ * configure rather than build (Settings, Share, Deck). Pass it as the
5
+ * Studio's `canvas` with no rail or inspector. Group its fields in Cards or
6
+ * `StudioInspectorSection`s with plain headings: Basics, Schedule, Privacy...
7
+ */
8
+ interface Props {
9
+ title?: string;
10
+ description?: string;
11
+ children: Snippet;
12
+ /** Content width (default: 42rem) */
13
+ maxWidth?: string;
14
+ class?: string;
15
+ }
16
+ declare const StudioPage: import("svelte").Component<Props, {}, "">;
17
+ type StudioPage = ReturnType<typeof StudioPage>;
18
+ export default StudioPage;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * How much room the Studio has:
3
+ * - `wide` (≥1280px): outline, canvas and inspector side by side
4
+ * - `medium` (768–1279px): the outline moves into a sheet; canvas and inspector stay
5
+ * - `compact` (<768px): canvas only; outline and inspector open as sheets
6
+ */
7
+ export type StudioLayout = 'wide' | 'medium' | 'compact';
8
+ export interface StudioContext {
9
+ readonly layout: StudioLayout;
10
+ /** Whether the outline is shown in a sheet rather than as a column */
11
+ readonly railInSheet: boolean;
12
+ /** Whether the inspector is shown in a sheet rather than as a column */
13
+ readonly inspectorInSheet: boolean;
14
+ openRail(): void;
15
+ closeRail(): void;
16
+ /**
17
+ * Bring the inspector into view after the user picks something to edit:
18
+ * closes the outline sheet and, on phones, opens the inspector sheet.
19
+ */
20
+ revealInspector(): void;
21
+ closeInspector(): void;
22
+ }
23
+ export declare function setStudioContext(context: StudioContext): void;
24
+ /** The surrounding Studio, or undefined when a Studio part is used on its own */
25
+ export declare function getStudioContext(): StudioContext | undefined;
@@ -0,0 +1,9 @@
1
+ import { getContext, setContext } from 'svelte';
2
+ const KEY = Symbol('classic-studio');
3
+ export function setStudioContext(context) {
4
+ setContext(KEY, context);
5
+ }
6
+ /** The surrounding Studio, or undefined when a Studio part is used on its own */
7
+ export function getStudioContext() {
8
+ return getContext(KEY);
9
+ }
@@ -0,0 +1,12 @@
1
+ export { default as Studio } from './Studio.svelte';
2
+ export { default as StudioBar } from './StudioBar.svelte';
3
+ export { default as StudioOutline, type StudioOutlineEntry } from './StudioOutline.svelte';
4
+ export { default as StudioCanvas } from './StudioCanvas.svelte';
5
+ export { default as StudioCanvasItem } from './StudioCanvasItem.svelte';
6
+ export { default as StudioInspector, type StudioInspectorTab } from './StudioInspector.svelte';
7
+ export { default as StudioInspectorSection } from './StudioInspectorSection.svelte';
8
+ export { default as StudioPage } from './StudioPage.svelte';
9
+ export { default as SaveStatus, type SaveState } from './SaveStatus.svelte';
10
+ export { default as IssuesButton, type StudioIssue } from './IssuesButton.svelte';
11
+ export { default as InsertPalette, type InsertPaletteItem, type InsertPaletteGroup, } from './InsertPalette.svelte';
12
+ export { getStudioContext, type StudioContext, type StudioLayout } from './context.js';
@@ -0,0 +1,12 @@
1
+ export { default as Studio } from './Studio.svelte';
2
+ export { default as StudioBar } from './StudioBar.svelte';
3
+ export { default as StudioOutline } from './StudioOutline.svelte';
4
+ export { default as StudioCanvas } from './StudioCanvas.svelte';
5
+ export { default as StudioCanvasItem } from './StudioCanvasItem.svelte';
6
+ export { default as StudioInspector } from './StudioInspector.svelte';
7
+ export { default as StudioInspectorSection } from './StudioInspectorSection.svelte';
8
+ export { default as StudioPage } from './StudioPage.svelte';
9
+ export { default as SaveStatus } from './SaveStatus.svelte';
10
+ export { default as IssuesButton } from './IssuesButton.svelte';
11
+ export { default as InsertPalette, } from './InsertPalette.svelte';
12
+ export { getStudioContext } from './context.js';
@@ -65,6 +65,9 @@ export { default as FilterPanel } from './components/FilterPanel.svelte';
65
65
  export { default as ActiveFilterChips, type ActiveFilterChip, } from './components/ActiveFilterChips.svelte';
66
66
  export { default as SegmentedControl, type SegmentedControlOption, } from './components/SegmentedControl.svelte';
67
67
  export { default as ViewToggle, type ViewToggleOption, defaultViewToggleOptions, } from './components/ViewToggle.svelte';
68
+ export { default as Sheet } from './components/Sheet.svelte';
69
+ export { default as SortableList, type SortableHandleProps, type SortableItemContext, } from './components/SortableList.svelte';
70
+ export { Studio, StudioBar, StudioOutline, StudioCanvas, StudioCanvasItem, StudioInspector, StudioInspectorSection, StudioPage, SaveStatus, IssuesButton, InsertPalette, getStudioContext, type StudioOutlineEntry, type StudioInspectorTab, type SaveState, type StudioIssue, type InsertPaletteItem, type InsertPaletteGroup, type StudioContext, type StudioLayout, } from './components/studio/index.js';
68
71
  export { AspectRatio, Image, Video, Audio, MediaEmbed, MediaGrid, MediaCarousel, Lightbox, } from './components/media/index.js';
69
72
  export type { MediaGridColumns } from './components/media/MediaGrid.svelte';
70
73
  export type { DropdownMenuItem, DropdownMenuGroup, SelectOption, SelectGroup, Tab, FileMetadata, DataTableColumn, DataTableFilterFn, DataTableFilterOption, RadioOption, ComboboxOption, MultiSelectOption, SignatureData, SignatureStroke, SignaturePoint, SignatureMetadata, SignatureFont, SignatureValidationResult, MediaKind, MediaEmbedProvider, MediaSource, MediaTextTrack, MediaItemBase, ImageMediaItem, VideoMediaItem, AudioMediaItem, EmbedMediaItem, MediaItem, MediaAspectRatio, MediaFit, CloudflareStreamAccount, MatterportPlayerOptions, } from './types/components.js';
package/dist/lib/index.js CHANGED
@@ -78,6 +78,12 @@ export { default as FilterPanel } from './components/FilterPanel.svelte';
78
78
  export { default as ActiveFilterChips, } from './components/ActiveFilterChips.svelte';
79
79
  export { default as SegmentedControl, } from './components/SegmentedControl.svelte';
80
80
  export { default as ViewToggle, defaultViewToggleOptions, } from './components/ViewToggle.svelte';
81
+ // Overlay: edge sheet
82
+ export { default as Sheet } from './components/Sheet.svelte';
83
+ // Reorderable list
84
+ export { default as SortableList, } from './components/SortableList.svelte';
85
+ // Studio - full-screen editor frame (outline, canvas, inspector)
86
+ export { Studio, StudioBar, StudioOutline, StudioCanvas, StudioCanvasItem, StudioInspector, StudioInspectorSection, StudioPage, SaveStatus, IssuesButton, InsertPalette, getStudioContext, } from './components/studio/index.js';
81
87
  // Media Components
82
88
  export { AspectRatio, Image, Video, Audio, MediaEmbed, MediaGrid, MediaCarousel, Lightbox, } from './components/media/index.js';
83
89
  // DataTable sub-components and utilities
@@ -155,15 +155,15 @@ export declare const addressSchema: z.ZodObject<{
155
155
  street: string;
156
156
  city: string;
157
157
  postalCode: string;
158
- street2?: string | undefined;
159
158
  state?: string | undefined;
159
+ street2?: string | undefined;
160
160
  }, {
161
161
  country: string;
162
162
  street: string;
163
163
  city: string;
164
164
  postalCode: string;
165
- street2?: string | undefined;
166
165
  state?: string | undefined;
166
+ street2?: string | undefined;
167
167
  }>;
168
168
  export type Address = z.infer<typeof addressSchema>;
169
169
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/theme-svelte",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Svelte components for the Classic theme system",
5
5
  "type": "module",
6
6
  "svelte": "./dist/lib/index.js",