@ankhorage/zora 2.12.0 → 2.13.1

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 400863f: Define Screen scroll ownership explicitly: normal screens own scrolling, while `scroll={false}` preserves a bounded viewport for child-owned scroll and gesture surfaces. Require `@ankhorage/surface` 2.2.1 or newer so Stack preserves direct-child flex and min-size semantics throughout that viewport chain.
8
+
9
+ ## 2.13.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 04e4124: Make Image a first-class manifest-authoring node backed by canonical media metadata, with image-kind constraints and shared static metadata across the standard and bindable registries.
14
+
3
15
  ## 2.12.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # ZORA
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v2.11.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v2.13.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.
9
9
 
@@ -1,9 +1,30 @@
1
1
  export declare const imageMeta: {
2
2
  readonly name: "Image";
3
3
  readonly category: "component";
4
- readonly directManifestNode: false;
4
+ readonly description: "Displays an image from the app media registry or a resolved runtime source.";
5
+ readonly directManifestNode: true;
5
6
  readonly allowedChildren: readonly [];
6
- readonly note: "Media component; not represented as a manifest node in v1.";
7
- readonly props: {};
7
+ readonly blueprint: {
8
+ readonly label: "Image";
9
+ };
10
+ readonly props: {
11
+ readonly source: {
12
+ readonly type: "media";
13
+ readonly category: "Content";
14
+ readonly label: "Source";
15
+ readonly mediaKinds: readonly ["image"];
16
+ readonly authoring: {
17
+ readonly authority: "instance";
18
+ };
19
+ };
20
+ readonly alt: {
21
+ readonly type: "string";
22
+ readonly category: "Accessibility";
23
+ readonly label: "Alt text";
24
+ readonly authoring: {
25
+ readonly authority: "instance";
26
+ };
27
+ };
28
+ };
8
29
  };
9
30
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/image/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;CAOgB,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/image/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBgB,CAAC"}
@@ -1,9 +1,24 @@
1
1
  export const imageMeta = {
2
2
  name: 'Image',
3
3
  category: 'component',
4
- directManifestNode: false,
4
+ description: 'Displays an image from the app media registry or a resolved runtime source.',
5
+ directManifestNode: true,
5
6
  allowedChildren: [],
6
- note: 'Media component; not represented as a manifest node in v1.',
7
- props: {},
7
+ blueprint: { label: 'Image' },
8
+ props: {
9
+ source: {
10
+ type: 'media',
11
+ category: 'Content',
12
+ label: 'Source',
13
+ mediaKinds: ['image'],
14
+ authoring: { authority: 'instance' },
15
+ },
16
+ alt: {
17
+ type: 'string',
18
+ category: 'Accessibility',
19
+ label: 'Alt text',
20
+ authoring: { authority: 'instance' },
21
+ },
22
+ },
8
23
  };
9
24
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/image/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,4DAA4D;IAClE,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const imageMeta = {\n name: 'Image',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Media component; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/image/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,6EAA6E;IAC1F,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;IAC7B,KAAK,EAAE;QACL,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,QAAQ;YACf,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;QACD,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;YACzB,KAAK,EAAE,UAAU;YACjB,SAAS,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;SACrC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const imageMeta = {\n name: 'Image',\n category: 'component',\n description: 'Displays an image from the app media registry or a resolved runtime source.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: { label: 'Image' },\n props: {\n source: {\n type: 'media',\n category: 'Content',\n label: 'Source',\n mediaKinds: ['image'],\n authoring: { authority: 'instance' },\n },\n alt: {\n type: 'string',\n category: 'Accessibility',\n label: 'Alt text',\n authoring: { authority: 'instance' },\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { ScreenProps } from './types';
3
- /***
4
- * Page-level container with standard background and optional scroll behavior.
3
+ /**
4
+ * Outer content boundary for one app screen.
5
5
  *
6
-
6
+ * By default Screen owns normal vertical scrolling. Set `scroll={false}` to preserve a bounded
7
+ * viewport and delegate scroll or gesture ownership to specialized children such as lists, maps,
8
+ * chats, canvases, or editors.
7
9
  */
8
10
  export declare const Screen: (props: ScreenProps) => React.ReactElement | null;
9
11
  //# sourceMappingURL=Screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/layout/screen/Screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAoC3C;;;;GAIG;AACH,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
1
+ {"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/layout/screen/Screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiC3C;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,mDAAkC,CAAC"}
@@ -4,25 +4,27 @@ import { Box, Container, Stack } from '../../foundation';
4
4
  import { resolvePageMaxWidth } from '../../internal/recipes';
5
5
  import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
6
  function ScreenInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, children, footer, scroll = true, width = 'default', testID, }) {
7
- const content = (<Container maxWidth={resolvePageMaxWidth(width)} py="xl" testID={testID}>
8
- <Stack gap="l">
7
+ if (!scroll) {
8
+ return (<Box bg="background" flex={1} minHeight={0} minWidth={0} testID={testID}>
9
9
  {children}
10
10
  {footer}
11
- </Stack>
12
- </Container>);
13
- if (!scroll) {
14
- return (<Box bg="background" flex={1}>
15
- {content}
16
11
  </Box>);
17
12
  }
18
- return (<ScrollArea bg="background" style={{ flex: 1 }}>
19
- {content}
13
+ return (<ScrollArea bg="background" style={{ flex: 1, minHeight: 0, minWidth: 0 }}>
14
+ <Container maxWidth={resolvePageMaxWidth(width)} py="xl" testID={testID}>
15
+ <Stack gap="l">
16
+ {children}
17
+ {footer}
18
+ </Stack>
19
+ </Container>
20
20
  </ScrollArea>);
21
21
  }
22
- /***
23
- * Page-level container with standard background and optional scroll behavior.
22
+ /**
23
+ * Outer content boundary for one app screen.
24
24
  *
25
-
25
+ * By default Screen owns normal vertical scrolling. Set `scroll={false}` to preserve a bounded
26
+ * viewport and delegate scroll or gesture ownership to specialized children such as lists, maps,
27
+ * chats, canvases, or editors.
26
28
  */
27
29
  export const Screen = withZoraThemeScope(ScreenInner);
28
30
  //# sourceMappingURL=Screen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Screen.js","sourceRoot":"","sources":["../../../src/layout/screen/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,QAAQ,EACR,MAAM,EACN,MAAM,GAAG,IAAI,EACb,KAAK,GAAG,SAAS,EACjB,MAAM,GACM;IACZ,MAAM,OAAO,GAAG,CACd,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CACtE;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,QAAQ,CACT;QAAA,CAAC,MAAM,CACT;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;IAEF,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CACL,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAC3B;QAAA,CAAC,OAAO,CACV;MAAA,EAAE,GAAG,CAAC,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,UAAU,CAAC,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAC7C;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { ScrollArea } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Box, Container, Stack } from '../../foundation';\nimport { resolvePageMaxWidth } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ScreenProps } from './types';\n\nfunction ScreenInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n children,\n footer,\n scroll = true,\n width = 'default',\n testID,\n}: ScreenProps) {\n const content = (\n <Container maxWidth={resolvePageMaxWidth(width)} py=\"xl\" testID={testID}>\n <Stack gap=\"l\">\n {children}\n {footer}\n </Stack>\n </Container>\n );\n\n if (!scroll) {\n return (\n <Box bg=\"background\" flex={1}>\n {content}\n </Box>\n );\n }\n\n return (\n <ScrollArea bg=\"background\" style={{ flex: 1 }}>\n {content}\n </ScrollArea>\n );\n}\n\n/***\n * Page-level container with standard background and optional scroll behavior.\n *\n \n */\nexport const Screen = withZoraThemeScope(ScreenInner);\n"]}
1
+ {"version":3,"file":"Screen.js","sourceRoot":"","sources":["../../../src/layout/screen/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,WAAW,CAAC,EACnB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,QAAQ,EACR,MAAM,EACN,MAAM,GAAG,IAAI,EACb,KAAK,GAAG,SAAS,EACjB,MAAM,GACM;IACZ,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CACL,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CACtE;QAAA,CAAC,QAAQ,CACT;QAAA,CAAC,MAAM,CACT;MAAA,EAAE,GAAG,CAAC,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,UAAU,CAAC,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CACxE;MAAA,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CACtE;QAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;UAAA,CAAC,QAAQ,CACT;UAAA,CAAC,MAAM,CACT;QAAA,EAAE,KAAK,CACT;MAAA,EAAE,SAAS,CACb;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC","sourcesContent":["import { ScrollArea } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Box, Container, Stack } from '../../foundation';\nimport { resolvePageMaxWidth } from '../../internal/recipes';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ScreenProps } from './types';\n\nfunction ScreenInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n children,\n footer,\n scroll = true,\n width = 'default',\n testID,\n}: ScreenProps) {\n if (!scroll) {\n return (\n <Box bg=\"background\" flex={1} minHeight={0} minWidth={0} testID={testID}>\n {children}\n {footer}\n </Box>\n );\n }\n\n return (\n <ScrollArea bg=\"background\" style={{ flex: 1, minHeight: 0, minWidth: 0 }}>\n <Container maxWidth={resolvePageMaxWidth(width)} py=\"xl\" testID={testID}>\n <Stack gap=\"l\">\n {children}\n {footer}\n </Stack>\n </Container>\n </ScrollArea>\n );\n}\n\n/**\n * Outer content boundary for one app screen.\n *\n * By default Screen owns normal vertical scrolling. Set `scroll={false}` to preserve a bounded\n * viewport and delegate scroll or gesture ownership to specialized children such as lists, maps,\n * chats, canvases, or editors.\n */\nexport const Screen = withZoraThemeScope(ScreenInner);\n"]}
@@ -113,16 +113,11 @@ export declare const ZORA_BINDABLE_COMPONENT_META: {
113
113
  };
114
114
  };
115
115
  readonly Image: {
116
- readonly name: "Image";
117
- readonly category: "component";
118
- readonly description: "Displays an image asset or remote image source.";
119
- readonly directManifestNode: true;
120
- readonly allowedChildren: readonly [];
121
116
  readonly bindings: {
122
117
  readonly props: {
123
118
  readonly source: {
124
119
  readonly label: "Source";
125
- readonly description: "Image source or asset descriptor.";
120
+ readonly description: "Dynamic image source or asset descriptor.";
126
121
  readonly value: {
127
122
  readonly type: "imageAsset";
128
123
  readonly fields: readonly [{
@@ -148,11 +143,31 @@ export declare const ZORA_BINDABLE_COMPONENT_META: {
148
143
  };
149
144
  };
150
145
  };
146
+ readonly name: "Image";
147
+ readonly category: "component";
148
+ readonly description: "Displays an image from the app media registry or a resolved runtime source.";
149
+ readonly directManifestNode: true;
150
+ readonly allowedChildren: readonly [];
151
+ readonly blueprint: {
152
+ readonly label: "Image";
153
+ };
151
154
  readonly props: {
152
155
  readonly source: {
153
- readonly type: "imageAsset";
156
+ readonly type: "media";
154
157
  readonly category: "Content";
155
158
  readonly label: "Source";
159
+ readonly mediaKinds: readonly ["image"];
160
+ readonly authoring: {
161
+ readonly authority: "instance";
162
+ };
163
+ };
164
+ readonly alt: {
165
+ readonly type: "string";
166
+ readonly category: "Accessibility";
167
+ readonly label: "Alt text";
168
+ readonly authoring: {
169
+ readonly authority: "instance";
170
+ };
156
171
  };
157
172
  };
158
173
  };
@@ -1 +1 @@
1
- {"version":3,"file":"bindableComponentMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/bindableComponentMeta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4cG,CAAC;AAE7C,MAAM,MAAM,yBAAyB,GAAG,MAAM,OAAO,4BAA4B,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { imageMeta } from '../components/image/meta';
1
2
  export const ZORA_BINDABLE_COMPONENT_META = {
2
3
  Text: {
3
4
  name: 'Text',
@@ -105,16 +106,12 @@ export const ZORA_BINDABLE_COMPONENT_META = {
105
106
  },
106
107
  },
107
108
  Image: {
108
- name: 'Image',
109
- category: 'component',
110
- description: 'Displays an image asset or remote image source.',
111
- directManifestNode: true,
112
- allowedChildren: [],
109
+ ...imageMeta,
113
110
  bindings: {
114
111
  props: {
115
112
  source: {
116
113
  label: 'Source',
117
- description: 'Image source or asset descriptor.',
114
+ description: 'Dynamic image source or asset descriptor.',
118
115
  value: {
119
116
  type: 'imageAsset',
120
117
  fields: [
@@ -129,13 +126,6 @@ export const ZORA_BINDABLE_COMPONENT_META = {
129
126
  },
130
127
  },
131
128
  },
132
- props: {
133
- source: {
134
- type: 'imageAsset',
135
- category: 'Content',
136
- label: 'Source',
137
- },
138
- },
139
129
  },
140
130
  Input: {
141
131
  name: 'Input',
@@ -1 +1 @@
1
- {"version":3,"file":"bindableComponentMeta.js","sourceRoot":"","sources":["../../src/metadata/bindableComponentMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,WAAW;QACrB,WAAW,EAAE,mCAAmC;QAChD,kBAAkB,EAAE,IAAI;QACxB,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,yCAAyC;oBACtD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,eAAe,EAAE,IAAI;oBACrB,iBAAi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;oBACD,eAAe,EAAE,IAAI;oBACrB,iBAAiB,EAAE,IAAI;iBACxB;aACF;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,MAAM;gBAChB,KAAK,EAAE,MAAM;aACd;SACF;KACF;CACyC,CAAC","sourcesContent":["import type { UiComponentMetaRegistry } from '@ankhorage/contracts';\n\nexport const ZORA_BINDABLE_COMPONENT_META = {\n Text: {\n name: 'Text',\n category: 'component',\n description: 'Displays app-facing text content.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n text: {\n label: 'Text',\n description: 'Text content rendered by the component.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n text: {\n type: 'string',\n category: 'Content',\n label: 'Text',\n },\n },\n },\n Heading: {\n name: 'Heading',\n category: 'component',\n description: 'Displays semantic heading text.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n text: {\n label: 'Text',\n description: 'Heading text rendered by the component.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n text: {\n type: 'string',\n category: 'Content',\n label: 'Text',\n },\n },\n },\n Button: {\n name: 'Button',\n category: 'component',\n description: 'Runs an action when pressed.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n children: {\n label: 'Label',\n description: 'Button label text.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the button is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n press: {\n label: 'Press',\n description: 'Runs when the button is pressed.',\n payload: {\n eventType: 'button.press',\n fields: [],\n },\n },\n },\n },\n events: {\n press: {\n label: 'Press',\n eventType: 'button.press',\n description: 'Emitted when the button action runs.',\n payloadFields: [],\n },\n },\n props: {\n children: {\n type: 'string',\n category: 'Content',\n label: 'Label',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n Image: {\n name: 'Image',\n category: 'component',\n description: 'Displays an image asset or remote image source.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n source: {\n label: 'Source',\n description: 'Image source or asset descriptor.',\n value: {\n type: 'imageAsset',\n fields: [\n { path: 'uri', type: 'string', label: 'URI' },\n { path: 'width', type: 'number', label: 'Width' },\n { path: 'height', type: 'number', label: 'Height' },\n { path: 'alt', type: 'string', label: 'Alt text' },\n ],\n },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n source: {\n type: 'imageAsset',\n category: 'Content',\n label: 'Source',\n },\n },\n },\n Input: {\n name: 'Input',\n category: 'component',\n description: 'Captures a single-line string value.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Current input value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the input is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n changeText: {\n label: 'Change text',\n description: 'Runs when the input value changes.',\n payload: {\n eventType: 'input.changeText',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n changeText: {\n label: 'Change text',\n eventType: 'input.changeText',\n description: 'Emitted when the input value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n props: {\n value: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n Textarea: {\n name: 'Textarea',\n category: 'component',\n description: 'Captures a multiline string value.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Current textarea value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the textarea is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n changeText: {\n label: 'Change text',\n description: 'Runs when the textarea value changes.',\n payload: {\n eventType: 'textarea.changeText',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n changeText: {\n label: 'Change text',\n eventType: 'textarea.changeText',\n description: 'Emitted when the textarea value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n props: {\n value: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n Select: {\n name: 'Select',\n category: 'component',\n description: 'Captures one selected string value.',\n directManifestNode: false,\n allowedChildren: [],\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Current selected value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the select is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n description: 'Runs when the selected value changes.',\n payload: {\n eventType: 'select.valueChange',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n eventType: 'select.valueChange',\n description: 'Emitted when the selected value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n note: 'Form control component; not represented as a manifest node in v1.',\n props: {\n value: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n Checkbox: {\n name: 'Checkbox',\n category: 'component',\n description: 'Captures a boolean checked state.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n checked: {\n label: 'Checked',\n description: 'Current checked state.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the checkbox is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n checkedChange: {\n label: 'Checked change',\n description: 'Runs when checked state changes.',\n payload: {\n eventType: 'checkbox.checkedChange',\n fields: [{ path: 'checked', type: 'boolean', label: 'Checked' }],\n },\n },\n },\n },\n events: {\n checkedChange: {\n label: 'Checked change',\n eventType: 'checkbox.checkedChange',\n description: 'Emitted when the checked state changes.',\n payloadFields: [{ path: 'checked', type: 'boolean', label: 'Checked' }],\n },\n },\n props: {\n checked: {\n type: 'boolean',\n category: 'State',\n label: 'Checked',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n SwitchField: {\n name: 'SwitchField',\n category: 'pattern',\n description: 'Captures a boolean switch value with a label.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Current switch value.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the switch is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n description: 'Runs when the switch value changes.',\n payload: {\n eventType: 'switchField.valueChange',\n fields: [{ path: 'value', type: 'boolean', label: 'Value' }],\n },\n },\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n eventType: 'switchField.valueChange',\n description: 'Emitted when the switch value changes.',\n payloadFields: [{ path: 'value', type: 'boolean', label: 'Value' }],\n },\n },\n props: {\n value: {\n type: 'boolean',\n category: 'State',\n label: 'Value',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n List: {\n name: 'List',\n category: 'pattern',\n description: 'Renders a collection of list items.',\n directManifestNode: true,\n allowedChildren: ['ListSection', 'ListRow'],\n bindings: {\n props: {\n items: {\n label: 'Items',\n description: 'Collection rendered by the list.',\n value: {\n type: 'array',\n itemType: 'object',\n },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n items: {\n type: 'array',\n category: 'Data',\n label: 'Items',\n },\n },\n },\n DataTable: {\n name: 'DataTable',\n category: 'component',\n description: 'Renders tabular records.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n rows: {\n label: 'Rows',\n description: 'Rows rendered by the table.',\n value: {\n type: 'array',\n itemType: 'record',\n },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n rows: {\n type: 'array',\n category: 'Data',\n label: 'Rows',\n },\n },\n },\n} as const satisfies UiComponentMetaRegistry;\n\nexport type ZoraBindableComponentType = keyof typeof ZORA_BINDABLE_COMPONENT_META;\n"]}
1
+ {"version":3,"file":"bindableComponentMeta.js","sourceRoot":"","sources":["../../src/metadata/bindableComponentMeta.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,WAAW;QACrB,WAAW,EAAE,mCAAmC;QAChD,kBAAkB,EAAE,IAAI;QACxB,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,yCAAyC;oBACtD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,eAAe,EAAE,IAAI;oBACrB,iBAAiB,EAAE,IAAI;iBACxB;aACF;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,SAAS;gBACnB,KAAK,EAAE,MAAM;aACd;SACF;KACF;IACD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,WAAW;Q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AAqC;QAClD,kBAAkB,EAAE,IAAI;QACxB,eAAe,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC;QAC3C,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,KAAK,EAAE;oBACL,KAAK,EAAE,OAAO;oBACd,WAAW,EAAE,kCAAkC;oBAC/C,KAAK,EAAE;wBACL,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,QAAQ;qBACnB;oBACD,eAAe,EAAE,IAAI;oBACrB,iBAAiB,EAAE,IAAI;iBACxB;aACF;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,MAAM;gBAChB,KAAK,EAAE,OAAO;aACf;SACF;KACF;IACD,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,WAAW;QACrB,WAAW,EAAE,0BAA0B;QACvC,kBAAkB,EAAE,IAAI;QACxB,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,6BAA6B;oBAC1C,KAAK,EAAE;wBACL,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,QAAQ;qBACnB;oBACD,eAAe,EAAE,IAAI;oBACrB,iBAAiB,EAAE,IAAI;iBACxB;aACF;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,MAAM;gBAChB,KAAK,EAAE,MAAM;aACd;SACF;KACF;CACyC,CAAC","sourcesContent":["import type { UiComponentMetaRegistry } from '@ankhorage/contracts';\n\nimport { imageMeta } from '../components/image/meta';\n\nexport const ZORA_BINDABLE_COMPONENT_META = {\n Text: {\n name: 'Text',\n category: 'component',\n description: 'Displays app-facing text content.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n text: {\n label: 'Text',\n description: 'Text content rendered by the component.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n text: {\n type: 'string',\n category: 'Content',\n label: 'Text',\n },\n },\n },\n Heading: {\n name: 'Heading',\n category: 'component',\n description: 'Displays semantic heading text.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n text: {\n label: 'Text',\n description: 'Heading text rendered by the component.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n text: {\n type: 'string',\n category: 'Content',\n label: 'Text',\n },\n },\n },\n Button: {\n name: 'Button',\n category: 'component',\n description: 'Runs an action when pressed.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n children: {\n label: 'Label',\n description: 'Button label text.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the button is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n press: {\n label: 'Press',\n description: 'Runs when the button is pressed.',\n payload: {\n eventType: 'button.press',\n fields: [],\n },\n },\n },\n },\n events: {\n press: {\n label: 'Press',\n eventType: 'button.press',\n description: 'Emitted when the button action runs.',\n payloadFields: [],\n },\n },\n props: {\n children: {\n type: 'string',\n category: 'Content',\n label: 'Label',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n Image: {\n ...imageMeta,\n bindings: {\n props: {\n source: {\n label: 'Source',\n description: 'Dynamic image source or asset descriptor.',\n value: {\n type: 'imageAsset',\n fields: [\n { path: 'uri', type: 'string', label: 'URI' },\n { path: 'width', type: 'number', label: 'Width' },\n { path: 'height', type: 'number', label: 'Height' },\n { path: 'alt', type: 'string', label: 'Alt text' },\n ],\n },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n },\n Input: {\n name: 'Input',\n category: 'component',\n description: 'Captures a single-line string value.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Current input value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the input is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n changeText: {\n label: 'Change text',\n description: 'Runs when the input value changes.',\n payload: {\n eventType: 'input.changeText',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n changeText: {\n label: 'Change text',\n eventType: 'input.changeText',\n description: 'Emitted when the input value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n props: {\n value: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n Textarea: {\n name: 'Textarea',\n category: 'component',\n description: 'Captures a multiline string value.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Current textarea value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the textarea is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n changeText: {\n label: 'Change text',\n description: 'Runs when the textarea value changes.',\n payload: {\n eventType: 'textarea.changeText',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n changeText: {\n label: 'Change text',\n eventType: 'textarea.changeText',\n description: 'Emitted when the textarea value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n props: {\n value: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n Select: {\n name: 'Select',\n category: 'component',\n description: 'Captures one selected string value.',\n directManifestNode: false,\n allowedChildren: [],\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Current selected value.',\n value: { type: 'string' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the select is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n description: 'Runs when the selected value changes.',\n payload: {\n eventType: 'select.valueChange',\n fields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n eventType: 'select.valueChange',\n description: 'Emitted when the selected value changes.',\n payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],\n },\n },\n note: 'Form control component; not represented as a manifest node in v1.',\n props: {\n value: {\n type: 'string',\n category: 'Content',\n label: 'Value',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n Checkbox: {\n name: 'Checkbox',\n category: 'component',\n description: 'Captures a boolean checked state.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n checked: {\n label: 'Checked',\n description: 'Current checked state.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the checkbox is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n checkedChange: {\n label: 'Checked change',\n description: 'Runs when checked state changes.',\n payload: {\n eventType: 'checkbox.checkedChange',\n fields: [{ path: 'checked', type: 'boolean', label: 'Checked' }],\n },\n },\n },\n },\n events: {\n checkedChange: {\n label: 'Checked change',\n eventType: 'checkbox.checkedChange',\n description: 'Emitted when the checked state changes.',\n payloadFields: [{ path: 'checked', type: 'boolean', label: 'Checked' }],\n },\n },\n props: {\n checked: {\n type: 'boolean',\n category: 'State',\n label: 'Checked',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n SwitchField: {\n name: 'SwitchField',\n category: 'pattern',\n description: 'Captures a boolean switch value with a label.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n value: {\n label: 'Value',\n description: 'Current switch value.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n disabled: {\n label: 'Disabled',\n description: 'Whether the switch is disabled.',\n value: { type: 'boolean' },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n description: 'Runs when the switch value changes.',\n payload: {\n eventType: 'switchField.valueChange',\n fields: [{ path: 'value', type: 'boolean', label: 'Value' }],\n },\n },\n },\n },\n events: {\n valueChange: {\n label: 'Value change',\n eventType: 'switchField.valueChange',\n description: 'Emitted when the switch value changes.',\n payloadFields: [{ path: 'value', type: 'boolean', label: 'Value' }],\n },\n },\n props: {\n value: {\n type: 'boolean',\n category: 'State',\n label: 'Value',\n },\n disabled: {\n type: 'boolean',\n category: 'State',\n label: 'Disabled',\n },\n },\n },\n List: {\n name: 'List',\n category: 'pattern',\n description: 'Renders a collection of list items.',\n directManifestNode: true,\n allowedChildren: ['ListSection', 'ListRow'],\n bindings: {\n props: {\n items: {\n label: 'Items',\n description: 'Collection rendered by the list.',\n value: {\n type: 'array',\n itemType: 'object',\n },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n items: {\n type: 'array',\n category: 'Data',\n label: 'Items',\n },\n },\n },\n DataTable: {\n name: 'DataTable',\n category: 'component',\n description: 'Renders tabular records.',\n directManifestNode: true,\n allowedChildren: [],\n bindings: {\n props: {\n rows: {\n label: 'Rows',\n description: 'Rows rendered by the table.',\n value: {\n type: 'array',\n itemType: 'record',\n },\n acceptsFallback: true,\n acceptsTransforms: true,\n },\n },\n },\n props: {\n rows: {\n type: 'array',\n category: 'Data',\n label: 'Rows',\n },\n },\n },\n} as const satisfies UiComponentMetaRegistry;\n\nexport type ZoraBindableComponentType = keyof typeof ZORA_BINDABLE_COMPONENT_META;\n"]}
@@ -1,6 +1,6 @@
1
- import type { ComponentEventDtoKind, ComponentRequirements } from '@ankhorage/contracts';
1
+ import type { ComponentEventDtoKind, ComponentRequirements, MediaAssetKind, UiComponentPropType } from '@ankhorage/contracts';
2
2
  export type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';
3
- export type ZoraComponentPropType = 'string' | 'number' | 'boolean' | 'enum' | 'color' | 'spacing' | 'radius' | 'shadow' | 'typographySize' | 'typographyWeight' | 'action' | 'imageAsset' | 'array';
3
+ export type ZoraComponentPropType = UiComponentPropType;
4
4
  export type ZoraComponentPropValue = string | number | boolean | null | readonly ZoraComponentPropValue[] | {
5
5
  readonly [key: string]: ZoraComponentPropValue;
6
6
  };
@@ -22,6 +22,7 @@ export interface ZoraComponentPropSchema {
22
22
  enum?: readonly (string | number)[];
23
23
  default?: ZoraComponentPropValue;
24
24
  itemSchema?: readonly ZoraComponentPropArrayItemSchema[];
25
+ mediaKinds?: readonly MediaAssetKind[];
25
26
  authoring?: ZoraComponentPropAuthoring;
26
27
  }
27
28
  export interface ZoraComponentBlueprint {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAEzF,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtF,MAAM,MAAM,qBAAqB,GAC7B,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC;AAEZ,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;C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M,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,qBAAqB,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,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 { ComponentEventDtoKind, ComponentRequirements } from '@ankhorage/contracts';\n\nexport type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';\n\nexport type ZoraComponentPropType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'color'\n | 'spacing'\n | 'radius'\n | 'shadow'\n | 'typographySize'\n | 'typographyWeight'\n | 'action'\n | 'imageAsset'\n | 'array';\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 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'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | '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 ZoraComponentMeta {\n name: string;\n category: ZoraComponentCategory;\n description?: string;\n directManifestNode: boolean;\n allowedChildren: readonly string[];\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 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'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | '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 ZoraComponentMeta {\n name: string;\n category: ZoraComponentCategory;\n description?: string;\n directManifestNode: boolean;\n allowedChildren: readonly string[];\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"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "2.12.0",
4
+ "version": "2.13.1",
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": {
@@ -42,8 +42,8 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@ankhorage/color-theory": "^0.0.8",
45
- "@ankhorage/contracts": "^7.2.0",
46
- "@ankhorage/surface": "^2.2.0"
45
+ "@ankhorage/contracts": "^7.6.0",
46
+ "@ankhorage/surface": "^2.2.1"
47
47
  },
48
48
  "files": [
49
49
  "dist",
@@ -3,8 +3,23 @@ import type { ZoraComponentMeta } from '../../metadata';
3
3
  export const imageMeta = {
4
4
  name: 'Image',
5
5
  category: 'component',
6
- directManifestNode: false,
6
+ description: 'Displays an image from the app media registry or a resolved runtime source.',
7
+ directManifestNode: true,
7
8
  allowedChildren: [],
8
- note: 'Media component; not represented as a manifest node in v1.',
9
- props: {},
9
+ blueprint: { label: 'Image' },
10
+ props: {
11
+ source: {
12
+ type: 'media',
13
+ category: 'Content',
14
+ label: 'Source',
15
+ mediaKinds: ['image'],
16
+ authoring: { authority: 'instance' },
17
+ },
18
+ alt: {
19
+ type: 'string',
20
+ category: 'Accessibility',
21
+ label: 'Alt text',
22
+ authoring: { authority: 'instance' },
23
+ },
24
+ },
10
25
  } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,22 @@
1
+ import { readFile } from 'node:fs/promises';
2
+
3
+ import { describe, expect, it } from 'bun:test';
4
+
5
+ describe('Screen scroll ownership contract', () => {
6
+ it('keeps scroll=false as a bounded delegated viewport', async () => {
7
+ const source = await readFile(new URL('./Screen.tsx', import.meta.url), 'utf8');
8
+
9
+ expect(source).toContain('if (!scroll)');
10
+ expect(source).toContain('flex={1} minHeight={0} minWidth={0}');
11
+ expect(source).toContain('{children}');
12
+ expect(source).not.toContain('{content}');
13
+ });
14
+
15
+ it('keeps normal scrolling owned by Screen', async () => {
16
+ const source = await readFile(new URL('./Screen.tsx', import.meta.url), 'utf8');
17
+
18
+ expect(source).toContain('<ScrollArea');
19
+ expect(source).toContain('style={{ flex: 1, minHeight: 0, minWidth: 0 }}');
20
+ expect(source).toContain('<Container maxWidth={resolvePageMaxWidth(width)}');
21
+ });
22
+ });
@@ -16,33 +16,32 @@ function ScreenInner({
16
16
  width = 'default',
17
17
  testID,
18
18
  }: ScreenProps) {
19
- const content = (
20
- <Container maxWidth={resolvePageMaxWidth(width)} py="xl" testID={testID}>
21
- <Stack gap="l">
22
- {children}
23
- {footer}
24
- </Stack>
25
- </Container>
26
- );
27
-
28
19
  if (!scroll) {
29
20
  return (
30
- <Box bg="background" flex={1}>
31
- {content}
21
+ <Box bg="background" flex={1} minHeight={0} minWidth={0} testID={testID}>
22
+ {children}
23
+ {footer}
32
24
  </Box>
33
25
  );
34
26
  }
35
27
 
36
28
  return (
37
- <ScrollArea bg="background" style={{ flex: 1 }}>
38
- {content}
29
+ <ScrollArea bg="background" style={{ flex: 1, minHeight: 0, minWidth: 0 }}>
30
+ <Container maxWidth={resolvePageMaxWidth(width)} py="xl" testID={testID}>
31
+ <Stack gap="l">
32
+ {children}
33
+ {footer}
34
+ </Stack>
35
+ </Container>
39
36
  </ScrollArea>
40
37
  );
41
38
  }
42
39
 
43
- /***
44
- * Page-level container with standard background and optional scroll behavior.
40
+ /**
41
+ * Outer content boundary for one app screen.
45
42
  *
46
-
43
+ * By default Screen owns normal vertical scrolling. Set `scroll={false}` to preserve a bounded
44
+ * viewport and delegate scroll or gesture ownership to specialized children such as lists, maps,
45
+ * chats, canvases, or editors.
47
46
  */
48
47
  export const Screen = withZoraThemeScope(ScreenInner);
@@ -2,6 +2,7 @@ import type { UiComponentMetaRegistry } from '@ankhorage/contracts';
2
2
  import { describe, expect, it } from 'bun:test';
3
3
 
4
4
  import { ZORA_BINDABLE_COMPONENT_META } from './bindableComponentMeta';
5
+ import { ZORA_COMPONENT_META } from './componentMeta';
5
6
 
6
7
  describe('ZORA bindable component metadata', () => {
7
8
  it('matches the shared UI metadata registry shape', () => {
@@ -15,4 +16,16 @@ describe('ZORA bindable component metadata', () => {
15
16
  expect(registry.Image?.bindings?.props?.source?.value.type).toBe('imageAsset');
16
17
  expect(registry.DataTable?.bindings?.props?.rows?.value.type).toBe('array');
17
18
  });
19
+
20
+ it('shares canonical Image authoring metadata while preserving dynamic image bindings', () => {
21
+ const image = ZORA_BINDABLE_COMPONENT_META.Image;
22
+
23
+ expect(image.props.source).toMatchObject({
24
+ type: 'media',
25
+ mediaKinds: ['image'],
26
+ });
27
+ expect(image.props).toEqual(ZORA_COMPONENT_META.Image.props);
28
+ expect(image.directManifestNode).toBe(ZORA_COMPONENT_META.Image.directManifestNode);
29
+ expect(image.bindings.props.source.value.type).toBe('imageAsset');
30
+ });
18
31
  });
@@ -1,5 +1,7 @@
1
1
  import type { UiComponentMetaRegistry } from '@ankhorage/contracts';
2
2
 
3
+ import { imageMeta } from '../components/image/meta';
4
+
3
5
  export const ZORA_BINDABLE_COMPONENT_META = {
4
6
  Text: {
5
7
  name: 'Text',
@@ -107,16 +109,12 @@ export const ZORA_BINDABLE_COMPONENT_META = {
107
109
  },
108
110
  },
109
111
  Image: {
110
- name: 'Image',
111
- category: 'component',
112
- description: 'Displays an image asset or remote image source.',
113
- directManifestNode: true,
114
- allowedChildren: [],
112
+ ...imageMeta,
115
113
  bindings: {
116
114
  props: {
117
115
  source: {
118
116
  label: 'Source',
119
- description: 'Image source or asset descriptor.',
117
+ description: 'Dynamic image source or asset descriptor.',
120
118
  value: {
121
119
  type: 'imageAsset',
122
120
  fields: [
@@ -131,13 +129,6 @@ export const ZORA_BINDABLE_COMPONENT_META = {
131
129
  },
132
130
  },
133
131
  },
134
- props: {
135
- source: {
136
- type: 'imageAsset',
137
- category: 'Content',
138
- label: 'Source',
139
- },
140
- },
141
132
  },
142
133
  Input: {
143
134
  name: 'Input',
@@ -124,6 +124,7 @@ describe('ZORA_COMPONENT_META invariants', () => {
124
124
  'Textarea',
125
125
  'Text',
126
126
  'Heading',
127
+ 'Image',
127
128
  'Divider',
128
129
  'ChatListItem',
129
130
  'CameraPermissionView',
@@ -172,6 +173,19 @@ describe('ZORA_COMPONENT_META invariants', () => {
172
173
  }
173
174
  });
174
175
 
176
+ test('Image is a direct manifest leaf with canonical media authoring metadata', () => {
177
+ expect(ZORA_COMPONENT_META.Image.directManifestNode).toBe(true);
178
+ expect(ZORA_COMPONENT_META.Image.allowedChildren).toEqual([]);
179
+ expect(ZORA_COMPONENT_META.Image.props.source).toEqual({
180
+ type: 'media',
181
+ category: 'Content',
182
+ label: 'Source',
183
+ mediaKinds: ['image'],
184
+ authoring: { authority: 'instance' },
185
+ });
186
+ expect(ZORA_COMPONENT_META.Image.props.alt?.authoring).toEqual({ authority: 'instance' });
187
+ });
188
+
175
189
  test('ThemeModeToggle is a direct manifest leaf with serializable defaults', () => {
176
190
  expect(ZORA_COMPONENT_META.ThemeModeToggle.directManifestNode).toBe(true);
177
191
  expect(ZORA_COMPONENT_META.ThemeModeToggle.allowedChildren).toEqual([]);
@@ -1,21 +1,13 @@
1
- import type { ComponentEventDtoKind, ComponentRequirements } from '@ankhorage/contracts';
1
+ import type {
2
+ ComponentEventDtoKind,
3
+ ComponentRequirements,
4
+ MediaAssetKind,
5
+ UiComponentPropType,
6
+ } from '@ankhorage/contracts';
2
7
 
3
8
  export type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';
4
9
 
5
- export type ZoraComponentPropType =
6
- | 'string'
7
- | 'number'
8
- | 'boolean'
9
- | 'enum'
10
- | 'color'
11
- | 'spacing'
12
- | 'radius'
13
- | 'shadow'
14
- | 'typographySize'
15
- | 'typographyWeight'
16
- | 'action'
17
- | 'imageAsset'
18
- | 'array';
10
+ export type ZoraComponentPropType = UiComponentPropType;
19
11
 
20
12
  export type ZoraComponentPropValue =
21
13
  | string
@@ -45,6 +37,7 @@ export interface ZoraComponentPropSchema {
45
37
  enum?: readonly (string | number)[];
46
38
  default?: ZoraComponentPropValue;
47
39
  itemSchema?: readonly ZoraComponentPropArrayItemSchema[];
40
+ mediaKinds?: readonly MediaAssetKind[];
48
41
  authoring?: ZoraComponentPropAuthoring;
49
42
  }
50
43