@frontlit/page-builder 0.1.0-alpha.6 → 0.1.0-alpha.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 (33) hide show
  1. package/dist/blocks/index.js +2 -2
  2. package/dist/builder/index.js +5 -5
  3. package/dist/{chunk-PQTDUFKU.js → chunk-HEKBPKGS.js} +6 -6
  4. package/dist/{chunk-PQTDUFKU.js.map → chunk-HEKBPKGS.js.map} +1 -1
  5. package/dist/{chunk-YXLOVEQZ.js → chunk-I2LRKHSL.js} +5 -5
  6. package/dist/{chunk-YXLOVEQZ.js.map → chunk-I2LRKHSL.js.map} +1 -1
  7. package/dist/{chunk-OEQJQ4OA.js → chunk-KRQWGGAJ.js} +244 -6
  8. package/dist/chunk-KRQWGGAJ.js.map +1 -0
  9. package/dist/{chunk-BWOGREWJ.js → chunk-LL6CG6KH.js} +3 -3
  10. package/dist/{chunk-BWOGREWJ.js.map → chunk-LL6CG6KH.js.map} +1 -1
  11. package/dist/{chunk-FZBLE44D.js → chunk-XQE4RVNO.js} +4 -4
  12. package/dist/chunk-XQE4RVNO.js.map +1 -0
  13. package/dist/components/index.js +2 -2
  14. package/dist/index.js +5 -5
  15. package/dist/primitives/index.d.ts +68 -1
  16. package/dist/primitives/index.js +1 -1
  17. package/dist/renderer/index.js +4 -4
  18. package/dist/server/index.js +4 -2
  19. package/dist/server/index.js.map +1 -1
  20. package/dist/server/islands/code-snippet.js +1 -1
  21. package/dist/server/islands/code-snippet.js.map +1 -1
  22. package/dist/server/islands/header-mobile-menu.js +1 -1
  23. package/dist/server/islands/header-mobile-menu.js.map +1 -1
  24. package/dist/server/islands/tabs.d.ts +23 -0
  25. package/dist/server/islands/tabs.js +86 -0
  26. package/dist/server/islands/tabs.js.map +1 -0
  27. package/dist/server/primitives.d.ts +81 -1
  28. package/dist/server/primitives.js +231 -36
  29. package/dist/server/primitives.js.map +1 -1
  30. package/dist/styles.css +78 -0
  31. package/package.json +1 -1
  32. package/dist/chunk-FZBLE44D.js.map +0 -1
  33. package/dist/chunk-OEQJQ4OA.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- export { ThemeModeSwitcher } from '../chunk-BWOGREWJ.js';
2
+ export { ThemeModeSwitcher } from '../chunk-LL6CG6KH.js';
3
3
  export { InlineEmbed, NavLink, PageBuilderLinkProvider, TextRenderer, VideoWithPreview, prepareEmbed, usePageBuilderLinkComponent } from '../chunk-QMUIISN3.js';
4
- export { Image, resolveImageAttributes, roundedMap, setImageAttributesResolver } from '../chunk-OEQJQ4OA.js';
4
+ export { Image, resolveImageAttributes, roundedMap, setImageAttributesResolver } from '../chunk-KRQWGGAJ.js';
5
5
  import '../chunk-XU7ALPGQ.js';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
  export { truncateTextEditorContent } from '@frontlit/text-editor';
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import './chunk-HWOVSHIW.js';
3
- export { BlockPicker, BuilderTopBar, ColorSelector, ContentPaddingSelector, MaxWidthSelector, PATTERN_PRESETS, PageBuilder, PageBuilderPropertyHeader, PageBuilderSlider, SectionBackgroundPanel, SeoEditor, SettingsPanel, ThemeEditor, VerticalPaddingSelector, createDefaultLayout, createWidgetInstance, ensureRequiredSharedWidgets, getDefaultTheme, getMaxWidthTWClass, getVerticalPaddingTWClass, resolveIcon, withDefaultSettings } from './chunk-PQTDUFKU.js';
4
- export { EditableBlock, LAYOUT_BLOCK_NAMES, NON_ADDABLE_BLOCK_NAMES, PageRenderer, blockRegistry, generateThemeStyles, getAddableBlocks, getWidget, registerBlock, resolveThemeColor } from './chunk-YXLOVEQZ.js';
5
- import './chunk-BWOGREWJ.js';
6
- import './chunk-FZBLE44D.js';
3
+ export { BlockPicker, BuilderTopBar, ColorSelector, ContentPaddingSelector, MaxWidthSelector, PATTERN_PRESETS, PageBuilder, PageBuilderPropertyHeader, PageBuilderSlider, SectionBackgroundPanel, SeoEditor, SettingsPanel, ThemeEditor, VerticalPaddingSelector, createDefaultLayout, createWidgetInstance, ensureRequiredSharedWidgets, getDefaultTheme, getMaxWidthTWClass, getVerticalPaddingTWClass, resolveIcon, withDefaultSettings } from './chunk-HEKBPKGS.js';
4
+ export { EditableBlock, LAYOUT_BLOCK_NAMES, NON_ADDABLE_BLOCK_NAMES, PageRenderer, blockRegistry, generateThemeStyles, getAddableBlocks, getWidget, registerBlock, resolveThemeColor } from './chunk-I2LRKHSL.js';
5
+ import './chunk-LL6CG6KH.js';
6
+ import './chunk-XQE4RVNO.js';
7
7
  export { PageBuilderLinkProvider } from './chunk-QMUIISN3.js';
8
- import './chunk-OEQJQ4OA.js';
8
+ import './chunk-KRQWGGAJ.js';
9
9
  export { getMediaAlt, getMediaUrl } from './chunk-XU7ALPGQ.js';
10
10
  export { loadDataSlots } from './chunk-ATNM5JHI.js';
11
11
  //# sourceMappingURL=index.js.map
@@ -104,6 +104,19 @@ interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof Checkbox
104
104
  }
105
105
  declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
106
106
 
107
+ interface CollapsibleProps {
108
+ summary: React__default.ReactNode;
109
+ children: React__default.ReactNode;
110
+ defaultOpen?: boolean;
111
+ /** `bordered` draws a card-like box; `plain` only the toggle row. */
112
+ variant?: "bordered" | "plain";
113
+ id?: string;
114
+ theme?: ThemeStyle;
115
+ className?: string;
116
+ }
117
+ /** A disclosure built on native `<details>`: works without JavaScript. */
118
+ declare function Collapsible({ summary, children, defaultOpen, variant, id, theme, className, }: CollapsibleProps): React__default.JSX.Element;
119
+
107
120
  interface DialogProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Root> {
108
121
  theme?: ThemeStyle;
109
122
  }
@@ -239,6 +252,15 @@ interface ImageProps extends React__default.ImgHTMLAttributes<HTMLImageElement>
239
252
  }
240
253
  declare const Image: React__default.FC<ImageProps>;
241
254
 
255
+ interface InlineCodeProps extends React__default.HTMLAttributes<HTMLElement> {
256
+ children: React__default.ReactNode;
257
+ theme?: ThemeStyle;
258
+ /** `muted` drops the background, for secondary details like types. */
259
+ variant?: "default" | "muted";
260
+ }
261
+ /** Code inside running text: identifiers, paths, field names and values. */
262
+ declare function InlineCode({ children, theme, variant, className, ...props }: InlineCodeProps): React__default.JSX.Element;
263
+
242
264
  interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
243
265
  theme?: ThemeStyle;
244
266
  error?: boolean;
@@ -260,6 +282,15 @@ interface LinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElemen
260
282
  }
261
283
  declare const Link: React__default.FC<LinkProps>;
262
284
 
285
+ interface NativeSelectProps extends React__default.SelectHTMLAttributes<HTMLSelectElement> {
286
+ theme?: ThemeStyle;
287
+ }
288
+ /**
289
+ * A themed native `<select>`. Use it where a page must stay light (it ships
290
+ * no JavaScript); `Select` is the richer Radix-based control.
291
+ */
292
+ declare const NativeSelect: React__default.ForwardRefExoticComponent<NativeSelectProps & React__default.RefAttributes<HTMLSelectElement>>;
293
+
263
294
  interface PopoverProps extends React$1.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {
264
295
  theme?: ThemeStyle;
265
296
  }
@@ -334,6 +365,42 @@ interface SwitchProps extends React__default.ComponentPropsWithoutRef<typeof Swi
334
365
  }
335
366
  declare const Switch: React__default.ForwardRefExoticComponent<SwitchProps & React__default.RefAttributes<HTMLButtonElement>>;
336
367
 
368
+ interface TableColumn {
369
+ key: string;
370
+ label: string;
371
+ className?: string;
372
+ }
373
+ interface TableProps {
374
+ columns: TableColumn[];
375
+ rows: Record<string, React__default.ReactNode>[];
376
+ theme?: ThemeStyle;
377
+ className?: string;
378
+ }
379
+ /**
380
+ * A themed data table. On narrow screens each row stacks into a block, with
381
+ * the column name shown before every value.
382
+ */
383
+ declare function Table({ columns, rows, theme, className }: TableProps): React__default.JSX.Element;
384
+
385
+ interface TabsItem {
386
+ label: React__default.ReactNode;
387
+ content: React__default.ReactNode;
388
+ }
389
+ interface TabsProps {
390
+ items: TabsItem[];
391
+ /** Accessible name of the tab list. */
392
+ label: string;
393
+ defaultIndex?: number;
394
+ theme?: ThemeStyle;
395
+ className?: string;
396
+ }
397
+ /**
398
+ * Accessible tabs (WAI-ARIA tab pattern with arrow-key navigation). Every
399
+ * panel is rendered, inactive ones `hidden`, so server-rendered content is
400
+ * in the HTML before hydration.
401
+ */
402
+ declare function Tabs({ items, label, defaultIndex, theme, className }: TabsProps): React__default.JSX.Element;
403
+
337
404
  declare const Text1: React__default.FC<TypographyProps & {
338
405
  component?: "p" | "span";
339
406
  }>;
@@ -365,4 +432,4 @@ interface TooltipContentProps extends React$1.ComponentPropsWithoutRef<typeof To
365
432
  }
366
433
  declare const TooltipContent: React$1.ForwardRefExoticComponent<TooltipContentProps & React$1.RefAttributes<HTMLDivElement>>;
367
434
 
368
- export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, Caption, Checkbox, type CheckboxProps, CodeSnippet, type CodeSnippetProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, Display, Drawer, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, DropdownMenuTrigger, Header1, Header2, Header3, Header4, type HeadingProps, type HeadingTag, Image, type ImageProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, PageCard, PageCardContent, type PageCardContentProps, PageCardHeader, type PageCardHeaderProps, PageCardImage, type PageCardImageProps, type PageCardProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, PopoverPortal, type PopoverProps, PopoverTrigger, Preheader, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Section, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, type SeparatorProps, Subheader1, Subheader2, Switch, type SwitchProps, TAILWIND_TEXT_PX, Text1, Text2, Textarea, type TextareaProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, createHeading, fluidFontSize, themes };
435
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, Caption, Checkbox, type CheckboxProps, CodeSnippet, type CodeSnippetProps, Collapsible, type CollapsibleProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, Display, Drawer, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, DropdownMenuTrigger, Header1, Header2, Header3, Header4, type HeadingProps, type HeadingTag, Image, type ImageProps, InlineCode, type InlineCodeProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, NativeSelect, type NativeSelectProps, PageCard, PageCardContent, type PageCardContentProps, PageCardHeader, type PageCardHeaderProps, PageCardImage, type PageCardImageProps, type PageCardProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, PopoverPortal, type PopoverProps, PopoverTrigger, Preheader, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Section, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, type SeparatorProps, Subheader1, Subheader2, Switch, type SwitchProps, TAILWIND_TEXT_PX, Table, type TableColumn, type TableProps, Tabs, type TabsItem, type TabsProps, Text1, Text2, Textarea, type TextareaProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, createHeading, fluidFontSize, themes };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Button2 as Button, Caption, Checkbox, CodeSnippet, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, Drawer, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Header1, Header2, Header3, Header4, Image2 as Image, Input, Label, Link, PageCard, PageCardContent, PageCardHeader, PageCardImage, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Preheader, RadioGroup, RadioGroupItem, Section, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Subheader1, Subheader2, Switch2 as Switch, TAILWIND_TEXT_PX, Text1, Text2, Textarea, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, createHeading, fluidFontSize, themes } from '../chunk-OEQJQ4OA.js';
2
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Button2 as Button, Caption, Checkbox, CodeSnippet, Collapsible, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, Drawer, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Header1, Header2, Header3, Header4, Image2 as Image, InlineCode, Input, Label, Link, NativeSelect, PageCard, PageCardContent, PageCardHeader, PageCardImage, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Preheader, RadioGroup, RadioGroupItem, Section, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Subheader1, Subheader2, Switch2 as Switch, TAILWIND_TEXT_PX, Table, Tabs, Text1, Text2, Textarea, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, createHeading, fluidFontSize, themes } from '../chunk-KRQWGGAJ.js';
3
3
  import '../chunk-XU7ALPGQ.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- export { EditableBlock, PageRenderer, generateThemeStyles, resolveThemeColor } from '../chunk-YXLOVEQZ.js';
3
- import '../chunk-BWOGREWJ.js';
4
- import '../chunk-FZBLE44D.js';
2
+ export { EditableBlock, PageRenderer, generateThemeStyles, resolveThemeColor } from '../chunk-I2LRKHSL.js';
3
+ import '../chunk-LL6CG6KH.js';
4
+ import '../chunk-XQE4RVNO.js';
5
5
  export { PageBuilderLinkProvider } from '../chunk-QMUIISN3.js';
6
- import '../chunk-OEQJQ4OA.js';
6
+ import '../chunk-KRQWGGAJ.js';
7
7
  import '../chunk-XU7ALPGQ.js';
8
8
  //# sourceMappingURL=index.js.map
9
9
  //# sourceMappingURL=index.js.map
@@ -755,7 +755,9 @@ var Section = ({
755
755
  "div",
756
756
  {
757
757
  className: cn(
758
- "mx-auto z-[3] relative overflow-hidden",
758
+ // Clips like overflow-hidden without becoming a scroll
759
+ // container, so sticky children (docs sidebars) still stick.
760
+ "mx-auto z-[3] relative overflow-clip",
759
761
  `lg:${theme?.structure?.page?.width || "max-w-6xl"}`,
760
762
  theme?.structure?.section?.padding?.x || "px-4",
761
763
  theme?.structure?.section?.padding?.y || "py-4"
@@ -2081,7 +2083,7 @@ function FooterWidget({
2081
2083
  tagline && /* @__PURE__ */ jsx25(Text2, { theme: overriddenTheme, children: tagline })
2082
2084
  ] }),
2083
2085
  /* @__PURE__ */ jsx25("div", { className: "flex flex-col flex-wrap gap-8 lg:!flex-row", children: columns.map((column) => /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-3 lg:min-w-[140px]", children: [
2084
- /* @__PURE__ */ jsx25(Header4, { theme: overriddenTheme, className: "text-sm", children: column.title }),
2086
+ /* @__PURE__ */ jsx25(Header4, { theme: overriddenTheme, as: "h2", className: "text-sm", children: column.title }),
2085
2087
  /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-2", children: column.links.map((link) => /* @__PURE__ */ jsx25(NavLink6, { href: link.href, className: "no-underline", children: /* @__PURE__ */ jsx25(Link, { theme: overriddenTheme, className: "text-xs", children: link.label }) }, link.id)) })
2086
2088
  ] }, column.id)) })
2087
2089
  ] }),