@ohhwells/bridge 0.1.69-next.207 → 0.1.69
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.
- package/dist/index.cjs +1173 -2144
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -22
- package/dist/index.d.ts +13 -22
- package/dist/index.js +1212 -2182
- package/dist/index.js.map +1 -1
- package/dist/styles.css +506 -518
- package/package.json +1 -6
- package/dist/pages.cjs +0 -141
- package/dist/pages.cjs.map +0 -1
- package/dist/pages.d.cts +0 -45
- package/dist/pages.d.ts +0 -45
- package/dist/pages.js +0 -107
- package/dist/pages.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import { Ref, ReactNode, DragEvent, PointerEvent } from 'react';
|
|
2
|
+
import React__default, { Ref, ReactNode, DragEvent, PointerEvent } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
import { Toggle as Toggle$1, DropdownMenu as DropdownMenu$1, Tooltip as Tooltip$1 } from 'radix-ui';
|
|
7
7
|
|
|
8
|
-
declare function OhhwellsBridge():
|
|
8
|
+
declare function OhhwellsBridge(): React__default.ReactPortal | null;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* AI layout-tree contract — the bridge-side vocabulary for rendering
|
|
@@ -20,7 +20,7 @@ declare function OhhwellsBridge(): react_jsx_runtime.JSX.Element;
|
|
|
20
20
|
*/
|
|
21
21
|
declare const AI_TREE_SCHEMA_VERSIONS: readonly [1];
|
|
22
22
|
type SectionScaffold = 'stacked' | 'split' | 'overlay';
|
|
23
|
-
type AiBlockType = 'text' | 'button' | 'media' | 'media-list' | 'rating' | 'divider' | 'input' | 'section-header' | 'button-row' | 'card' | 'collection' | 'accordion' | 'form' | 'embed' | 'schedule-widget'
|
|
23
|
+
type AiBlockType = 'text' | 'button' | 'media' | 'media-list' | 'rating' | 'divider' | 'input' | 'section-header' | 'button-row' | 'card' | 'collection' | 'accordion' | 'form' | 'embed' | 'schedule-widget';
|
|
24
24
|
interface AiBlockNode {
|
|
25
25
|
type: AiBlockType;
|
|
26
26
|
span: number;
|
|
@@ -44,10 +44,6 @@ interface AiSectionSettings {
|
|
|
44
44
|
verticalPosition?: 'top' | 'center';
|
|
45
45
|
overlayIntensity?: 'low' | 'medium' | 'high';
|
|
46
46
|
backgroundMedia?: string;
|
|
47
|
-
/** Tinted band behind the section, resolved against the brand tokens. */
|
|
48
|
-
sectionBackground?: 'default' | 'surface' | 'accent' | 'accent-soft';
|
|
49
|
-
/** Vertical distribution of column content (stacked/split scaffolds). */
|
|
50
|
-
textDistribution?: 'top' | 'center' | 'space-between';
|
|
51
47
|
}
|
|
52
48
|
interface AiLayoutTree {
|
|
53
49
|
schemaVersion: number;
|
|
@@ -253,7 +249,7 @@ declare function filterAvailablePages(pages: LinkPage[], existingTargets: string
|
|
|
253
249
|
|
|
254
250
|
declare const toggleVariants: (props?: ({
|
|
255
251
|
variant?: "default" | "outline" | null | undefined;
|
|
256
|
-
size?: "default" | "
|
|
252
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
257
253
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
258
254
|
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
259
255
|
|
|
@@ -271,7 +267,7 @@ declare function SchedulingWidget({ notifyOnConnect, initialScheduleId, insertAf
|
|
|
271
267
|
notifyOnConnect?: boolean;
|
|
272
268
|
initialScheduleId?: string | null;
|
|
273
269
|
insertAfter?: string;
|
|
274
|
-
}): react_jsx_runtime.JSX.Element;
|
|
270
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
275
271
|
|
|
276
272
|
declare const DragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
277
273
|
|
|
@@ -384,7 +380,12 @@ type ItemInteractionLayerProps = {
|
|
|
384
380
|
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, toolbarBelowRect, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, onItemPointerDown, onItemClick, itemDragSurface, chromeGap, toolbarAlign, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
385
381
|
|
|
386
382
|
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime.JSX.Element;
|
|
387
|
-
|
|
383
|
+
/**
|
|
384
|
+
* Forwards its ref, because it is itself wrapped: the More button is a menu trigger inside a
|
|
385
|
+
* tooltip trigger, and the outer one hands a ref down through `asChild`. A plain function
|
|
386
|
+
* component drops it, and React says so on every render of the toolbar.
|
|
387
|
+
*/
|
|
388
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenu$1.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
388
389
|
declare function DropdownMenuGroup({ className, ...props }: React.ComponentProps<typeof DropdownMenu$1.Group>): react_jsx_runtime.JSX.Element;
|
|
389
390
|
/**
|
|
390
391
|
* Figma Dropdown Menu (4:6588 / 8202:1581):
|
|
@@ -412,16 +413,6 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
|
|
|
412
413
|
hideArrow?: boolean;
|
|
413
414
|
}): react_jsx_runtime.JSX.Element;
|
|
414
415
|
|
|
415
|
-
interface EmptySectionProps {
|
|
416
|
-
title: string;
|
|
417
|
-
homeHref?: string;
|
|
418
|
-
/** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
|
|
419
|
-
eyebrowKey?: string;
|
|
420
|
-
titleKey?: string;
|
|
421
|
-
subtitleKey?: string;
|
|
422
|
-
}
|
|
423
|
-
declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
|
|
424
|
-
|
|
425
416
|
declare function isEditSessionActive(): boolean;
|
|
426
417
|
|
|
427
418
|
type CarouselSlide = {
|
|
@@ -445,4 +436,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
|
|
|
445
436
|
bind: Record<string, string>;
|
|
446
437
|
};
|
|
447
438
|
|
|
448
|
-
export { AI_DEFAULT_BRAND, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, type CarouselSlide, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger,
|
|
439
|
+
export { AI_DEFAULT_BRAND, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, type CarouselSlide, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, type SectionScaffold, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, dropIndicatorVariants, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isRenderableTree, isValidUrl, parseTarget, toggleVariants, useOhwCarousel, validateUrlInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
import { Ref, ReactNode, DragEvent, PointerEvent } from 'react';
|
|
2
|
+
import React__default, { Ref, ReactNode, DragEvent, PointerEvent } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
import { Toggle as Toggle$1, DropdownMenu as DropdownMenu$1, Tooltip as Tooltip$1 } from 'radix-ui';
|
|
7
7
|
|
|
8
|
-
declare function OhhwellsBridge():
|
|
8
|
+
declare function OhhwellsBridge(): React__default.ReactPortal | null;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* AI layout-tree contract — the bridge-side vocabulary for rendering
|
|
@@ -20,7 +20,7 @@ declare function OhhwellsBridge(): react_jsx_runtime.JSX.Element;
|
|
|
20
20
|
*/
|
|
21
21
|
declare const AI_TREE_SCHEMA_VERSIONS: readonly [1];
|
|
22
22
|
type SectionScaffold = 'stacked' | 'split' | 'overlay';
|
|
23
|
-
type AiBlockType = 'text' | 'button' | 'media' | 'media-list' | 'rating' | 'divider' | 'input' | 'section-header' | 'button-row' | 'card' | 'collection' | 'accordion' | 'form' | 'embed' | 'schedule-widget'
|
|
23
|
+
type AiBlockType = 'text' | 'button' | 'media' | 'media-list' | 'rating' | 'divider' | 'input' | 'section-header' | 'button-row' | 'card' | 'collection' | 'accordion' | 'form' | 'embed' | 'schedule-widget';
|
|
24
24
|
interface AiBlockNode {
|
|
25
25
|
type: AiBlockType;
|
|
26
26
|
span: number;
|
|
@@ -44,10 +44,6 @@ interface AiSectionSettings {
|
|
|
44
44
|
verticalPosition?: 'top' | 'center';
|
|
45
45
|
overlayIntensity?: 'low' | 'medium' | 'high';
|
|
46
46
|
backgroundMedia?: string;
|
|
47
|
-
/** Tinted band behind the section, resolved against the brand tokens. */
|
|
48
|
-
sectionBackground?: 'default' | 'surface' | 'accent' | 'accent-soft';
|
|
49
|
-
/** Vertical distribution of column content (stacked/split scaffolds). */
|
|
50
|
-
textDistribution?: 'top' | 'center' | 'space-between';
|
|
51
47
|
}
|
|
52
48
|
interface AiLayoutTree {
|
|
53
49
|
schemaVersion: number;
|
|
@@ -253,7 +249,7 @@ declare function filterAvailablePages(pages: LinkPage[], existingTargets: string
|
|
|
253
249
|
|
|
254
250
|
declare const toggleVariants: (props?: ({
|
|
255
251
|
variant?: "default" | "outline" | null | undefined;
|
|
256
|
-
size?: "default" | "
|
|
252
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
257
253
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
258
254
|
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
259
255
|
|
|
@@ -271,7 +267,7 @@ declare function SchedulingWidget({ notifyOnConnect, initialScheduleId, insertAf
|
|
|
271
267
|
notifyOnConnect?: boolean;
|
|
272
268
|
initialScheduleId?: string | null;
|
|
273
269
|
insertAfter?: string;
|
|
274
|
-
}): react_jsx_runtime.JSX.Element;
|
|
270
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
275
271
|
|
|
276
272
|
declare const DragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
277
273
|
|
|
@@ -384,7 +380,12 @@ type ItemInteractionLayerProps = {
|
|
|
384
380
|
declare function ItemInteractionLayer({ rect, state, elRef, toolbar, toolbarBelowRect, showHandle, dragDisabled, dragHandleLabel, onDragHandleDragStart, onDragHandleDragEnd, onItemPointerDown, onItemClick, itemDragSurface, chromeGap, toolbarAlign, className, }: ItemInteractionLayerProps): react_jsx_runtime.JSX.Element | null;
|
|
385
381
|
|
|
386
382
|
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime.JSX.Element;
|
|
387
|
-
|
|
383
|
+
/**
|
|
384
|
+
* Forwards its ref, because it is itself wrapped: the More button is a menu trigger inside a
|
|
385
|
+
* tooltip trigger, and the outer one hands a ref down through `asChild`. A plain function
|
|
386
|
+
* component drops it, and React says so on every render of the toolbar.
|
|
387
|
+
*/
|
|
388
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenu$1.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
388
389
|
declare function DropdownMenuGroup({ className, ...props }: React.ComponentProps<typeof DropdownMenu$1.Group>): react_jsx_runtime.JSX.Element;
|
|
389
390
|
/**
|
|
390
391
|
* Figma Dropdown Menu (4:6588 / 8202:1581):
|
|
@@ -412,16 +413,6 @@ declare function TooltipContent({ className, sideOffset, side, children, hideArr
|
|
|
412
413
|
hideArrow?: boolean;
|
|
413
414
|
}): react_jsx_runtime.JSX.Element;
|
|
414
415
|
|
|
415
|
-
interface EmptySectionProps {
|
|
416
|
-
title: string;
|
|
417
|
-
homeHref?: string;
|
|
418
|
-
/** data-ohw-key values for the editable text nodes — omit a key to leave that node non-editable. */
|
|
419
|
-
eyebrowKey?: string;
|
|
420
|
-
titleKey?: string;
|
|
421
|
-
subtitleKey?: string;
|
|
422
|
-
}
|
|
423
|
-
declare function EmptySection({ title, homeHref, eyebrowKey, titleKey, subtitleKey }: EmptySectionProps): react_jsx_runtime.JSX.Element;
|
|
424
|
-
|
|
425
416
|
declare function isEditSessionActive(): boolean;
|
|
426
417
|
|
|
427
418
|
type CarouselSlide = {
|
|
@@ -445,4 +436,4 @@ declare function useOhwCarousel(key: string, initial: CarouselSlide[]): {
|
|
|
445
436
|
bind: Record<string, string>;
|
|
446
437
|
};
|
|
447
438
|
|
|
448
|
-
export { AI_DEFAULT_BRAND, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, type CarouselSlide, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger,
|
|
439
|
+
export { AI_DEFAULT_BRAND, AI_TREE_SCHEMA_VERSIONS, AI_TREE_TOKENS, type AiBlockNode, type AiBrandKit, type AiLayoutTree, AiTreeRenderer, type AiTreeRendererProps, type CarouselSlide, CustomToolbar, CustomToolbarButton, CustomToolbarDivider, DragHandle, DropIndicator, type DropIndicatorProps, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, ItemActionToolbar, type ItemActionToolbarProps, ItemInteractionLayer, type ItemInteractionLayerProps, type ItemInteractionState, LinkEditorPanel, type LinkModalMode, type LinkModalProps, type LinkPage, LinkPopover, type LinkSection, OhhwellsBridge, SchedulingWidget, type SectionScaffold, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buildTarget, dropIndicatorVariants, filterAvailablePages, getEditModeInitialState, isEditSessionActive, isRenderableTree, isValidUrl, parseTarget, toggleVariants, useOhwCarousel, validateUrlInput };
|