@ankhorage/zora 4.2.2 → 4.3.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.
- package/CHANGELOG.md +18 -0
- package/README.md +2 -1
- package/dist/components/button/resolveButtonThemeRecipe.d.ts +1 -1
- package/dist/corePlugin.d.ts +4 -0
- package/dist/corePlugin.d.ts.map +1 -0
- package/dist/corePlugin.js +8 -0
- package/dist/corePlugin.js.map +1 -0
- package/dist/corePluginMetadata.d.ts +3 -0
- package/dist/corePluginMetadata.d.ts.map +1 -0
- package/dist/corePluginMetadata.js +31 -0
- package/dist/corePluginMetadata.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/metadata/index.d.ts +3 -0
- package/dist/metadata/index.d.ts.map +1 -1
- package/dist/metadata/index.js +2 -0
- package/dist/metadata/index.js.map +1 -1
- package/dist/metadata/types.d.ts +2 -1
- package/dist/metadata/types.d.ts.map +1 -1
- package/dist/metadata/types.js.map +1 -1
- package/dist/pluginComposition.d.ts +45 -0
- package/dist/pluginComposition.d.ts.map +1 -0
- package/dist/pluginComposition.js +153 -0
- package/dist/pluginComposition.js.map +1 -0
- package/package.json +6 -6
- package/src/corePlugin.ts +9 -0
- package/src/corePluginMetadata.ts +44 -0
- package/src/index.ts +15 -0
- package/src/metadata/index.ts +7 -0
- package/src/metadata/types.ts +2 -0
- package/src/pluginComposition.test.ts +141 -0
- package/src/pluginComposition.ts +278 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2007c3d: Add the canonical ZORA plugin descriptor and deterministic runtime/authoring catalog composer.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- f203d10: Update Ankhorage dependencies: `@ankhorage/surface`.
|
|
12
|
+
- 6182ab7: Update Ankhorage dependencies: `@ankhorage/contracts`.
|
|
13
|
+
- 31c23d2: Update Ankhorage dependencies: `@ankhorage/contracts`.
|
|
14
|
+
|
|
15
|
+
## 4.2.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- bb3eccb: Update Ankhorage dependencies: `@ankhorage/surface`.
|
|
20
|
+
|
|
3
21
|
## 4.2.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# ZORA
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.
|
|
9
9
|
|
|
@@ -58,6 +58,7 @@ export default function BasicApp() {
|
|
|
58
58
|
- [Architecture overview](././paradox/diagrams/architecture-overview.mmd)
|
|
59
59
|
- [Module relationships](././paradox/diagrams/module-relationships.mmd)
|
|
60
60
|
- [Export graph](././paradox/diagrams/export-graph.mmd)
|
|
61
|
+
- [compileZoraTheme sequence](././paradox/diagrams/sequences/compile-zora-theme.mmd)
|
|
61
62
|
- [createZoraThemeConfig sequence](././paradox/diagrams/sequences/create-zora-theme-config.mmd)
|
|
62
63
|
- [resolveAvatarInitials sequence](././paradox/diagrams/sequences/resolve-avatar-initials.mmd)
|
|
63
64
|
- [resolveOAuthProviderIcon sequence](././paradox/diagrams/sequences/resolve-oauth-provider-icon.mmd)
|
|
@@ -5,5 +5,5 @@ export declare function resolveButtonThemeRecipe(input: {
|
|
|
5
5
|
readonly variant?: ZoraButtonVariant;
|
|
6
6
|
readonly size?: ZoraControlSize;
|
|
7
7
|
readonly themeFields: Readonly<Record<string, ThemeRecipeOverrideValue>>;
|
|
8
|
-
}): Pick<import("@ankhorage/surface").ButtonProps, "
|
|
8
|
+
}): Pick<import("@ankhorage/surface").ButtonProps, "color" | "variant" | "size">;
|
|
9
9
|
//# sourceMappingURL=resolveButtonThemeRecipe.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ZoraPluginDescriptor } from './pluginComposition';
|
|
2
|
+
/*** Describe the complete ZORA core runtime and authoring surface through the public plugin contract. */
|
|
3
|
+
export declare const ZORA_CORE_PLUGIN: ZoraPluginDescriptor;
|
|
4
|
+
//# sourceMappingURL=corePlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corePlugin.d.ts","sourceRoot":"","sources":["../src/corePlugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,yGAAyG;AACzG,eAAO,MAAM,gBAAgB,EAAE,oBAG9B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';
|
|
2
|
+
import { ZORA_COMPONENT_REGISTRY } from './registry';
|
|
3
|
+
/*** Describe the complete ZORA core runtime and authoring surface through the public plugin contract. */
|
|
4
|
+
export const ZORA_CORE_PLUGIN = {
|
|
5
|
+
...ZORA_CORE_PLUGIN_METADATA,
|
|
6
|
+
componentRegistry: ZORA_COMPONENT_REGISTRY,
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=corePlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corePlugin.js","sourceRoot":"","sources":["../src/corePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,yGAAyG;AACzG,MAAM,CAAC,MAAM,gBAAgB,GAAyB;IACpD,GAAG,yBAAyB;IAC5B,iBAAiB,EAAE,uBAAuB;CAC3C,CAAC","sourcesContent":["import { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';\nimport type { ZoraPluginDescriptor } from './pluginComposition';\nimport { ZORA_COMPONENT_REGISTRY } from './registry';\n\n/*** Describe the complete ZORA core runtime and authoring surface through the public plugin contract. */\nexport const ZORA_CORE_PLUGIN: ZoraPluginDescriptor = {\n ...ZORA_CORE_PLUGIN_METADATA,\n componentRegistry: ZORA_COMPONENT_REGISTRY,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corePluginMetadata.d.ts","sourceRoot":"","sources":["../src/corePluginMetadata.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAgB9D,eAAO,MAAM,yBAAyB,EAAE,kBAKvC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ZORA_BINDABLE_COMPONENT_META } from './metadata/bindableComponentMeta';
|
|
2
|
+
import { ZORA_COMPONENT_META } from './metadata/componentMeta';
|
|
3
|
+
const CORE_EXTENSION_HOSTS = [
|
|
4
|
+
'Box',
|
|
5
|
+
'Card',
|
|
6
|
+
'Container',
|
|
7
|
+
'Grid',
|
|
8
|
+
'MessageBubble',
|
|
9
|
+
'Notice',
|
|
10
|
+
'Panel',
|
|
11
|
+
'PostCard',
|
|
12
|
+
'Screen',
|
|
13
|
+
'ScreenSection',
|
|
14
|
+
'Stack',
|
|
15
|
+
];
|
|
16
|
+
export const ZORA_CORE_PLUGIN_METADATA = {
|
|
17
|
+
packageName: '@ankhorage/zora',
|
|
18
|
+
displayName: 'ZORA',
|
|
19
|
+
componentMeta: mergeBindableMeta(ZORA_COMPONENT_META, ZORA_BINDABLE_COMPONENT_META),
|
|
20
|
+
extensionHosts: CORE_EXTENSION_HOSTS,
|
|
21
|
+
};
|
|
22
|
+
function mergeBindableMeta(componentMeta, bindableMeta) {
|
|
23
|
+
const bindingsByComponent = new Map(Object.entries(bindableMeta).map(([componentName, meta]) => [componentName, meta.bindings]));
|
|
24
|
+
return Object.fromEntries(Object.entries(componentMeta).map(([componentName, meta]) => [
|
|
25
|
+
componentName,
|
|
26
|
+
bindingsByComponent.get(componentName)
|
|
27
|
+
? { ...meta, bindings: bindingsByComponent.get(componentName) }
|
|
28
|
+
: meta,
|
|
29
|
+
]));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=corePluginMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corePluginMetadata.js","sourceRoot":"","sources":["../src/corePluginMetadata.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,oBAAoB,GAAG;IAC3B,KAAK;IACL,MAAM;IACN,WAAW;IACX,MAAM;IACN,eAAe;IACf,QAAQ;IACR,OAAO;IACP,UAAU;IACV,QAAQ;IACR,eAAe;IACf,OAAO;CACC,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAuB;IAC3D,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,iBAAiB,CAAC,mBAAmB,EAAE,4BAA4B,CAAC;IACnF,cAAc,EAAE,oBAAoB;CACrC,CAAC;AAEF,SAAS,iBAAiB,CACxB,aAAwC,EACxC,YAAqC;IAErC,MAAM,mBAAmB,GAAG,IAAI,GAAG,CACjC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAC5F,CAAC;IACF,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3D,aAAa;QACb,mBAAmB,CAAC,GAAG,CAAC,aAAa,CAAC;YACpC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,mBAAmB,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE;YAC/D,CAAC,CAAC,IAAI;KACT,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import type { UiComponentMetaRegistry } from '@ankhorage/contracts';\n\nimport { ZORA_BINDABLE_COMPONENT_META } from './metadata/bindableComponentMeta';\nimport { ZORA_COMPONENT_META } from './metadata/componentMeta';\nimport type { ZoraComponentMetaRegistry } from './metadata/types';\nimport type { ZoraPluginMetadata } from './pluginComposition';\n\nconst CORE_EXTENSION_HOSTS = [\n 'Box',\n 'Card',\n 'Container',\n 'Grid',\n 'MessageBubble',\n 'Notice',\n 'Panel',\n 'PostCard',\n 'Screen',\n 'ScreenSection',\n 'Stack',\n] as const;\n\nexport const ZORA_CORE_PLUGIN_METADATA: ZoraPluginMetadata = {\n packageName: '@ankhorage/zora',\n displayName: 'ZORA',\n componentMeta: mergeBindableMeta(ZORA_COMPONENT_META, ZORA_BINDABLE_COMPONENT_META),\n extensionHosts: CORE_EXTENSION_HOSTS,\n};\n\nfunction mergeBindableMeta(\n componentMeta: ZoraComponentMetaRegistry,\n bindableMeta: UiComponentMetaRegistry,\n): ZoraComponentMetaRegistry {\n const bindingsByComponent = new Map(\n Object.entries(bindableMeta).map(([componentName, meta]) => [componentName, meta.bindings]),\n );\n return Object.fromEntries(\n Object.entries(componentMeta).map(([componentName, meta]) => [\n componentName,\n bindingsByComponent.get(componentName)\n ? { ...meta, bindings: bindingsByComponent.get(componentName) }\n : meta,\n ]),\n );\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,8 @@ export type { ToastOptions, ToastProps, ToastProviderProps, ToastStatus } from '
|
|
|
82
82
|
export { Toast, ToastProvider, useToast } from './components/toast';
|
|
83
83
|
export type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';
|
|
84
84
|
export { Toolbar, ToolbarAction } from './components/toolbar';
|
|
85
|
+
export { ZORA_CORE_PLUGIN } from './corePlugin';
|
|
86
|
+
export { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';
|
|
85
87
|
export type { BoxProps, CenterProps, ContainerProps, DividerProps, GridProps, InlineProps, ShowProps, SpacerProps, StackProps, SurfaceProps, SurfaceVariant, } from './foundation';
|
|
86
88
|
export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from './foundation';
|
|
87
89
|
export type { ZoraColor, ZoraEmphasis, ZoraPaletteColor, ZoraStatusColor, } from './internal/colorModel';
|
|
@@ -164,6 +166,8 @@ export type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';
|
|
|
164
166
|
export { ZoraDrawerContent } from './patterns/zora-drawer-content';
|
|
165
167
|
export type { ZoraTabBarProps } from './patterns/zora-tab-bar';
|
|
166
168
|
export { ZoraTabBar } from './patterns/zora-tab-bar';
|
|
169
|
+
export type { ComposedZoraPluginCatalog, ComposedZoraPluginMetadataCatalog, ZoraPluginCompositionErrorCode, ZoraPluginDescriptor, ZoraPluginMetadata, ZoraPluginPlacement, } from './pluginComposition';
|
|
170
|
+
export { composeZoraPluginMetadata, composeZoraPlugins, ZoraPluginCompositionError, } from './pluginComposition';
|
|
167
171
|
export type { ZoraComponentRegistry } from './registry';
|
|
168
172
|
export { ZORA_COMPONENT_REGISTRY } from './registry';
|
|
169
173
|
export * from './theme';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACzE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,MA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CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EACV,yBAAyB,EACzB,iCAAiC,EACjC,8BAA8B,EAC9B,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,8 @@ export { Textarea } from './components/textarea';
|
|
|
40
40
|
export { TimePicker } from './components/time-picker';
|
|
41
41
|
export { Toast, ToastProvider, useToast } from './components/toast';
|
|
42
42
|
export { Toolbar, ToolbarAction } from './components/toolbar';
|
|
43
|
+
export { ZORA_CORE_PLUGIN } from './corePlugin';
|
|
44
|
+
export { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';
|
|
43
45
|
export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from './foundation';
|
|
44
46
|
export { ZORA_COLORS, ZORA_EMPHASES, ZORA_PALETTE_COLORS, ZORA_STATUS_COLORS, } from './internal/colorModel';
|
|
45
47
|
export { AppShell } from './layout/app-shell';
|
|
@@ -81,6 +83,7 @@ export { Timeline } from './patterns/timeline';
|
|
|
81
83
|
export { TreeItem, TreeView } from './patterns/tree-view';
|
|
82
84
|
export { ZoraDrawerContent } from './patterns/zora-drawer-content';
|
|
83
85
|
export { ZoraTabBar } from './patterns/zora-tab-bar';
|
|
86
|
+
export { composeZoraPluginMetadata, composeZoraPlugins, ZoraPluginCompositionError, } from './pluginComposition';
|
|
84
87
|
export { ZORA_COMPONENT_REGISTRY } from './registry';
|
|
85
88
|
export * from './theme';
|
|
86
89
|
//# sourceMappingURL=index.js.map
|
package/dist/index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,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,cAAc,SAAS,CAAC","sourcesContent":["export type { ActionSheetItemProps, ActionSheetProps } from './components/action-sheet';\nexport { ActionSheet, ActionSheetItem } from './components/action-sheet';\nexport type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';\nexport { AppBar } from './components/app-bar';\nexport type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { BreadcrumbItem, BreadcrumbsProps } from './components/breadcrumbs';\nexport { Breadcrumbs } from './components/breadcrumbs';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type {\n ButtonGroupAlign,\n ButtonGroupOrientation,\n ButtonGroupProps,\n} from './components/button-group';\nexport { ButtonGroup } from './components/button-group';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type {\n DataTableCellContext,\n DataTableColumn,\n DataTableColumnAlign,\n DataTableDensity,\n DataTableProps,\n DataTableRowAction,\n DataTableSortDirection,\n DataTableSortState,\n} from './components/data-table';\nexport { DataTable } from './components/data-table';\nexport type { DatePickerProps, DatePickerValue } from './components/date-picker';\nexport { DatePicker } from './components/date-picker';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n GradientColor,\n GradientColors,\n GradientLocations,\n GradientPoint,\n GradientProps,\n GradientRenderer,\n GradientRendererProps,\n GradientRendererProviderProps,\n} from './components/gradient';\nexport { Gradient, GradientRendererProvider } from './components/gradient';\nexport type {\n HeadingAlign,\n HeadingColor,\n HeadingEmphasis,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './components/image';\nexport { Image } from './components/image';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';\nexport { DropdownMenu, Menu } from './components/menu';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { PaginationProps } from './components/pagination';\nexport { Pagination } from './components/pagination';\nexport type { ProgressProps, ProgressRingProps } from './components/progress';\nexport { Progress, ProgressRing } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type {\n SkeletonCardProps,\n SkeletonDimension,\n SkeletonListProps,\n SkeletonListVariant,\n SkeletonProps,\n SkeletonRadius,\n SkeletonTextProps,\n} from './components/skeleton';\nexport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './components/skeleton';\nexport type { SplashScreenLogoShape, SplashScreenProps } from './components/splash-screen';\nexport { SplashScreen } from './components/splash-screen';\nexport type { TabItem, TabsProps, TabsVariant } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type {\n TextAlign,\n TextColor,\n TextEmphasis,\n TextProps,\n TextVariant,\n TextWeight,\n} from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { TimePickerProps, TimePickerValue } from './components/time-picker';\nexport { TimePicker } from './components/time-picker';\nexport type { ToastOptions, ToastProps, ToastProviderProps, ToastStatus } from './components/toast';\nexport { Toast, ToastProvider, useToast } from './components/toast';\nexport type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type {\n ZoraColor,\n ZoraEmphasis,\n ZoraPaletteColor,\n ZoraStatusColor,\n} from './internal/colorModel';\nexport {\n ZORA_COLORS,\n ZORA_EMPHASES,\n ZORA_PALETTE_COLORS,\n ZORA_STATUS_COLORS,\n} from './internal/colorModel';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { ScreenProps } from './layout/screen';\nexport { Screen } from './layout/screen';\nexport type { ScreenSectionProps } from './layout/screen-section';\nexport { ScreenSection } from './layout/screen-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n ZoraBindableComponentType,\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentManifestPolicy,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropAuthoring,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n ZoraThemeRecipeBooleanFieldMeta,\n ZoraThemeRecipeChoiceFieldMeta,\n ZoraThemeRecipeFieldMeta,\n ZoraThemeRecipeKind,\n ZoraThemeRecipeMeta,\n ZoraThemeRecipeMetaRegistry,\n ZoraThemeRecipeTokenFieldMeta,\n ZoraThemeTokenFamily,\n} from './metadata';\nexport {\n ZORA_BINDABLE_COMPONENT_META,\n ZORA_COMPONENT_META,\n ZORA_THEME_RECIPE_META,\n ZORA_THEME_TOKEN_FAMILIES,\n} from './metadata';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OAuthProviderButtonProps,\n OAuthProviderIconSpec,\n OAuthProviderItem,\n OAuthProviderListLayout,\n OAuthProviderListProps,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport {\n DEFAULT_OAUTH_PROVIDER_ICONS,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n resolveOAuthProviderIcon,\n resolveOAuthProviderLabel,\n SignInForm,\n SignUpForm,\n} from './patterns/auth';\nexport type { ChatListAvatar, ChatListItemProps } from './patterns/chat-list-item';\nexport { ChatListItem } from './patterns/chat-list-item';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type {\n ContentRailControlPressEvent,\n ContentRailDirection,\n ContentRailItemSize,\n ContentRailMotion,\n ContentRailProps,\n ContentRailSpacing,\n ContentRailVisibleRangeChangeEvent,\n} from './patterns/content-rail';\nexport { ContentRail } from './patterns/content-rail';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { HeroAction, HeroAlign, HeroLayout, HeroProps, HeroTone } from './patterns/hero';\nexport { Hero } from './patterns/hero';\nexport type {\n ImagePreviewProps,\n ZoraImageAsset,\n ZoraImageMetadata,\n} from './patterns/image-preview';\nexport { ImagePreview } from './patterns/image-preview';\nexport type {\n ImageUploadFieldProps,\n ImageUploadProgressContext,\n ZoraPickedImage,\n} from './patterns/image-upload-field';\nexport { ImageUploadField } from './patterns/image-upload-field';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type {\n MessageBubbleAuthor,\n MessageBubbleAvatar,\n MessageBubbleDirection,\n MessageBubbleProps,\n MessageBubbleStatus,\n} from './patterns/message-bubble';\nexport { MessageBubble } from './patterns/message-bubble';\nexport type { MissingElementProps } from './patterns/missing-element';\nexport { MissingElement } from './patterns/missing-element';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type {\n PostAction,\n PostAuthor,\n PostAuthorAvatar,\n PostCardMedia,\n PostCardProps,\n} from './patterns/post-card';\nexport { PostCard } from './patterns/post-card';\nexport type { ProductCardProps } from './patterns/product-card';\nexport { ProductCard } from './patterns/product-card';\nexport type {\n ReaderColorScheme,\n ReaderDocumentFormat,\n ReaderErrorCode,\n ReaderErrorEvent,\n ReaderExternalLinkEvent,\n ReaderLineHeight,\n ReaderLocationChangeEvent,\n ReaderNavigationTrigger,\n ReaderResolvedSource,\n ReaderStatus,\n ReaderSurfaceProps,\n} from './patterns/reader';\nexport { ReaderSurface, resolveReaderProgress } from './patterns/reader';\nexport type {\n ResponsivePanelDesktopMode,\n ResponsivePanelMobileMode,\n ResponsivePanelProps,\n ResponsivePanelScroll,\n ResponsivePanelSide,\n ResponsivePanelSize,\n} from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type {\n BarcodeScannerViewProps,\n BarcodeScanResult,\n CameraPermissionStatus,\n CameraPermissionViewProps,\n ScanOverlayProps,\n} from './patterns/scanner';\nexport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionMode,\n SelectionProviderProps,\n SelectionTrigger,\n UseSelectionResult,\n} from './patterns/selection';\nexport { SelectableItem, SelectionProvider, useSelection } from './patterns/selection';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport type { ZoraComponentRegistry } from './registry';\nexport { ZORA_COMPONENT_REGISTRY } from './registry';\nexport * from './theme';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,IAAI,EAA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AK,EAAE,MAAM,kBAAkB,CAAC;AAQzC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AActD,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AASzE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAQ9D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE3F,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAS1D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEvF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AASrD,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,cAAc,SAAS,CAAC","sourcesContent":["export type { ActionSheetItemProps, ActionSheetProps } from './components/action-sheet';\nexport { ActionSheet, ActionSheetItem } from './components/action-sheet';\nexport type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';\nexport { AppBar } from './components/app-bar';\nexport type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { BreadcrumbItem, BreadcrumbsProps } from './components/breadcrumbs';\nexport { Breadcrumbs } from './components/breadcrumbs';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type {\n ButtonGroupAlign,\n ButtonGroupOrientation,\n ButtonGroupProps,\n} from './components/button-group';\nexport { ButtonGroup } from './components/button-group';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type {\n DataTableCellContext,\n DataTableColumn,\n DataTableColumnAlign,\n DataTableDensity,\n DataTableProps,\n DataTableRowAction,\n DataTableSortDirection,\n DataTableSortState,\n} from './components/data-table';\nexport { DataTable } from './components/data-table';\nexport type { DatePickerProps, DatePickerValue } from './components/date-picker';\nexport { DatePicker } from './components/date-picker';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n GradientColor,\n GradientColors,\n GradientLocations,\n GradientPoint,\n GradientProps,\n GradientRenderer,\n GradientRendererProps,\n GradientRendererProviderProps,\n} from './components/gradient';\nexport { Gradient, GradientRendererProvider } from './components/gradient';\nexport type {\n HeadingAlign,\n HeadingColor,\n HeadingEmphasis,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './components/image';\nexport { Image } from './components/image';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';\nexport { DropdownMenu, Menu } from './components/menu';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { PaginationProps } from './components/pagination';\nexport { Pagination } from './components/pagination';\nexport type { ProgressProps, ProgressRingProps } from './components/progress';\nexport { Progress, ProgressRing } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type {\n SkeletonCardProps,\n SkeletonDimension,\n SkeletonListProps,\n SkeletonListVariant,\n SkeletonProps,\n SkeletonRadius,\n SkeletonTextProps,\n} from './components/skeleton';\nexport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './components/skeleton';\nexport type { SplashScreenLogoShape, SplashScreenProps } from './components/splash-screen';\nexport { SplashScreen } from './components/splash-screen';\nexport type { TabItem, TabsProps, TabsVariant } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type {\n TextAlign,\n TextColor,\n TextEmphasis,\n TextProps,\n TextVariant,\n TextWeight,\n} from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { TimePickerProps, TimePickerValue } from './components/time-picker';\nexport { TimePicker } from './components/time-picker';\nexport type { ToastOptions, ToastProps, ToastProviderProps, ToastStatus } from './components/toast';\nexport { Toast, ToastProvider, useToast } from './components/toast';\nexport type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport { ZORA_CORE_PLUGIN } from './corePlugin';\nexport { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type {\n ZoraColor,\n ZoraEmphasis,\n ZoraPaletteColor,\n ZoraStatusColor,\n} from './internal/colorModel';\nexport {\n ZORA_COLORS,\n ZORA_EMPHASES,\n ZORA_PALETTE_COLORS,\n ZORA_STATUS_COLORS,\n} from './internal/colorModel';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { ScreenProps } from './layout/screen';\nexport { Screen } from './layout/screen';\nexport type { ScreenSectionProps } from './layout/screen-section';\nexport { ScreenSection } from './layout/screen-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n ZoraBindableComponentType,\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentManifestPolicy,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropAuthoring,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n ZoraThemeRecipeBooleanFieldMeta,\n ZoraThemeRecipeChoiceFieldMeta,\n ZoraThemeRecipeFieldMeta,\n ZoraThemeRecipeKind,\n ZoraThemeRecipeMeta,\n ZoraThemeRecipeMetaRegistry,\n ZoraThemeRecipeTokenFieldMeta,\n ZoraThemeTokenFamily,\n} from './metadata';\nexport {\n ZORA_BINDABLE_COMPONENT_META,\n ZORA_COMPONENT_META,\n ZORA_THEME_RECIPE_META,\n ZORA_THEME_TOKEN_FAMILIES,\n} from './metadata';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OAuthProviderButtonProps,\n OAuthProviderIconSpec,\n OAuthProviderItem,\n OAuthProviderListLayout,\n OAuthProviderListProps,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport {\n DEFAULT_OAUTH_PROVIDER_ICONS,\n ForgotPasswordForm,\n OAuthProviderButton,\n OAuthProviderList,\n OtpForm,\n resolveOAuthProviderIcon,\n resolveOAuthProviderLabel,\n SignInForm,\n SignUpForm,\n} from './patterns/auth';\nexport type { ChatListAvatar, ChatListItemProps } from './patterns/chat-list-item';\nexport { ChatListItem } from './patterns/chat-list-item';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type {\n ContentRailControlPressEvent,\n ContentRailDirection,\n ContentRailItemSize,\n ContentRailMotion,\n ContentRailProps,\n ContentRailSpacing,\n ContentRailVisibleRangeChangeEvent,\n} from './patterns/content-rail';\nexport { ContentRail } from './patterns/content-rail';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { HeroAction, HeroAlign, HeroLayout, HeroProps, HeroTone } from './patterns/hero';\nexport { Hero } from './patterns/hero';\nexport type {\n ImagePreviewProps,\n ZoraImageAsset,\n ZoraImageMetadata,\n} from './patterns/image-preview';\nexport { ImagePreview } from './patterns/image-preview';\nexport type {\n ImageUploadFieldProps,\n ImageUploadProgressContext,\n ZoraPickedImage,\n} from './patterns/image-upload-field';\nexport { ImageUploadField } from './patterns/image-upload-field';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type {\n MessageBubbleAuthor,\n MessageBubbleAvatar,\n MessageBubbleDirection,\n MessageBubbleProps,\n MessageBubbleStatus,\n} from './patterns/message-bubble';\nexport { MessageBubble } from './patterns/message-bubble';\nexport type { MissingElementProps } from './patterns/missing-element';\nexport { MissingElement } from './patterns/missing-element';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type {\n PostAction,\n PostAuthor,\n PostAuthorAvatar,\n PostCardMedia,\n PostCardProps,\n} from './patterns/post-card';\nexport { PostCard } from './patterns/post-card';\nexport type { ProductCardProps } from './patterns/product-card';\nexport { ProductCard } from './patterns/product-card';\nexport type {\n ReaderColorScheme,\n ReaderDocumentFormat,\n ReaderErrorCode,\n ReaderErrorEvent,\n ReaderExternalLinkEvent,\n ReaderLineHeight,\n ReaderLocationChangeEvent,\n ReaderNavigationTrigger,\n ReaderResolvedSource,\n ReaderStatus,\n ReaderSurfaceProps,\n} from './patterns/reader';\nexport { ReaderSurface, resolveReaderProgress } from './patterns/reader';\nexport type {\n ResponsivePanelDesktopMode,\n ResponsivePanelMobileMode,\n ResponsivePanelProps,\n ResponsivePanelScroll,\n ResponsivePanelSide,\n ResponsivePanelSize,\n} from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type {\n BarcodeScannerViewProps,\n BarcodeScanResult,\n CameraPermissionStatus,\n CameraPermissionViewProps,\n ScanOverlayProps,\n} from './patterns/scanner';\nexport { BarcodeScannerView, CameraPermissionView, ScanOverlay } from './patterns/scanner';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionMode,\n SelectionProviderProps,\n SelectionTrigger,\n UseSelectionResult,\n} from './patterns/selection';\nexport { SelectableItem, SelectionProvider, useSelection } from './patterns/selection';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport type {\n ComposedZoraPluginCatalog,\n ComposedZoraPluginMetadataCatalog,\n ZoraPluginCompositionErrorCode,\n ZoraPluginDescriptor,\n ZoraPluginMetadata,\n ZoraPluginPlacement,\n} from './pluginComposition';\nexport {\n composeZoraPluginMetadata,\n composeZoraPlugins,\n ZoraPluginCompositionError,\n} from './pluginComposition';\nexport type { ZoraComponentRegistry } from './registry';\nexport { ZORA_COMPONENT_REGISTRY } from './registry';\nexport * from './theme';\n"]}
|
package/dist/metadata/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { ZORA_CORE_PLUGIN_METADATA } from '../corePluginMetadata';
|
|
2
|
+
export type { ComposedZoraPluginMetadataCatalog, ZoraPluginMetadata, ZoraPluginPlacement, } from '../pluginComposition';
|
|
3
|
+
export { composeZoraPluginMetadata, ZoraPluginCompositionError } from '../pluginComposition';
|
|
1
4
|
export type { ZoraBindableComponentType } from './bindableComponentMeta';
|
|
2
5
|
export { ZORA_BINDABLE_COMPONENT_META } from './bindableComponentMeta';
|
|
3
6
|
export { ZORA_COMPONENT_META } from './componentMeta';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,mB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AAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,kCAAkC,EAClC,kCAAkC,EAClC,6BAA6B,EAC7B,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,EACjB,yBAAyB,EACzB,gCAAgC,EAChC,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
package/dist/metadata/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { ZORA_CORE_PLUGIN_METADATA } from '../corePluginMetadata';
|
|
2
|
+
export { composeZoraPluginMetadata, ZoraPluginCompositionError } from '../pluginComposition';
|
|
1
3
|
export { ZORA_BINDABLE_COMPONENT_META } from './bindableComponentMeta';
|
|
2
4
|
export { ZORA_COMPONENT_META } from './componentMeta';
|
|
3
5
|
export { ZORA_THEME_RECIPE_META } from './themeRecipeMeta';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAMlE,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAE7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAW3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { ZORA_CORE_PLUGIN_METADATA } from '../corePluginMetadata';\nexport type {\n ComposedZoraPluginMetadataCatalog,\n ZoraPluginMetadata,\n ZoraPluginPlacement,\n} from '../pluginComposition';\nexport { composeZoraPluginMetadata, ZoraPluginCompositionError } from '../pluginComposition';\nexport type { ZoraBindableComponentType } from './bindableComponentMeta';\nexport { ZORA_BINDABLE_COMPONENT_META } from './bindableComponentMeta';\nexport { ZORA_COMPONENT_META } from './componentMeta';\nexport { ZORA_THEME_RECIPE_META } from './themeRecipeMeta';\nexport type {\n ZoraThemeRecipeBooleanFieldMeta,\n ZoraThemeRecipeChoiceFieldMeta,\n ZoraThemeRecipeFieldMeta,\n ZoraThemeRecipeKind,\n ZoraThemeRecipeMeta,\n ZoraThemeRecipeMetaRegistry,\n ZoraThemeRecipeTokenFieldMeta,\n ZoraThemeTokenFamily,\n} from './themeRecipeTypes';\nexport { ZORA_THEME_TOKEN_FAMILIES } from './themeRecipeTypes';\nexport type {\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentManifestPolicy,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropAuthoring,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n} from './types';\n"]}
|
package/dist/metadata/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentEventDtoKind, ComponentRequirements, MediaAssetKind, UiComponentPropType } from '@ankhorage/contracts';
|
|
1
|
+
import type { ComponentEventDtoKind, ComponentRequirements, MediaAssetKind, UiComponentBindingMeta, UiComponentPropType } from '@ankhorage/contracts';
|
|
2
2
|
export type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';
|
|
3
3
|
export type ZoraComponentPropType = UiComponentPropType;
|
|
4
4
|
export type ZoraComponentPropValue = string | number | boolean | null | readonly ZoraComponentPropValue[] | {
|
|
@@ -68,6 +68,7 @@ export interface ZoraComponentMeta {
|
|
|
68
68
|
description?: string;
|
|
69
69
|
directManifestNode: boolean;
|
|
70
70
|
allowedChildren: readonly string[];
|
|
71
|
+
bindings?: UiComponentBindingMeta;
|
|
71
72
|
manifestPolicy?: ZoraComponentManifestPolicy;
|
|
72
73
|
requirements?: ComponentRequirements;
|
|
73
74
|
blueprint?: ZoraComponentBlueprint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtF,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AAExD,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,sBAAsB,EAAE,GACjC;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,sBAAsB,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,0BAA0B,GAClC;IAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAA;CAAE,GAClC;IACE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEN,MAAM,WAAW,gCAAgC;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,C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EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,cAAc,CAAC,EAAE,2BAA2B,CAAC;IAC7C,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAC1D,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC;CAC1D;AAED,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ComponentEventDtoKind,\n ComponentRequirements,\n MediaAssetKind,\n UiComponentPropType,\n} from '@ankhorage/contracts';\n\nexport type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';\n\nexport type ZoraComponentPropType = UiComponentPropType;\n\nexport type ZoraComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly ZoraComponentPropValue[]\n | { readonly [key: string]: ZoraComponentPropValue };\n\nexport type ZoraComponentPropAuthoring =\n | { readonly authority: 'instance' }\n | {\n readonly authority: 'theme';\n readonly scope: 'global' | 'component' | 'pattern';\n readonly allowInstanceOverride?: boolean;\n };\n\nexport interface ZoraComponentPropArrayItemSchema {\n key: string;\n schema: ZoraComponentPropSchema;\n}\n\nexport interface ZoraComponentPropSchema {\n type: ZoraComponentPropType;\n category: string;\n label?: string;\n enum?: readonly (string | number)[];\n default?: ZoraComponentPropValue;\n itemSchema?: readonly ZoraComponentPropArrayItemSchema[];\n mediaKinds?: readonly MediaAssetKind[];\n authoring?: ZoraComponentPropAuthoring;\n}\n\nexport interface ZoraComponentBlueprint {\n label: string;\n icon?: { name: string; provider?: string };\n defaultProps?: Readonly<Record<string, ZoraComponentPropValue>>;\n}\n\nexport interface ZoraComponentI18nMeta {\n fields: readonly { keyProp: string; defaultTextProp: string }[];\n}\n\nexport type ZoraComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\nexport type ZoraComponentEventPayloadFieldType =\n 'boolean' | 'number' | 'object' | 'record' | 'string' | 'unknown';\n\nexport interface ZoraComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: ZoraComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface ZoraComponentEventMeta {\n readonly label: string;\n readonly eventType: ZoraComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly ZoraComponentEventPayloadFieldMeta[];\n}\n\nexport interface ZoraComponentSlotMeta {\n label?: string;\n allowedChildren?: readonly string[];\n}\n\nexport interface ZoraComponentManifestPolicy {\n kind: 'unresolved-element';\n availability: 'draft-only';\n releaseGate: 'blocked';\n}\n\nexport interface ZoraComponentMeta {\n name: string;\n category: ZoraComponentCategory;\n description?: string;\n directManifestNode: boolean;\n allowedChildren: readonly string[];\n manifestPolicy?: ZoraComponentManifestPolicy;\n requirements?: ComponentRequirements;\n blueprint?: ZoraComponentBlueprint;\n events?: Readonly<Record<string, ZoraComponentEventMeta>>;\n i18n?: ZoraComponentI18nMeta;\n slots?: Readonly<Record<string, ZoraComponentSlotMeta>>;\n note?: string;\n props: Readonly<Record<string, ZoraComponentPropSchema>>;\n}\n\nexport type ZoraComponentMetaRegistry = Readonly<Record<string, ZoraComponentMeta>>;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ComponentEventDtoKind,\n ComponentRequirements,\n MediaAssetKind,\n UiComponentBindingMeta,\n UiComponentPropType,\n} from '@ankhorage/contracts';\n\nexport type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';\n\nexport type ZoraComponentPropType = UiComponentPropType;\n\nexport type ZoraComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly ZoraComponentPropValue[]\n | { readonly [key: string]: ZoraComponentPropValue };\n\nexport type ZoraComponentPropAuthoring =\n | { readonly authority: 'instance' }\n | {\n readonly authority: 'theme';\n readonly scope: 'global' | 'component' | 'pattern';\n readonly allowInstanceOverride?: boolean;\n };\n\nexport interface ZoraComponentPropArrayItemSchema {\n key: string;\n schema: ZoraComponentPropSchema;\n}\n\nexport interface ZoraComponentPropSchema {\n type: ZoraComponentPropType;\n category: string;\n label?: string;\n enum?: readonly (string | number)[];\n default?: ZoraComponentPropValue;\n itemSchema?: readonly ZoraComponentPropArrayItemSchema[];\n mediaKinds?: readonly MediaAssetKind[];\n authoring?: ZoraComponentPropAuthoring;\n}\n\nexport interface ZoraComponentBlueprint {\n label: string;\n icon?: { name: string; provider?: string };\n defaultProps?: Readonly<Record<string, ZoraComponentPropValue>>;\n}\n\nexport interface ZoraComponentI18nMeta {\n fields: readonly { keyProp: string; defaultTextProp: string }[];\n}\n\nexport type ZoraComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\nexport type ZoraComponentEventPayloadFieldType =\n 'boolean' | 'number' | 'object' | 'record' | 'string' | 'unknown';\n\nexport interface ZoraComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: ZoraComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface ZoraComponentEventMeta {\n readonly label: string;\n readonly eventType: ZoraComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly ZoraComponentEventPayloadFieldMeta[];\n}\n\nexport interface ZoraComponentSlotMeta {\n label?: string;\n allowedChildren?: readonly string[];\n}\n\nexport interface ZoraComponentManifestPolicy {\n kind: 'unresolved-element';\n availability: 'draft-only';\n releaseGate: 'blocked';\n}\n\nexport interface ZoraComponentMeta {\n name: string;\n category: ZoraComponentCategory;\n description?: string;\n directManifestNode: boolean;\n allowedChildren: readonly string[];\n bindings?: UiComponentBindingMeta;\n manifestPolicy?: ZoraComponentManifestPolicy;\n requirements?: ComponentRequirements;\n blueprint?: ZoraComponentBlueprint;\n events?: Readonly<Record<string, ZoraComponentEventMeta>>;\n i18n?: ZoraComponentI18nMeta;\n slots?: Readonly<Record<string, ZoraComponentSlotMeta>>;\n note?: string;\n props: Readonly<Record<string, ZoraComponentPropSchema>>;\n}\n\nexport type ZoraComponentMetaRegistry = Readonly<Record<string, ZoraComponentMeta>>;\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { UiComponentMetaRegistry, UiComponentPackageManifest } from '@ankhorage/contracts';
|
|
2
|
+
import type { ZoraComponentMetaRegistry } from './metadata/types';
|
|
3
|
+
import type { ZoraComponentRegistry } from './registry';
|
|
4
|
+
export type ZoraPluginCompositionErrorCode = 'duplicate-component' | 'duplicate-package' | 'invalid-component-meta' | 'invalid-interaction-policy-component' | 'invalid-placement-child' | 'invalid-placement-parent' | 'missing-component-meta' | 'missing-runtime-component';
|
|
5
|
+
export interface ZoraPluginPlacement {
|
|
6
|
+
readonly child: string;
|
|
7
|
+
readonly parents: readonly string[];
|
|
8
|
+
}
|
|
9
|
+
export interface ZoraPluginMetadata {
|
|
10
|
+
readonly packageName: string;
|
|
11
|
+
readonly displayName?: string;
|
|
12
|
+
readonly componentMeta: ZoraComponentMetaRegistry;
|
|
13
|
+
readonly extensionHosts?: readonly string[];
|
|
14
|
+
readonly placements?: readonly ZoraPluginPlacement[];
|
|
15
|
+
readonly interactionPolicySupportedComponents?: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
export interface ZoraPluginDescriptor extends ZoraPluginMetadata {
|
|
18
|
+
readonly componentRegistry: ZoraComponentRegistry;
|
|
19
|
+
}
|
|
20
|
+
export interface ComposedZoraPluginMetadataCatalog {
|
|
21
|
+
readonly componentMeta: ZoraComponentMetaRegistry;
|
|
22
|
+
readonly bindableComponentMeta: UiComponentMetaRegistry;
|
|
23
|
+
readonly packageManifests: readonly UiComponentPackageManifest[];
|
|
24
|
+
readonly interactionPolicySupportedComponents: Readonly<Record<string, true>>;
|
|
25
|
+
}
|
|
26
|
+
export interface ComposedZoraPluginCatalog extends ComposedZoraPluginMetadataCatalog {
|
|
27
|
+
readonly componentRegistry: ZoraComponentRegistry;
|
|
28
|
+
}
|
|
29
|
+
/*** Report one deterministic plugin composition contract violation. */
|
|
30
|
+
export declare class ZoraPluginCompositionError extends Error {
|
|
31
|
+
readonly code: ZoraPluginCompositionErrorCode;
|
|
32
|
+
readonly packageName: string;
|
|
33
|
+
readonly componentName?: string;
|
|
34
|
+
constructor(args: {
|
|
35
|
+
readonly code: ZoraPluginCompositionErrorCode;
|
|
36
|
+
readonly packageName: string;
|
|
37
|
+
readonly message: string;
|
|
38
|
+
readonly componentName?: string;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/*** Compose a selected ZORA metadata set for authoring tools that must not load React Native runtime modules. */
|
|
42
|
+
export declare function composeZoraPluginMetadata(plugins: readonly ZoraPluginMetadata[]): ComposedZoraPluginMetadataCatalog;
|
|
43
|
+
/*** Compose a selected ZORA core/plugin descriptor set into one validated authoring/runtime catalog. */
|
|
44
|
+
export declare function composeZoraPlugins(plugins: readonly ZoraPluginDescriptor[]): ComposedZoraPluginCatalog;
|
|
45
|
+
//# sourceMappingURL=pluginComposition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginComposition.d.ts","sourceRoot":"","sources":["../src/pluginComposition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,M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,qBAAqB,CAAC;CACnD;AAED,uEAAuE;AACvE,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;gBAEpB,IAAI,EAAE;QAChB,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC;QAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;KACjC;CAOF;AAED,iHAAiH;AACjH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GACrC,iCAAiC,CAyCnC;AAED,wGAAwG;AACxG,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,SAAS,oBAAoB,EAAE,GACvC,yBAAyB,CAa3B"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*** Report one deterministic plugin composition contract violation. */
|
|
2
|
+
export class ZoraPluginCompositionError extends Error {
|
|
3
|
+
code;
|
|
4
|
+
packageName;
|
|
5
|
+
componentName;
|
|
6
|
+
constructor(args) {
|
|
7
|
+
super(args.message);
|
|
8
|
+
this.name = 'ZoraPluginCompositionError';
|
|
9
|
+
this.code = args.code;
|
|
10
|
+
this.packageName = args.packageName;
|
|
11
|
+
this.componentName = args.componentName;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/*** Compose a selected ZORA metadata set for authoring tools that must not load React Native runtime modules. */
|
|
15
|
+
export function composeZoraPluginMetadata(plugins) {
|
|
16
|
+
const descriptors = sortPlugins(plugins);
|
|
17
|
+
const packages = new Set();
|
|
18
|
+
const componentOwners = new Map();
|
|
19
|
+
const componentMeta = new Map();
|
|
20
|
+
const extensionHosts = new Set();
|
|
21
|
+
const interactionPolicySupportedComponents = new Set();
|
|
22
|
+
for (const descriptor of descriptors) {
|
|
23
|
+
validateUniquePackage(descriptor, packages);
|
|
24
|
+
validateMetadata(descriptor);
|
|
25
|
+
for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {
|
|
26
|
+
claimComponent(componentName, descriptor.packageName, componentOwners);
|
|
27
|
+
componentMeta.set(componentName, meta);
|
|
28
|
+
}
|
|
29
|
+
for (const componentName of descriptor.extensionHosts ?? [])
|
|
30
|
+
extensionHosts.add(componentName);
|
|
31
|
+
for (const componentName of descriptor.interactionPolicySupportedComponents ?? []) {
|
|
32
|
+
interactionPolicySupportedComponents.add(componentName);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
for (const descriptor of descriptors) {
|
|
36
|
+
for (const placement of descriptor.placements ?? []) {
|
|
37
|
+
applyPlacement({ descriptor, placement, componentMeta, extensionHosts });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
componentMeta: Object.fromEntries(componentMeta),
|
|
42
|
+
bindableComponentMeta: Object.fromEntries(componentMeta),
|
|
43
|
+
packageManifests: descriptors.map(({ packageName, displayName, componentMeta }) => ({
|
|
44
|
+
packageName,
|
|
45
|
+
...(displayName === undefined ? {} : { displayName }),
|
|
46
|
+
components: componentMeta,
|
|
47
|
+
})),
|
|
48
|
+
interactionPolicySupportedComponents: Object.fromEntries([...interactionPolicySupportedComponents]
|
|
49
|
+
.sort()
|
|
50
|
+
.map((componentName) => [componentName, true])),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/*** Compose a selected ZORA core/plugin descriptor set into one validated authoring/runtime catalog. */
|
|
54
|
+
export function composeZoraPlugins(plugins) {
|
|
55
|
+
const descriptors = sortPlugins(plugins);
|
|
56
|
+
const componentRegistry = new Map();
|
|
57
|
+
for (const descriptor of descriptors) {
|
|
58
|
+
validateRuntime(descriptor);
|
|
59
|
+
for (const [componentName, component] of sortedEntries(descriptor.componentRegistry)) {
|
|
60
|
+
componentRegistry.set(componentName, component);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const metadataCatalog = composeZoraPluginMetadata(descriptors);
|
|
64
|
+
return { ...metadataCatalog, componentRegistry: Object.fromEntries(componentRegistry) };
|
|
65
|
+
}
|
|
66
|
+
function validateUniquePackage(descriptor, packages) {
|
|
67
|
+
if (packages.has(descriptor.packageName)) {
|
|
68
|
+
throw compositionError('duplicate-package', descriptor.packageName, `Duplicate ZORA plugin package '${descriptor.packageName}'.`);
|
|
69
|
+
}
|
|
70
|
+
packages.add(descriptor.packageName);
|
|
71
|
+
}
|
|
72
|
+
function validateMetadata(descriptor) {
|
|
73
|
+
for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {
|
|
74
|
+
if (meta.name !== componentName) {
|
|
75
|
+
throw compositionError('invalid-component-meta', descriptor.packageName, `ZORA plugin '${descriptor.packageName}' metadata key '${componentName}' does not match meta.name '${meta.name}'.`, componentName);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function validateRuntime(descriptor) {
|
|
80
|
+
const componentMetaNames = new Set(Object.keys(descriptor.componentMeta));
|
|
81
|
+
const runtimeComponentNames = new Set(Object.keys(descriptor.componentRegistry));
|
|
82
|
+
for (const componentName of sortedKeys(descriptor.componentRegistry)) {
|
|
83
|
+
if (!componentMetaNames.has(componentName)) {
|
|
84
|
+
throw compositionError('missing-component-meta', descriptor.packageName, `ZORA plugin '${descriptor.packageName}' registers runtime component '${componentName}' without component metadata.`, componentName);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {
|
|
88
|
+
if (meta.directManifestNode && !runtimeComponentNames.has(componentName)) {
|
|
89
|
+
throw compositionError('missing-runtime-component', descriptor.packageName, `ZORA plugin '${descriptor.packageName}' exposes direct manifest node '${componentName}' without a runtime component.`, componentName);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
for (const componentName of descriptor.interactionPolicySupportedComponents ?? []) {
|
|
93
|
+
if (!runtimeComponentNames.has(componentName)) {
|
|
94
|
+
throw compositionError('invalid-interaction-policy-component', descriptor.packageName, `ZORA plugin '${descriptor.packageName}' declares interaction-policy support for unregistered component '${componentName}'.`, componentName);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function claimComponent(componentName, packageName, owners) {
|
|
99
|
+
const existingOwner = owners.get(componentName);
|
|
100
|
+
if (existingOwner) {
|
|
101
|
+
throw compositionError('duplicate-component', packageName, `ZORA component '${componentName}' is owned by both '${existingOwner}' and '${packageName}'.`, componentName);
|
|
102
|
+
}
|
|
103
|
+
owners.set(componentName, packageName);
|
|
104
|
+
}
|
|
105
|
+
function applyPlacement(args) {
|
|
106
|
+
const { descriptor, placement, componentMeta, extensionHosts } = args;
|
|
107
|
+
const childMeta = descriptor.componentMeta[placement.child];
|
|
108
|
+
if (!childMeta?.directManifestNode) {
|
|
109
|
+
throw compositionError('invalid-placement-child', descriptor.packageName, `ZORA plugin '${descriptor.packageName}' placement child '${placement.child}' is not an owned direct manifest node.`, placement.child);
|
|
110
|
+
}
|
|
111
|
+
for (const parentName of [...placement.parents].sort()) {
|
|
112
|
+
const parentMeta = componentMeta.get(parentName);
|
|
113
|
+
if (!parentMeta || !extensionHosts.has(parentName)) {
|
|
114
|
+
throw compositionError('invalid-placement-parent', descriptor.packageName, `ZORA plugin '${descriptor.packageName}' placement parent '${parentName}' is not a declared extension host.`, placement.child);
|
|
115
|
+
}
|
|
116
|
+
componentMeta.set(parentName, addAllowedChild(parentMeta, placement.child));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function addAllowedChild(meta, child) {
|
|
120
|
+
const allowedChildren = appendUnique(meta.allowedChildren, child);
|
|
121
|
+
const childrenSlot = meta.slots?.children;
|
|
122
|
+
return {
|
|
123
|
+
...meta,
|
|
124
|
+
allowedChildren,
|
|
125
|
+
...(childrenSlot
|
|
126
|
+
? {
|
|
127
|
+
slots: {
|
|
128
|
+
...meta.slots,
|
|
129
|
+
children: {
|
|
130
|
+
...childrenSlot,
|
|
131
|
+
allowedChildren: appendUnique(childrenSlot.allowedChildren ?? [], child),
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
}
|
|
135
|
+
: {}),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function appendUnique(values, value) {
|
|
139
|
+
return values.includes(value) ? values : [...values, value];
|
|
140
|
+
}
|
|
141
|
+
function sortedKeys(value) {
|
|
142
|
+
return Object.keys(value).sort();
|
|
143
|
+
}
|
|
144
|
+
function sortedEntries(value) {
|
|
145
|
+
return Object.entries(value).sort(([left], [right]) => left.localeCompare(right));
|
|
146
|
+
}
|
|
147
|
+
function sortPlugins(plugins) {
|
|
148
|
+
return [...plugins].sort((left, right) => left.packageName.localeCompare(right.packageName));
|
|
149
|
+
}
|
|
150
|
+
function compositionError(code, packageName, message, componentName) {
|
|
151
|
+
return new ZoraPluginCompositionError({ code, packageName, message, componentName });
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=pluginComposition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginComposition.js","sourceRoot":"","sources":["../src/pluginComposition.ts"],"names":[],"mappings":"AA4CA,uEAAuE;AACvE,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAC1C,IAAI,CAAiC;IACrC,WAAW,CAAS;IACpB,aAAa,CAAU;IAEhC,YAAY,IAKX;QACC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;IAC1C,CAAC;CACF;AAED,iHAAiH;AACjH,MAAM,UAAU,yBAAyB,CACvC,OAAsC;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OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,UAAU,CAAC,KAAwC;IAC1D,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,aAAa,CAAI,KAAkC;IAC1D,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC;AAED,SAAS,WAAW,CAA+B,OAAqB;IACtE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AAC/F,CAAC;AAED,SAAS,gBAAgB,CACvB,IAAoC,EACpC,WAAmB,EACnB,OAAe,EACf,aAAsB;IAEtB,OAAO,IAAI,0BAA0B,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;AACvF,CAAC","sourcesContent":["import type { UiComponentMetaRegistry, UiComponentPackageManifest } from '@ankhorage/contracts';\n\nimport type { ZoraComponentMeta, ZoraComponentMetaRegistry } from './metadata/types';\nimport type { ZoraComponentRegistry } from './registry';\n\nexport type ZoraPluginCompositionErrorCode =\n | 'duplicate-component'\n | 'duplicate-package'\n | 'invalid-component-meta'\n | 'invalid-interaction-policy-component'\n | 'invalid-placement-child'\n | 'invalid-placement-parent'\n | 'missing-component-meta'\n | 'missing-runtime-component';\n\nexport interface ZoraPluginPlacement {\n readonly child: string;\n readonly parents: readonly string[];\n}\n\nexport interface ZoraPluginMetadata {\n readonly packageName: string;\n readonly displayName?: string;\n readonly componentMeta: ZoraComponentMetaRegistry;\n readonly extensionHosts?: readonly string[];\n readonly placements?: readonly ZoraPluginPlacement[];\n readonly interactionPolicySupportedComponents?: readonly string[];\n}\n\nexport interface ZoraPluginDescriptor extends ZoraPluginMetadata {\n readonly componentRegistry: ZoraComponentRegistry;\n}\n\nexport interface ComposedZoraPluginMetadataCatalog {\n readonly componentMeta: ZoraComponentMetaRegistry;\n readonly bindableComponentMeta: UiComponentMetaRegistry;\n readonly packageManifests: readonly UiComponentPackageManifest[];\n readonly interactionPolicySupportedComponents: Readonly<Record<string, true>>;\n}\n\nexport interface ComposedZoraPluginCatalog extends ComposedZoraPluginMetadataCatalog {\n readonly componentRegistry: ZoraComponentRegistry;\n}\n\n/*** Report one deterministic plugin composition contract violation. */\nexport class ZoraPluginCompositionError extends Error {\n readonly code: ZoraPluginCompositionErrorCode;\n readonly packageName: string;\n readonly componentName?: string;\n\n constructor(args: {\n readonly code: ZoraPluginCompositionErrorCode;\n readonly packageName: string;\n readonly message: string;\n readonly componentName?: string;\n }) {\n super(args.message);\n this.name = 'ZoraPluginCompositionError';\n this.code = args.code;\n this.packageName = args.packageName;\n this.componentName = args.componentName;\n }\n}\n\n/*** Compose a selected ZORA metadata set for authoring tools that must not load React Native runtime modules. */\nexport function composeZoraPluginMetadata(\n plugins: readonly ZoraPluginMetadata[],\n): ComposedZoraPluginMetadataCatalog {\n const descriptors = sortPlugins(plugins);\n const packages = new Set<string>();\n const componentOwners = new Map<string, string>();\n const componentMeta = new Map<string, ZoraComponentMeta>();\n const extensionHosts = new Set<string>();\n const interactionPolicySupportedComponents = new Set<string>();\n\n for (const descriptor of descriptors) {\n validateUniquePackage(descriptor, packages);\n validateMetadata(descriptor);\n for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {\n claimComponent(componentName, descriptor.packageName, componentOwners);\n componentMeta.set(componentName, meta);\n }\n for (const componentName of descriptor.extensionHosts ?? []) extensionHosts.add(componentName);\n for (const componentName of descriptor.interactionPolicySupportedComponents ?? []) {\n interactionPolicySupportedComponents.add(componentName);\n }\n }\n\n for (const descriptor of descriptors) {\n for (const placement of descriptor.placements ?? []) {\n applyPlacement({ descriptor, placement, componentMeta, extensionHosts });\n }\n }\n\n return {\n componentMeta: Object.fromEntries(componentMeta),\n bindableComponentMeta: Object.fromEntries(componentMeta),\n packageManifests: descriptors.map(({ packageName, displayName, componentMeta }) => ({\n packageName,\n ...(displayName === undefined ? {} : { displayName }),\n components: componentMeta,\n })),\n interactionPolicySupportedComponents: Object.fromEntries(\n [...interactionPolicySupportedComponents]\n .sort()\n .map((componentName) => [componentName, true]),\n ),\n };\n}\n\n/*** Compose a selected ZORA core/plugin descriptor set into one validated authoring/runtime catalog. */\nexport function composeZoraPlugins(\n plugins: readonly ZoraPluginDescriptor[],\n): ComposedZoraPluginCatalog {\n const descriptors = sortPlugins(plugins);\n const componentRegistry = new Map<string, ZoraComponentRegistry[string]>();\n\n for (const descriptor of descriptors) {\n validateRuntime(descriptor);\n for (const [componentName, component] of sortedEntries(descriptor.componentRegistry)) {\n componentRegistry.set(componentName, component);\n }\n }\n const metadataCatalog = composeZoraPluginMetadata(descriptors);\n\n return { ...metadataCatalog, componentRegistry: Object.fromEntries(componentRegistry) };\n}\n\nfunction validateUniquePackage(descriptor: ZoraPluginMetadata, packages: Set<string>): void {\n if (packages.has(descriptor.packageName)) {\n throw compositionError(\n 'duplicate-package',\n descriptor.packageName,\n `Duplicate ZORA plugin package '${descriptor.packageName}'.`,\n );\n }\n packages.add(descriptor.packageName);\n}\n\nfunction validateMetadata(descriptor: ZoraPluginMetadata): void {\n for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {\n if (meta.name !== componentName) {\n throw compositionError(\n 'invalid-component-meta',\n descriptor.packageName,\n `ZORA plugin '${descriptor.packageName}' metadata key '${componentName}' does not match meta.name '${meta.name}'.`,\n componentName,\n );\n }\n }\n}\n\nfunction validateRuntime(descriptor: ZoraPluginDescriptor): void {\n const componentMetaNames = new Set(Object.keys(descriptor.componentMeta));\n const runtimeComponentNames = new Set(Object.keys(descriptor.componentRegistry));\n for (const componentName of sortedKeys(descriptor.componentRegistry)) {\n if (!componentMetaNames.has(componentName)) {\n throw compositionError(\n 'missing-component-meta',\n descriptor.packageName,\n `ZORA plugin '${descriptor.packageName}' registers runtime component '${componentName}' without component metadata.`,\n componentName,\n );\n }\n }\n for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {\n if (meta.directManifestNode && !runtimeComponentNames.has(componentName)) {\n throw compositionError(\n 'missing-runtime-component',\n descriptor.packageName,\n `ZORA plugin '${descriptor.packageName}' exposes direct manifest node '${componentName}' without a runtime component.`,\n componentName,\n );\n }\n }\n for (const componentName of descriptor.interactionPolicySupportedComponents ?? []) {\n if (!runtimeComponentNames.has(componentName)) {\n throw compositionError(\n 'invalid-interaction-policy-component',\n descriptor.packageName,\n `ZORA plugin '${descriptor.packageName}' declares interaction-policy support for unregistered component '${componentName}'.`,\n componentName,\n );\n }\n }\n}\n\nfunction claimComponent(\n componentName: string,\n packageName: string,\n owners: Map<string, string>,\n): void {\n const existingOwner = owners.get(componentName);\n if (existingOwner) {\n throw compositionError(\n 'duplicate-component',\n packageName,\n `ZORA component '${componentName}' is owned by both '${existingOwner}' and '${packageName}'.`,\n componentName,\n );\n }\n owners.set(componentName, packageName);\n}\n\nfunction applyPlacement(args: {\n descriptor: ZoraPluginMetadata;\n placement: ZoraPluginPlacement;\n componentMeta: Map<string, ZoraComponentMeta>;\n extensionHosts: ReadonlySet<string>;\n}): void {\n const { descriptor, placement, componentMeta, extensionHosts } = args;\n const childMeta = descriptor.componentMeta[placement.child];\n if (!childMeta?.directManifestNode) {\n throw compositionError(\n 'invalid-placement-child',\n descriptor.packageName,\n `ZORA plugin '${descriptor.packageName}' placement child '${placement.child}' is not an owned direct manifest node.`,\n placement.child,\n );\n }\n for (const parentName of [...placement.parents].sort()) {\n const parentMeta = componentMeta.get(parentName);\n if (!parentMeta || !extensionHosts.has(parentName)) {\n throw compositionError(\n 'invalid-placement-parent',\n descriptor.packageName,\n `ZORA plugin '${descriptor.packageName}' placement parent '${parentName}' is not a declared extension host.`,\n placement.child,\n );\n }\n componentMeta.set(parentName, addAllowedChild(parentMeta, placement.child));\n }\n}\n\nfunction addAllowedChild(meta: ZoraComponentMeta, child: string): ZoraComponentMeta {\n const allowedChildren = appendUnique(meta.allowedChildren, child);\n const childrenSlot = meta.slots?.children;\n return {\n ...meta,\n allowedChildren,\n ...(childrenSlot\n ? {\n slots: {\n ...meta.slots,\n children: {\n ...childrenSlot,\n allowedChildren: appendUnique(childrenSlot.allowedChildren ?? [], child),\n },\n },\n }\n : {}),\n };\n}\n\nfunction appendUnique(values: readonly string[], value: string): readonly string[] {\n return values.includes(value) ? values : [...values, value];\n}\n\nfunction sortedKeys(value: Readonly<Record<string, unknown>>): string[] {\n return Object.keys(value).sort();\n}\n\nfunction sortedEntries<T>(value: Readonly<Record<string, T>>): [string, T][] {\n return Object.entries(value).sort(([left], [right]) => left.localeCompare(right));\n}\n\nfunction sortPlugins<T extends ZoraPluginMetadata>(plugins: readonly T[]): T[] {\n return [...plugins].sort((left, right) => left.packageName.localeCompare(right.packageName));\n}\n\nfunction compositionError(\n code: ZoraPluginCompositionErrorCode,\n packageName: string,\n message: string,\n componentName?: string,\n): ZoraPluginCompositionError {\n return new ZoraPluginCompositionError({ code, packageName, message, componentName });\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.3.0",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@ankhorage/color-theory": "^0.3.0",
|
|
41
|
-
"@ankhorage/contracts": "^
|
|
42
|
-
"@ankhorage/surface": "^3.4.
|
|
41
|
+
"@ankhorage/contracts": "^12.0.1",
|
|
42
|
+
"@ankhorage/surface": "^3.4.4"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
45
|
"dist",
|
|
@@ -95,14 +95,14 @@
|
|
|
95
95
|
"version-packages": "ankhorage-changeset version"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@ankhorage/devtools": "^1.
|
|
98
|
+
"@ankhorage/devtools": "^1.13.0",
|
|
99
99
|
"@ankhorage/paradox": "^0.1.24",
|
|
100
100
|
"@react-native-picker/picker": "2.11.4",
|
|
101
101
|
"@react-native-vector-icons/fontawesome": "^13.1.3",
|
|
102
102
|
"@react-native-vector-icons/fontawesome5": "^13.1.3",
|
|
103
103
|
"@react-native-vector-icons/fontawesome6": "^13.1.3",
|
|
104
104
|
"@react-native-vector-icons/ionicons": "^13.1.3",
|
|
105
|
-
"@types/bun": "^1.4.
|
|
105
|
+
"@types/bun": "^1.4.1",
|
|
106
106
|
"@types/node": "^24.13.3",
|
|
107
107
|
"@types/react": "^19.2.18",
|
|
108
108
|
"@types/react-dom": "^19.2.4",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"react-native-web": "~0.21.0",
|
|
117
117
|
"typescript": "~6.0.3"
|
|
118
118
|
},
|
|
119
|
-
"packageManager": "bun@1.4.
|
|
119
|
+
"packageManager": "bun@1.4.2"
|
|
120
120
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';
|
|
2
|
+
import type { ZoraPluginDescriptor } from './pluginComposition';
|
|
3
|
+
import { ZORA_COMPONENT_REGISTRY } from './registry';
|
|
4
|
+
|
|
5
|
+
/*** Describe the complete ZORA core runtime and authoring surface through the public plugin contract. */
|
|
6
|
+
export const ZORA_CORE_PLUGIN: ZoraPluginDescriptor = {
|
|
7
|
+
...ZORA_CORE_PLUGIN_METADATA,
|
|
8
|
+
componentRegistry: ZORA_COMPONENT_REGISTRY,
|
|
9
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { UiComponentMetaRegistry } from '@ankhorage/contracts';
|
|
2
|
+
|
|
3
|
+
import { ZORA_BINDABLE_COMPONENT_META } from './metadata/bindableComponentMeta';
|
|
4
|
+
import { ZORA_COMPONENT_META } from './metadata/componentMeta';
|
|
5
|
+
import type { ZoraComponentMetaRegistry } from './metadata/types';
|
|
6
|
+
import type { ZoraPluginMetadata } from './pluginComposition';
|
|
7
|
+
|
|
8
|
+
const CORE_EXTENSION_HOSTS = [
|
|
9
|
+
'Box',
|
|
10
|
+
'Card',
|
|
11
|
+
'Container',
|
|
12
|
+
'Grid',
|
|
13
|
+
'MessageBubble',
|
|
14
|
+
'Notice',
|
|
15
|
+
'Panel',
|
|
16
|
+
'PostCard',
|
|
17
|
+
'Screen',
|
|
18
|
+
'ScreenSection',
|
|
19
|
+
'Stack',
|
|
20
|
+
] as const;
|
|
21
|
+
|
|
22
|
+
export const ZORA_CORE_PLUGIN_METADATA: ZoraPluginMetadata = {
|
|
23
|
+
packageName: '@ankhorage/zora',
|
|
24
|
+
displayName: 'ZORA',
|
|
25
|
+
componentMeta: mergeBindableMeta(ZORA_COMPONENT_META, ZORA_BINDABLE_COMPONENT_META),
|
|
26
|
+
extensionHosts: CORE_EXTENSION_HOSTS,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
function mergeBindableMeta(
|
|
30
|
+
componentMeta: ZoraComponentMetaRegistry,
|
|
31
|
+
bindableMeta: UiComponentMetaRegistry,
|
|
32
|
+
): ZoraComponentMetaRegistry {
|
|
33
|
+
const bindingsByComponent = new Map(
|
|
34
|
+
Object.entries(bindableMeta).map(([componentName, meta]) => [componentName, meta.bindings]),
|
|
35
|
+
);
|
|
36
|
+
return Object.fromEntries(
|
|
37
|
+
Object.entries(componentMeta).map(([componentName, meta]) => [
|
|
38
|
+
componentName,
|
|
39
|
+
bindingsByComponent.get(componentName)
|
|
40
|
+
? { ...meta, bindings: bindingsByComponent.get(componentName) }
|
|
41
|
+
: meta,
|
|
42
|
+
]),
|
|
43
|
+
);
|
|
44
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -156,6 +156,8 @@ export type { ToastOptions, ToastProps, ToastProviderProps, ToastStatus } from '
|
|
|
156
156
|
export { Toast, ToastProvider, useToast } from './components/toast';
|
|
157
157
|
export type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';
|
|
158
158
|
export { Toolbar, ToolbarAction } from './components/toolbar';
|
|
159
|
+
export { ZORA_CORE_PLUGIN } from './corePlugin';
|
|
160
|
+
export { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';
|
|
159
161
|
export type {
|
|
160
162
|
BoxProps,
|
|
161
163
|
CenterProps,
|
|
@@ -398,6 +400,19 @@ export type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';
|
|
|
398
400
|
export { ZoraDrawerContent } from './patterns/zora-drawer-content';
|
|
399
401
|
export type { ZoraTabBarProps } from './patterns/zora-tab-bar';
|
|
400
402
|
export { ZoraTabBar } from './patterns/zora-tab-bar';
|
|
403
|
+
export type {
|
|
404
|
+
ComposedZoraPluginCatalog,
|
|
405
|
+
ComposedZoraPluginMetadataCatalog,
|
|
406
|
+
ZoraPluginCompositionErrorCode,
|
|
407
|
+
ZoraPluginDescriptor,
|
|
408
|
+
ZoraPluginMetadata,
|
|
409
|
+
ZoraPluginPlacement,
|
|
410
|
+
} from './pluginComposition';
|
|
411
|
+
export {
|
|
412
|
+
composeZoraPluginMetadata,
|
|
413
|
+
composeZoraPlugins,
|
|
414
|
+
ZoraPluginCompositionError,
|
|
415
|
+
} from './pluginComposition';
|
|
401
416
|
export type { ZoraComponentRegistry } from './registry';
|
|
402
417
|
export { ZORA_COMPONENT_REGISTRY } from './registry';
|
|
403
418
|
export * from './theme';
|
package/src/metadata/index.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export { ZORA_CORE_PLUGIN_METADATA } from '../corePluginMetadata';
|
|
2
|
+
export type {
|
|
3
|
+
ComposedZoraPluginMetadataCatalog,
|
|
4
|
+
ZoraPluginMetadata,
|
|
5
|
+
ZoraPluginPlacement,
|
|
6
|
+
} from '../pluginComposition';
|
|
7
|
+
export { composeZoraPluginMetadata, ZoraPluginCompositionError } from '../pluginComposition';
|
|
1
8
|
export type { ZoraBindableComponentType } from './bindableComponentMeta';
|
|
2
9
|
export { ZORA_BINDABLE_COMPONENT_META } from './bindableComponentMeta';
|
|
3
10
|
export { ZORA_COMPONENT_META } from './componentMeta';
|
package/src/metadata/types.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type {
|
|
|
2
2
|
ComponentEventDtoKind,
|
|
3
3
|
ComponentRequirements,
|
|
4
4
|
MediaAssetKind,
|
|
5
|
+
UiComponentBindingMeta,
|
|
5
6
|
UiComponentPropType,
|
|
6
7
|
} from '@ankhorage/contracts';
|
|
7
8
|
|
|
@@ -86,6 +87,7 @@ export interface ZoraComponentMeta {
|
|
|
86
87
|
description?: string;
|
|
87
88
|
directManifestNode: boolean;
|
|
88
89
|
allowedChildren: readonly string[];
|
|
90
|
+
bindings?: UiComponentBindingMeta;
|
|
89
91
|
manifestPolicy?: ZoraComponentManifestPolicy;
|
|
90
92
|
requirements?: ComponentRequirements;
|
|
91
93
|
blueprint?: ZoraComponentBlueprint;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import type { ZoraComponentMeta } from './metadata';
|
|
4
|
+
import {
|
|
5
|
+
composeZoraPlugins,
|
|
6
|
+
ZoraPluginCompositionError,
|
|
7
|
+
type ZoraPluginDescriptor,
|
|
8
|
+
} from './pluginComposition';
|
|
9
|
+
|
|
10
|
+
const pluginLeafMeta: ZoraComponentMeta = {
|
|
11
|
+
name: 'PluginLeaf',
|
|
12
|
+
category: 'component',
|
|
13
|
+
directManifestNode: true,
|
|
14
|
+
allowedChildren: [],
|
|
15
|
+
blueprint: { label: 'Plugin leaf' },
|
|
16
|
+
bindings: {
|
|
17
|
+
props: {
|
|
18
|
+
value: { value: { type: 'string' } },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
value: { type: 'string', category: 'Content', authoring: { authority: 'instance' } },
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const PluginLeaf = () => null;
|
|
27
|
+
|
|
28
|
+
const Host = () => null;
|
|
29
|
+
|
|
30
|
+
const core = {
|
|
31
|
+
packageName: '@example/core',
|
|
32
|
+
componentRegistry: { Host },
|
|
33
|
+
componentMeta: {
|
|
34
|
+
Host: {
|
|
35
|
+
name: 'Host',
|
|
36
|
+
category: 'layout',
|
|
37
|
+
directManifestNode: true,
|
|
38
|
+
allowedChildren: [],
|
|
39
|
+
props: {},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
extensionHosts: ['Host'],
|
|
43
|
+
} satisfies ZoraPluginDescriptor;
|
|
44
|
+
|
|
45
|
+
const plugin = {
|
|
46
|
+
packageName: '@example/zora-plugin',
|
|
47
|
+
displayName: 'Example plugin',
|
|
48
|
+
componentRegistry: { PluginLeaf },
|
|
49
|
+
componentMeta: { PluginLeaf: pluginLeafMeta },
|
|
50
|
+
placements: [{ child: 'PluginLeaf', parents: ['Host'] }],
|
|
51
|
+
} satisfies ZoraPluginDescriptor;
|
|
52
|
+
|
|
53
|
+
describe('composeZoraPlugins', () => {
|
|
54
|
+
test('composes runtime, authoring, binding, package, and placement projections', () => {
|
|
55
|
+
const catalog = composeZoraPlugins([core, plugin]);
|
|
56
|
+
|
|
57
|
+
expect(catalog.componentRegistry.PluginLeaf).toBe(PluginLeaf);
|
|
58
|
+
expect(catalog.componentMeta.PluginLeaf).toBe(pluginLeafMeta);
|
|
59
|
+
expect(catalog.bindableComponentMeta.PluginLeaf?.bindings).toEqual(pluginLeafMeta.bindings);
|
|
60
|
+
expect(catalog.componentMeta.Host.allowedChildren).toContain('PluginLeaf');
|
|
61
|
+
expect(catalog.packageManifests.map((entry) => entry.packageName)).toEqual([
|
|
62
|
+
'@example/core',
|
|
63
|
+
'@example/zora-plugin',
|
|
64
|
+
]);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test('is deterministic regardless of plugin input order', () => {
|
|
68
|
+
const Alpha = () => null;
|
|
69
|
+
const alpha = createPlugin('@example/alpha', 'Alpha', Alpha);
|
|
70
|
+
const beta = createPlugin('@example/beta', 'Beta', () => null);
|
|
71
|
+
|
|
72
|
+
expect(Object.keys(composeZoraPlugins([core, beta, alpha]).componentMeta)).toEqual(
|
|
73
|
+
Object.keys(composeZoraPlugins([alpha, core, beta]).componentMeta),
|
|
74
|
+
);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('rejects duplicate component ownership with a stable diagnostic code', () => {
|
|
78
|
+
const duplicate = createPlugin('@example/duplicate', 'Host', () => null);
|
|
79
|
+
|
|
80
|
+
expect(() => composeZoraPlugins([core, duplicate])).toThrow(ZoraPluginCompositionError);
|
|
81
|
+
try {
|
|
82
|
+
composeZoraPlugins([core, duplicate]);
|
|
83
|
+
} catch (error) {
|
|
84
|
+
expect(error).toMatchObject({
|
|
85
|
+
code: 'duplicate-component',
|
|
86
|
+
packageName: '@example/duplicate',
|
|
87
|
+
componentName: 'Host',
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test('rejects runtime and metadata mismatches', () => {
|
|
93
|
+
const invalid = {
|
|
94
|
+
...plugin,
|
|
95
|
+
packageName: '@example/invalid',
|
|
96
|
+
componentMeta: {},
|
|
97
|
+
} satisfies ZoraPluginDescriptor;
|
|
98
|
+
|
|
99
|
+
expectCompositionError(invalid, 'missing-component-meta');
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
test('rejects placement into components that did not opt in as extension hosts', () => {
|
|
103
|
+
const invalid = {
|
|
104
|
+
...plugin,
|
|
105
|
+
packageName: '@example/invalid-placement',
|
|
106
|
+
placements: [{ child: 'PluginLeaf', parents: ['PluginLeaf'] }],
|
|
107
|
+
} satisfies ZoraPluginDescriptor;
|
|
108
|
+
|
|
109
|
+
expectCompositionError(invalid, 'invalid-placement-parent');
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
function createPlugin(
|
|
114
|
+
packageName: string,
|
|
115
|
+
componentName: string,
|
|
116
|
+
component: ZoraPluginDescriptor['componentRegistry'][string],
|
|
117
|
+
): ZoraPluginDescriptor {
|
|
118
|
+
return {
|
|
119
|
+
packageName,
|
|
120
|
+
componentRegistry: { [componentName]: component },
|
|
121
|
+
componentMeta: {
|
|
122
|
+
[componentName]: {
|
|
123
|
+
...pluginLeafMeta,
|
|
124
|
+
name: componentName,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function expectCompositionError(
|
|
131
|
+
descriptor: ZoraPluginDescriptor,
|
|
132
|
+
code: ZoraPluginCompositionError['code'],
|
|
133
|
+
): void {
|
|
134
|
+
try {
|
|
135
|
+
composeZoraPlugins([core, descriptor]);
|
|
136
|
+
throw new Error('Expected plugin composition to fail.');
|
|
137
|
+
} catch (error) {
|
|
138
|
+
expect(error).toBeInstanceOf(ZoraPluginCompositionError);
|
|
139
|
+
expect(error).toMatchObject({ code });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import type { UiComponentMetaRegistry, UiComponentPackageManifest } from '@ankhorage/contracts';
|
|
2
|
+
|
|
3
|
+
import type { ZoraComponentMeta, ZoraComponentMetaRegistry } from './metadata/types';
|
|
4
|
+
import type { ZoraComponentRegistry } from './registry';
|
|
5
|
+
|
|
6
|
+
export type ZoraPluginCompositionErrorCode =
|
|
7
|
+
| 'duplicate-component'
|
|
8
|
+
| 'duplicate-package'
|
|
9
|
+
| 'invalid-component-meta'
|
|
10
|
+
| 'invalid-interaction-policy-component'
|
|
11
|
+
| 'invalid-placement-child'
|
|
12
|
+
| 'invalid-placement-parent'
|
|
13
|
+
| 'missing-component-meta'
|
|
14
|
+
| 'missing-runtime-component';
|
|
15
|
+
|
|
16
|
+
export interface ZoraPluginPlacement {
|
|
17
|
+
readonly child: string;
|
|
18
|
+
readonly parents: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ZoraPluginMetadata {
|
|
22
|
+
readonly packageName: string;
|
|
23
|
+
readonly displayName?: string;
|
|
24
|
+
readonly componentMeta: ZoraComponentMetaRegistry;
|
|
25
|
+
readonly extensionHosts?: readonly string[];
|
|
26
|
+
readonly placements?: readonly ZoraPluginPlacement[];
|
|
27
|
+
readonly interactionPolicySupportedComponents?: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ZoraPluginDescriptor extends ZoraPluginMetadata {
|
|
31
|
+
readonly componentRegistry: ZoraComponentRegistry;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ComposedZoraPluginMetadataCatalog {
|
|
35
|
+
readonly componentMeta: ZoraComponentMetaRegistry;
|
|
36
|
+
readonly bindableComponentMeta: UiComponentMetaRegistry;
|
|
37
|
+
readonly packageManifests: readonly UiComponentPackageManifest[];
|
|
38
|
+
readonly interactionPolicySupportedComponents: Readonly<Record<string, true>>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ComposedZoraPluginCatalog extends ComposedZoraPluginMetadataCatalog {
|
|
42
|
+
readonly componentRegistry: ZoraComponentRegistry;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/*** Report one deterministic plugin composition contract violation. */
|
|
46
|
+
export class ZoraPluginCompositionError extends Error {
|
|
47
|
+
readonly code: ZoraPluginCompositionErrorCode;
|
|
48
|
+
readonly packageName: string;
|
|
49
|
+
readonly componentName?: string;
|
|
50
|
+
|
|
51
|
+
constructor(args: {
|
|
52
|
+
readonly code: ZoraPluginCompositionErrorCode;
|
|
53
|
+
readonly packageName: string;
|
|
54
|
+
readonly message: string;
|
|
55
|
+
readonly componentName?: string;
|
|
56
|
+
}) {
|
|
57
|
+
super(args.message);
|
|
58
|
+
this.name = 'ZoraPluginCompositionError';
|
|
59
|
+
this.code = args.code;
|
|
60
|
+
this.packageName = args.packageName;
|
|
61
|
+
this.componentName = args.componentName;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/*** Compose a selected ZORA metadata set for authoring tools that must not load React Native runtime modules. */
|
|
66
|
+
export function composeZoraPluginMetadata(
|
|
67
|
+
plugins: readonly ZoraPluginMetadata[],
|
|
68
|
+
): ComposedZoraPluginMetadataCatalog {
|
|
69
|
+
const descriptors = sortPlugins(plugins);
|
|
70
|
+
const packages = new Set<string>();
|
|
71
|
+
const componentOwners = new Map<string, string>();
|
|
72
|
+
const componentMeta = new Map<string, ZoraComponentMeta>();
|
|
73
|
+
const extensionHosts = new Set<string>();
|
|
74
|
+
const interactionPolicySupportedComponents = new Set<string>();
|
|
75
|
+
|
|
76
|
+
for (const descriptor of descriptors) {
|
|
77
|
+
validateUniquePackage(descriptor, packages);
|
|
78
|
+
validateMetadata(descriptor);
|
|
79
|
+
for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {
|
|
80
|
+
claimComponent(componentName, descriptor.packageName, componentOwners);
|
|
81
|
+
componentMeta.set(componentName, meta);
|
|
82
|
+
}
|
|
83
|
+
for (const componentName of descriptor.extensionHosts ?? []) extensionHosts.add(componentName);
|
|
84
|
+
for (const componentName of descriptor.interactionPolicySupportedComponents ?? []) {
|
|
85
|
+
interactionPolicySupportedComponents.add(componentName);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
for (const descriptor of descriptors) {
|
|
90
|
+
for (const placement of descriptor.placements ?? []) {
|
|
91
|
+
applyPlacement({ descriptor, placement, componentMeta, extensionHosts });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
componentMeta: Object.fromEntries(componentMeta),
|
|
97
|
+
bindableComponentMeta: Object.fromEntries(componentMeta),
|
|
98
|
+
packageManifests: descriptors.map(({ packageName, displayName, componentMeta }) => ({
|
|
99
|
+
packageName,
|
|
100
|
+
...(displayName === undefined ? {} : { displayName }),
|
|
101
|
+
components: componentMeta,
|
|
102
|
+
})),
|
|
103
|
+
interactionPolicySupportedComponents: Object.fromEntries(
|
|
104
|
+
[...interactionPolicySupportedComponents]
|
|
105
|
+
.sort()
|
|
106
|
+
.map((componentName) => [componentName, true]),
|
|
107
|
+
),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/*** Compose a selected ZORA core/plugin descriptor set into one validated authoring/runtime catalog. */
|
|
112
|
+
export function composeZoraPlugins(
|
|
113
|
+
plugins: readonly ZoraPluginDescriptor[],
|
|
114
|
+
): ComposedZoraPluginCatalog {
|
|
115
|
+
const descriptors = sortPlugins(plugins);
|
|
116
|
+
const componentRegistry = new Map<string, ZoraComponentRegistry[string]>();
|
|
117
|
+
|
|
118
|
+
for (const descriptor of descriptors) {
|
|
119
|
+
validateRuntime(descriptor);
|
|
120
|
+
for (const [componentName, component] of sortedEntries(descriptor.componentRegistry)) {
|
|
121
|
+
componentRegistry.set(componentName, component);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const metadataCatalog = composeZoraPluginMetadata(descriptors);
|
|
125
|
+
|
|
126
|
+
return { ...metadataCatalog, componentRegistry: Object.fromEntries(componentRegistry) };
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function validateUniquePackage(descriptor: ZoraPluginMetadata, packages: Set<string>): void {
|
|
130
|
+
if (packages.has(descriptor.packageName)) {
|
|
131
|
+
throw compositionError(
|
|
132
|
+
'duplicate-package',
|
|
133
|
+
descriptor.packageName,
|
|
134
|
+
`Duplicate ZORA plugin package '${descriptor.packageName}'.`,
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
packages.add(descriptor.packageName);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function validateMetadata(descriptor: ZoraPluginMetadata): void {
|
|
141
|
+
for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {
|
|
142
|
+
if (meta.name !== componentName) {
|
|
143
|
+
throw compositionError(
|
|
144
|
+
'invalid-component-meta',
|
|
145
|
+
descriptor.packageName,
|
|
146
|
+
`ZORA plugin '${descriptor.packageName}' metadata key '${componentName}' does not match meta.name '${meta.name}'.`,
|
|
147
|
+
componentName,
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function validateRuntime(descriptor: ZoraPluginDescriptor): void {
|
|
154
|
+
const componentMetaNames = new Set(Object.keys(descriptor.componentMeta));
|
|
155
|
+
const runtimeComponentNames = new Set(Object.keys(descriptor.componentRegistry));
|
|
156
|
+
for (const componentName of sortedKeys(descriptor.componentRegistry)) {
|
|
157
|
+
if (!componentMetaNames.has(componentName)) {
|
|
158
|
+
throw compositionError(
|
|
159
|
+
'missing-component-meta',
|
|
160
|
+
descriptor.packageName,
|
|
161
|
+
`ZORA plugin '${descriptor.packageName}' registers runtime component '${componentName}' without component metadata.`,
|
|
162
|
+
componentName,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
for (const [componentName, meta] of sortedEntries(descriptor.componentMeta)) {
|
|
167
|
+
if (meta.directManifestNode && !runtimeComponentNames.has(componentName)) {
|
|
168
|
+
throw compositionError(
|
|
169
|
+
'missing-runtime-component',
|
|
170
|
+
descriptor.packageName,
|
|
171
|
+
`ZORA plugin '${descriptor.packageName}' exposes direct manifest node '${componentName}' without a runtime component.`,
|
|
172
|
+
componentName,
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
for (const componentName of descriptor.interactionPolicySupportedComponents ?? []) {
|
|
177
|
+
if (!runtimeComponentNames.has(componentName)) {
|
|
178
|
+
throw compositionError(
|
|
179
|
+
'invalid-interaction-policy-component',
|
|
180
|
+
descriptor.packageName,
|
|
181
|
+
`ZORA plugin '${descriptor.packageName}' declares interaction-policy support for unregistered component '${componentName}'.`,
|
|
182
|
+
componentName,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function claimComponent(
|
|
189
|
+
componentName: string,
|
|
190
|
+
packageName: string,
|
|
191
|
+
owners: Map<string, string>,
|
|
192
|
+
): void {
|
|
193
|
+
const existingOwner = owners.get(componentName);
|
|
194
|
+
if (existingOwner) {
|
|
195
|
+
throw compositionError(
|
|
196
|
+
'duplicate-component',
|
|
197
|
+
packageName,
|
|
198
|
+
`ZORA component '${componentName}' is owned by both '${existingOwner}' and '${packageName}'.`,
|
|
199
|
+
componentName,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
owners.set(componentName, packageName);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function applyPlacement(args: {
|
|
206
|
+
descriptor: ZoraPluginMetadata;
|
|
207
|
+
placement: ZoraPluginPlacement;
|
|
208
|
+
componentMeta: Map<string, ZoraComponentMeta>;
|
|
209
|
+
extensionHosts: ReadonlySet<string>;
|
|
210
|
+
}): void {
|
|
211
|
+
const { descriptor, placement, componentMeta, extensionHosts } = args;
|
|
212
|
+
const childMeta = descriptor.componentMeta[placement.child];
|
|
213
|
+
if (!childMeta?.directManifestNode) {
|
|
214
|
+
throw compositionError(
|
|
215
|
+
'invalid-placement-child',
|
|
216
|
+
descriptor.packageName,
|
|
217
|
+
`ZORA plugin '${descriptor.packageName}' placement child '${placement.child}' is not an owned direct manifest node.`,
|
|
218
|
+
placement.child,
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
for (const parentName of [...placement.parents].sort()) {
|
|
222
|
+
const parentMeta = componentMeta.get(parentName);
|
|
223
|
+
if (!parentMeta || !extensionHosts.has(parentName)) {
|
|
224
|
+
throw compositionError(
|
|
225
|
+
'invalid-placement-parent',
|
|
226
|
+
descriptor.packageName,
|
|
227
|
+
`ZORA plugin '${descriptor.packageName}' placement parent '${parentName}' is not a declared extension host.`,
|
|
228
|
+
placement.child,
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
componentMeta.set(parentName, addAllowedChild(parentMeta, placement.child));
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function addAllowedChild(meta: ZoraComponentMeta, child: string): ZoraComponentMeta {
|
|
236
|
+
const allowedChildren = appendUnique(meta.allowedChildren, child);
|
|
237
|
+
const childrenSlot = meta.slots?.children;
|
|
238
|
+
return {
|
|
239
|
+
...meta,
|
|
240
|
+
allowedChildren,
|
|
241
|
+
...(childrenSlot
|
|
242
|
+
? {
|
|
243
|
+
slots: {
|
|
244
|
+
...meta.slots,
|
|
245
|
+
children: {
|
|
246
|
+
...childrenSlot,
|
|
247
|
+
allowedChildren: appendUnique(childrenSlot.allowedChildren ?? [], child),
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
}
|
|
251
|
+
: {}),
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function appendUnique(values: readonly string[], value: string): readonly string[] {
|
|
256
|
+
return values.includes(value) ? values : [...values, value];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function sortedKeys(value: Readonly<Record<string, unknown>>): string[] {
|
|
260
|
+
return Object.keys(value).sort();
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function sortedEntries<T>(value: Readonly<Record<string, T>>): [string, T][] {
|
|
264
|
+
return Object.entries(value).sort(([left], [right]) => left.localeCompare(right));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function sortPlugins<T extends ZoraPluginMetadata>(plugins: readonly T[]): T[] {
|
|
268
|
+
return [...plugins].sort((left, right) => left.packageName.localeCompare(right.packageName));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function compositionError(
|
|
272
|
+
code: ZoraPluginCompositionErrorCode,
|
|
273
|
+
packageName: string,
|
|
274
|
+
message: string,
|
|
275
|
+
componentName?: string,
|
|
276
|
+
): ZoraPluginCompositionError {
|
|
277
|
+
return new ZoraPluginCompositionError({ code, packageName, message, componentName });
|
|
278
|
+
}
|