@ankhorage/zora 19.0.1 → 20.0.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 +12 -0
- package/README.md +1 -1
- package/dist/features/authoring/bindableComponentMeta.d.ts +3 -3
- package/dist/features/reader/meta.d.ts +3 -3
- package/dist/features/reader/meta.js +1 -1
- package/dist/features/reader/meta.js.map +1 -1
- package/dist/features/scanner/meta.d.ts +9 -9
- package/dist/features/scanner/meta.js +3 -3
- package/dist/features/scanner/meta.js.map +1 -1
- package/package.json +9 -8
- package/src/features/authoring/componentMeta.test.ts +4 -4
- package/src/features/reader/meta.ts +1 -1
- package/src/features/scanner/meta.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 20.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 61dec14: Update Ankhorage dependencies: `@ankhorage/color-theory`, `@ankhorage/contracts`, `@ankhorage/paradox`.
|
|
8
|
+
|
|
9
|
+
## 20.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 6fbcac7: Migrate published component requirement metadata to the canonical Contracts 22 serializable set representation.
|
|
14
|
+
|
|
3
15
|
## 19.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# @ankhorage/zora
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.
|
|
9
9
|
|
|
@@ -685,9 +685,9 @@ export declare const ZORA_BINDABLE_COMPONENT_META: {
|
|
|
685
685
|
readonly description: "Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.";
|
|
686
686
|
readonly directManifestNode: true;
|
|
687
687
|
readonly requirements: {
|
|
688
|
-
readonly capabilities:
|
|
689
|
-
readonly
|
|
690
|
-
}
|
|
688
|
+
readonly capabilities: {
|
|
689
|
+
readonly ebookReader: true;
|
|
690
|
+
};
|
|
691
691
|
};
|
|
692
692
|
readonly allowedChildren: readonly [];
|
|
693
693
|
readonly blueprint: {
|
|
@@ -4,9 +4,9 @@ export declare const readerSurfaceMeta: {
|
|
|
4
4
|
readonly description: "Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.";
|
|
5
5
|
readonly directManifestNode: true;
|
|
6
6
|
readonly requirements: {
|
|
7
|
-
readonly capabilities:
|
|
8
|
-
readonly
|
|
9
|
-
}
|
|
7
|
+
readonly capabilities: {
|
|
8
|
+
readonly ebookReader: true;
|
|
9
|
+
};
|
|
10
10
|
};
|
|
11
11
|
readonly allowedChildren: readonly [];
|
|
12
12
|
readonly blueprint: {
|
|
@@ -6,7 +6,7 @@ export const readerSurfaceMeta = {
|
|
|
6
6
|
description: 'Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.',
|
|
7
7
|
directManifestNode: true,
|
|
8
8
|
requirements: {
|
|
9
|
-
capabilities:
|
|
9
|
+
capabilities: { ebookReader: true },
|
|
10
10
|
},
|
|
11
11
|
allowedChildren: [],
|
|
12
12
|
blueprint: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/features/reader/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,kBAAkB,GAAG,EAAW,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,oGAAoG;IACtG,kBAAkB,EAAE,IAAI;IACxB,YAAY,EAAE;QACZ,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;KAC9C;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AQ;YAClB,KAAK,EAAE,sBAAsB;SAC9B;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,wBAAwB;SAChC;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,yBAAyB;SACjC;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,2BAA2B;SACnC;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,qBAAqB;SAC7B;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../authoring';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../authoring/allowedChildren';\n\nconst EMPTY_EVENT_FIELDS = [] as const;\n\nexport const readerSurfaceMeta = {\n name: 'ReaderSurface',\n category: 'pattern',\n description:\n 'Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.',\n directManifestNode: true,\n requirements: {\n capabilities: [{ capability: 'ebookReader' }],\n },\n allowedChildren: [],\n blueprint: {\n label: 'Reader',\n defaultProps: {\n format: 'epub',\n status: 'idle',\n showChrome: true,\n readerColorScheme: 'system',\n fontScale: 1,\n lineHeight: 'normal',\n },\n },\n events: {\n previousPage: {\n label: 'Previous page',\n eventType: 'reader.previousPage',\n description: 'Requests navigation to the previous page.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n nextPage: {\n label: 'Next page',\n eventType: 'reader.nextPage',\n description: 'Requests navigation to the next page.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n locationChange: {\n label: 'Location change',\n eventType: 'reader.locationChange',\n description: 'Emitted by the adapter after the destination has been displayed.',\n payloadFields: [\n { path: 'format', type: 'string', label: 'Format' },\n { path: 'locator', type: 'string', label: 'Opaque locator' },\n { path: 'page', type: 'number', label: 'Page' },\n { path: 'pageCount', type: 'number', label: 'Page count' },\n { path: 'progression', type: 'number', label: 'Progression' },\n { path: 'chapterId', type: 'string', label: 'Chapter ID' },\n { path: 'chapterTitle', type: 'string', label: 'Chapter title' },\n { path: 'trigger', type: 'string', label: 'Navigation trigger' },\n ],\n },\n openContents: {\n label: 'Open contents',\n eventType: 'reader.openContents',\n description: 'Requests the app-owned table of contents.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n openAppearance: {\n label: 'Open appearance',\n eventType: 'reader.openAppearance',\n description: 'Requests the app-owned reader appearance controls.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n toggleHighlight: {\n label: 'Toggle highlight',\n eventType: 'reader.toggleHighlight',\n description: 'Requests the app-owned highlight action.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n openExternalLink: {\n label: 'Open external link',\n eventType: 'reader.openExternalLink',\n description: 'Emitted when publication content requests an external URL.',\n payloadFields: [{ path: 'url', type: 'string', label: 'URL' }],\n },\n readerError: {\n label: 'Reader error',\n eventType: 'reader.error',\n description: 'Emitted when the adapter rejects or cannot load a document.',\n payloadFields: [\n { path: 'code', type: 'string', label: 'Error code' },\n { path: 'format', type: 'string', label: 'Format' },\n { path: 'message', type: 'string', label: 'Message' },\n ],\n },\n },\n slots: {\n viewport: {\n label: 'Reader viewport adapter',\n allowedChildren: [],\n },\n headerActions: {\n label: 'Header actions',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n footerActions: {\n label: 'Footer actions',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n },\n props: {\n source: {\n type: 'media',\n category: 'Document',\n label: 'Source',\n mediaKinds: ['file'],\n },\n format: {\n type: 'enum',\n category: 'Document',\n label: 'Format',\n enum: ['epub', 'pdf'],\n default: 'epub',\n },\n location: {\n type: 'string',\n category: 'State',\n label: 'Location',\n },\n status: {\n type: 'enum',\n category: 'State',\n label: 'Status',\n enum: ['idle', 'loading', 'ready', 'error'],\n default: 'idle',\n },\n page: {\n type: 'number',\n category: 'State',\n label: 'Page',\n },\n pageCount: {\n type: 'number',\n category: 'State',\n label: 'Page count',\n },\n progress: {\n type: 'number',\n category: 'State',\n label: 'Progress',\n },\n canGoPrevious: {\n type: 'boolean',\n category: 'State',\n label: 'Can go previous',\n },\n canGoNext: {\n type: 'boolean',\n category: 'State',\n label: 'Can go next',\n },\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n },\n subtitle: {\n type: 'string',\n category: 'Content',\n label: 'Subtitle',\n },\n chapterLabel: {\n type: 'string',\n category: 'Content',\n label: 'Chapter label',\n },\n pageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Page label',\n },\n previousPageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Previous page label',\n default: 'Previous page',\n },\n nextPageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Next page label',\n default: 'Next page',\n },\n contentsLabel: {\n type: 'string',\n category: 'Content',\n label: 'Contents label',\n default: 'Table of contents',\n },\n appearanceLabel: {\n type: 'string',\n category: 'Content',\n label: 'Appearance label',\n default: 'Reading appearance',\n },\n highlightLabel: {\n type: 'string',\n category: 'Content',\n label: 'Highlight label',\n default: 'Toggle highlight',\n },\n loadingLabel: {\n type: 'string',\n category: 'Content',\n label: 'Loading label',\n default: 'Loading document…',\n },\n errorTitle: {\n type: 'string',\n category: 'Content',\n label: 'Error title',\n default: 'Unable to open this document.',\n },\n unavailableTitle: {\n type: 'string',\n category: 'Content',\n label: 'Unavailable title',\n default: 'Reader preview unavailable.',\n },\n showChrome: {\n type: 'boolean',\n category: 'Chrome',\n label: 'Show chrome',\n default: true,\n },\n readerColorScheme: {\n type: 'enum',\n category: 'Appearance',\n label: 'Color scheme',\n enum: ['system', 'light', 'dark', 'sepia'],\n default: 'system',\n },\n fontScale: {\n type: 'number',\n category: 'Appearance',\n label: 'Font scale',\n default: 1,\n },\n lineHeight: {\n type: 'enum',\n category: 'Appearance',\n label: 'Line height',\n enum: ['compact', 'normal', 'relaxed'],\n default: 'normal',\n },\n highlighted: {\n type: 'boolean',\n category: 'State',\n label: 'Highlighted',\n default: false,\n },\n onPreviousPage: {\n type: 'action',\n category: 'Events',\n label: 'Previous page action',\n },\n onNextPage: {\n type: 'action',\n category: 'Events',\n label: 'Next page action',\n },\n onLocationChange: {\n type: 'action',\n category: 'Events',\n label: 'Location change action',\n },\n onOpenContents: {\n type: 'action',\n category: 'Events',\n label: 'Open contents action',\n },\n onOpenAppearance: {\n type: 'action',\n category: 'Events',\n label: 'Open appearance action',\n },\n onToggleHighlight: {\n type: 'action',\n category: 'Events',\n label: 'Toggle highlight action',\n },\n onOpenExternalLink: {\n type: 'action',\n category: 'Events',\n label: 'Open external link action',\n },\n onReaderError: {\n type: 'action',\n category: 'Events',\n label: 'Reader error action',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/features/reader/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,kBAAkB,GAAG,EAAW,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,oGAAoG;IACtG,kBAAkB,EAAE,IAAI;IACxB,YAAY,EAAE;QACZ,YAAY,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;KACpC;IACD,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,QAAQ;QACf,YAAY,EAAE;YACZ,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,IAAI;YAChB,iBAAiB,EAAE,QAAQ;YAC3B,SAAS,EAAE,CAAC;YACZ,UAAU,EAAE,QAAQ;SACrB;KACF;IACD,MAAM,EAAE;QACN,YAAY,EAAE;YACZ,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,q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,KAAK,EAAE,2BAA2B;SACnC;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,qBAAqB;SAC7B;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../authoring';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../authoring/allowedChildren';\n\nconst EMPTY_EVENT_FIELDS = [] as const;\n\nexport const readerSurfaceMeta = {\n name: 'ReaderSurface',\n category: 'pattern',\n description:\n 'Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.',\n directManifestNode: true,\n requirements: {\n capabilities: { ebookReader: true },\n },\n allowedChildren: [],\n blueprint: {\n label: 'Reader',\n defaultProps: {\n format: 'epub',\n status: 'idle',\n showChrome: true,\n readerColorScheme: 'system',\n fontScale: 1,\n lineHeight: 'normal',\n },\n },\n events: {\n previousPage: {\n label: 'Previous page',\n eventType: 'reader.previousPage',\n description: 'Requests navigation to the previous page.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n nextPage: {\n label: 'Next page',\n eventType: 'reader.nextPage',\n description: 'Requests navigation to the next page.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n locationChange: {\n label: 'Location change',\n eventType: 'reader.locationChange',\n description: 'Emitted by the adapter after the destination has been displayed.',\n payloadFields: [\n { path: 'format', type: 'string', label: 'Format' },\n { path: 'locator', type: 'string', label: 'Opaque locator' },\n { path: 'page', type: 'number', label: 'Page' },\n { path: 'pageCount', type: 'number', label: 'Page count' },\n { path: 'progression', type: 'number', label: 'Progression' },\n { path: 'chapterId', type: 'string', label: 'Chapter ID' },\n { path: 'chapterTitle', type: 'string', label: 'Chapter title' },\n { path: 'trigger', type: 'string', label: 'Navigation trigger' },\n ],\n },\n openContents: {\n label: 'Open contents',\n eventType: 'reader.openContents',\n description: 'Requests the app-owned table of contents.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n openAppearance: {\n label: 'Open appearance',\n eventType: 'reader.openAppearance',\n description: 'Requests the app-owned reader appearance controls.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n toggleHighlight: {\n label: 'Toggle highlight',\n eventType: 'reader.toggleHighlight',\n description: 'Requests the app-owned highlight action.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n openExternalLink: {\n label: 'Open external link',\n eventType: 'reader.openExternalLink',\n description: 'Emitted when publication content requests an external URL.',\n payloadFields: [{ path: 'url', type: 'string', label: 'URL' }],\n },\n readerError: {\n label: 'Reader error',\n eventType: 'reader.error',\n description: 'Emitted when the adapter rejects or cannot load a document.',\n payloadFields: [\n { path: 'code', type: 'string', label: 'Error code' },\n { path: 'format', type: 'string', label: 'Format' },\n { path: 'message', type: 'string', label: 'Message' },\n ],\n },\n },\n slots: {\n viewport: {\n label: 'Reader viewport adapter',\n allowedChildren: [],\n },\n headerActions: {\n label: 'Header actions',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n footerActions: {\n label: 'Footer actions',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n },\n props: {\n source: {\n type: 'media',\n category: 'Document',\n label: 'Source',\n mediaKinds: ['file'],\n },\n format: {\n type: 'enum',\n category: 'Document',\n label: 'Format',\n enum: ['epub', 'pdf'],\n default: 'epub',\n },\n location: {\n type: 'string',\n category: 'State',\n label: 'Location',\n },\n status: {\n type: 'enum',\n category: 'State',\n label: 'Status',\n enum: ['idle', 'loading', 'ready', 'error'],\n default: 'idle',\n },\n page: {\n type: 'number',\n category: 'State',\n label: 'Page',\n },\n pageCount: {\n type: 'number',\n category: 'State',\n label: 'Page count',\n },\n progress: {\n type: 'number',\n category: 'State',\n label: 'Progress',\n },\n canGoPrevious: {\n type: 'boolean',\n category: 'State',\n label: 'Can go previous',\n },\n canGoNext: {\n type: 'boolean',\n category: 'State',\n label: 'Can go next',\n },\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n },\n subtitle: {\n type: 'string',\n category: 'Content',\n label: 'Subtitle',\n },\n chapterLabel: {\n type: 'string',\n category: 'Content',\n label: 'Chapter label',\n },\n pageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Page label',\n },\n previousPageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Previous page label',\n default: 'Previous page',\n },\n nextPageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Next page label',\n default: 'Next page',\n },\n contentsLabel: {\n type: 'string',\n category: 'Content',\n label: 'Contents label',\n default: 'Table of contents',\n },\n appearanceLabel: {\n type: 'string',\n category: 'Content',\n label: 'Appearance label',\n default: 'Reading appearance',\n },\n highlightLabel: {\n type: 'string',\n category: 'Content',\n label: 'Highlight label',\n default: 'Toggle highlight',\n },\n loadingLabel: {\n type: 'string',\n category: 'Content',\n label: 'Loading label',\n default: 'Loading document…',\n },\n errorTitle: {\n type: 'string',\n category: 'Content',\n label: 'Error title',\n default: 'Unable to open this document.',\n },\n unavailableTitle: {\n type: 'string',\n category: 'Content',\n label: 'Unavailable title',\n default: 'Reader preview unavailable.',\n },\n showChrome: {\n type: 'boolean',\n category: 'Chrome',\n label: 'Show chrome',\n default: true,\n },\n readerColorScheme: {\n type: 'enum',\n category: 'Appearance',\n label: 'Color scheme',\n enum: ['system', 'light', 'dark', 'sepia'],\n default: 'system',\n },\n fontScale: {\n type: 'number',\n category: 'Appearance',\n label: 'Font scale',\n default: 1,\n },\n lineHeight: {\n type: 'enum',\n category: 'Appearance',\n label: 'Line height',\n enum: ['compact', 'normal', 'relaxed'],\n default: 'normal',\n },\n highlighted: {\n type: 'boolean',\n category: 'State',\n label: 'Highlighted',\n default: false,\n },\n onPreviousPage: {\n type: 'action',\n category: 'Events',\n label: 'Previous page action',\n },\n onNextPage: {\n type: 'action',\n category: 'Events',\n label: 'Next page action',\n },\n onLocationChange: {\n type: 'action',\n category: 'Events',\n label: 'Location change action',\n },\n onOpenContents: {\n type: 'action',\n category: 'Events',\n label: 'Open contents action',\n },\n onOpenAppearance: {\n type: 'action',\n category: 'Events',\n label: 'Open appearance action',\n },\n onToggleHighlight: {\n type: 'action',\n category: 'Events',\n label: 'Toggle highlight action',\n },\n onOpenExternalLink: {\n type: 'action',\n category: 'Events',\n label: 'Open external link action',\n },\n onReaderError: {\n type: 'action',\n category: 'Events',\n label: 'Reader error action',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -40,9 +40,9 @@ export declare const cameraPermissionViewMeta: {
|
|
|
40
40
|
readonly directManifestNode: true;
|
|
41
41
|
readonly allowedChildren: readonly [];
|
|
42
42
|
readonly requirements: {
|
|
43
|
-
readonly permissions:
|
|
44
|
-
readonly
|
|
45
|
-
}
|
|
43
|
+
readonly permissions: {
|
|
44
|
+
readonly camera: true;
|
|
45
|
+
};
|
|
46
46
|
};
|
|
47
47
|
readonly blueprint: {
|
|
48
48
|
readonly label: "Camera permission";
|
|
@@ -107,12 +107,12 @@ export declare const barcodeScannerViewMeta: {
|
|
|
107
107
|
readonly directManifestNode: true;
|
|
108
108
|
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
109
109
|
readonly requirements: {
|
|
110
|
-
readonly permissions:
|
|
111
|
-
readonly
|
|
112
|
-
}
|
|
113
|
-
readonly capabilities:
|
|
114
|
-
readonly
|
|
115
|
-
}
|
|
110
|
+
readonly permissions: {
|
|
111
|
+
readonly camera: true;
|
|
112
|
+
};
|
|
113
|
+
readonly capabilities: {
|
|
114
|
+
readonly barcodeScanner: true;
|
|
115
|
+
};
|
|
116
116
|
};
|
|
117
117
|
readonly blueprint: {
|
|
118
118
|
readonly label: "Barcode scanner";
|
|
@@ -41,7 +41,7 @@ export const cameraPermissionViewMeta = {
|
|
|
41
41
|
directManifestNode: true,
|
|
42
42
|
allowedChildren: [],
|
|
43
43
|
requirements: {
|
|
44
|
-
permissions:
|
|
44
|
+
permissions: { camera: true },
|
|
45
45
|
},
|
|
46
46
|
blueprint: {
|
|
47
47
|
label: 'Camera permission',
|
|
@@ -106,8 +106,8 @@ export const barcodeScannerViewMeta = {
|
|
|
106
106
|
directManifestNode: true,
|
|
107
107
|
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
108
108
|
requirements: {
|
|
109
|
-
permissions:
|
|
110
|
-
capabilities:
|
|
109
|
+
permissions: { camera: true },
|
|
110
|
+
capabilities: { barcodeScanner: true },
|
|
111
111
|
},
|
|
112
112
|
blueprint: {
|
|
113
113
|
label: 'Barcode scanner',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/features/scanner/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,uEAAuE;IACpF,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,cAAc;QACrB,YAAY,EAAE;YACZ,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,mEAAmE;YAChF,WAAW,EAAE,MAAM;SACpB;KACF;IACD,KAAK,EAAE;QACL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AK,EAAE,gBAAgB;YACvB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;SACjD;KACF;IACD,KAAK,EAAE;QACL,gBAAgB,EAAE;YAChB,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC;YACpD,OAAO,EAAE,SAAS;SACnB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,cAAc;SACxB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,4CAA4C;SACtD;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,eAAe;SACvB;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,qBAAqB;SAC7B;QACD,sBAAsB,EAAE;YACtB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,0BAA0B;SAClC;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,oBAAoB;SAC5B;QACD,mBAAmB,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,2BAA2B;SACnC;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,qBAAqB;SAC7B;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../authoring';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../authoring/allowedChildren';\n\nexport const scanOverlayMeta = {\n name: 'ScanOverlay',\n category: 'pattern',\n description: 'Camera-agnostic scan frame overlay for barcode and QR scanning flows.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Scan overlay',\n defaultProps: {\n title: 'Align the barcode',\n description: 'Hold the barcode inside the frame. Scanning starts automatically.',\n cornerLabel: 'SCAN',\n },\n },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n default: 'Align the barcode',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n default: 'Hold the barcode inside the frame. Scanning starts automatically.',\n },\n cornerLabel: {\n type: 'string',\n category: 'Content',\n label: 'Corner label',\n default: 'SCAN',\n },\n },\n} as const satisfies ZoraComponentMeta;\n\nexport const cameraPermissionViewMeta = {\n name: 'CameraPermissionView',\n category: 'pattern',\n description: 'ZORA-owned camera permission state for scanner flows.',\n directManifestNode: true,\n allowedChildren: [],\n requirements: {\n permissions: { camera: true },\n },\n blueprint: {\n label: 'Camera permission',\n defaultProps: {\n status: 'unknown',\n requestLabel: 'Allow camera access',\n manualEntryLabel: 'Enter barcode manually',\n },\n },\n props: {\n status: {\n type: 'enum',\n category: 'State',\n label: 'Permission status',\n enum: ['unknown', 'requesting', 'denied'],\n default: 'unknown',\n },\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n },\n requestLabel: {\n type: 'string',\n category: 'Content',\n label: 'Request label',\n default: 'Allow camera access',\n },\n deniedLabel: {\n type: 'string',\n category: 'Content',\n label: 'Denied label',\n default: 'Open settings',\n },\n manualEntryLabel: {\n type: 'string',\n category: 'Content',\n label: 'Manual entry label',\n default: 'Enter barcode manually',\n },\n onRequestPermission: {\n type: 'action',\n category: 'Events',\n label: 'Request permission action',\n },\n onManualEntry: {\n type: 'action',\n category: 'Events',\n label: 'Manual entry action',\n },\n },\n} as const satisfies ZoraComponentMeta;\n\nexport const barcodeScannerViewMeta = {\n name: 'BarcodeScannerView',\n category: 'pattern',\n description:\n 'Composed scanner shell with permission, camera slot, scan overlay, and manual entry affordance.',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n requirements: {\n permissions: { camera: true },\n capabilities: { barcodeScanner: true },\n },\n blueprint: {\n label: 'Barcode scanner',\n defaultProps: {\n permissionStatus: 'unknown',\n title: 'Scan barcode',\n description: 'Point the camera at a barcode to continue.',\n },\n },\n events: {\n onBarcodeScanned: {\n label: 'Barcode scanned',\n eventType: 'scan',\n description: 'Emitted by the app camera adapter after a barcode has been scanned.',\n payloadFields: [\n { path: 'value', type: 'string', label: 'Barcode value' },\n { path: 'type', type: 'string', label: 'Barcode type' },\n ],\n },\n },\n slots: {\n camera: {\n label: 'Camera adapter',\n allowedChildren: [],\n },\n children: {\n label: 'Scanner footer',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n },\n props: {\n permissionStatus: {\n type: 'enum',\n category: 'State',\n label: 'Permission status',\n enum: ['unknown', 'requesting', 'granted', 'denied'],\n default: 'unknown',\n },\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n default: 'Scan barcode',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n default: 'Point the camera at a barcode to continue.',\n },\n overlayTitle: {\n type: 'string',\n category: 'Content',\n label: 'Overlay title',\n },\n overlayDescription: {\n type: 'string',\n category: 'Content',\n label: 'Overlay description',\n },\n requestPermissionLabel: {\n type: 'string',\n category: 'Content',\n label: 'Request permission label',\n },\n manualEntryLabel: {\n type: 'string',\n category: 'Content',\n label: 'Manual entry label',\n },\n onRequestPermission: {\n type: 'action',\n category: 'Events',\n label: 'Request permission action',\n },\n onManualEntry: {\n type: 'action',\n category: 'Events',\n label: 'Manual entry action',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "20.0.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": {
|
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
"url": "git+https://github.com/ankhorage/zora.git"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
|
+
"ankhorage",
|
|
20
|
+
"components",
|
|
21
|
+
"design-system",
|
|
22
|
+
"expo",
|
|
19
23
|
"react-native",
|
|
20
24
|
"react-native-web",
|
|
21
|
-
"expo",
|
|
22
|
-
"ui-kit",
|
|
23
|
-
"design-system",
|
|
24
25
|
"surface",
|
|
25
|
-
"
|
|
26
|
+
"ui-kit"
|
|
26
27
|
],
|
|
27
28
|
"peerDependencies": {
|
|
28
29
|
"@react-native-vector-icons/fontawesome": "^13.1.3",
|
|
@@ -39,8 +40,8 @@
|
|
|
39
40
|
"react-native-worklets": "0.10.1"
|
|
40
41
|
},
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"@ankhorage/color-theory": "^0.3.
|
|
43
|
-
"@ankhorage/contracts": "^
|
|
43
|
+
"@ankhorage/color-theory": "^0.3.1",
|
|
44
|
+
"@ankhorage/contracts": "^22.0.1",
|
|
44
45
|
"@ankhorage/surface": "^9.0.1",
|
|
45
46
|
"@ankhorage/utility": "^1.2.0",
|
|
46
47
|
"expo-document-picker": "~57.0.1",
|
|
@@ -115,7 +116,7 @@
|
|
|
115
116
|
},
|
|
116
117
|
"devDependencies": {
|
|
117
118
|
"@ankhorage/devtools": "^1.13.0",
|
|
118
|
-
"@ankhorage/paradox": "^0.1.
|
|
119
|
+
"@ankhorage/paradox": "^0.1.26",
|
|
119
120
|
"@react-native-vector-icons/fontawesome": "^13.1.3",
|
|
120
121
|
"@react-native-vector-icons/fontawesome5": "^13.1.3",
|
|
121
122
|
"@react-native-vector-icons/fontawesome6": "^13.1.3",
|
|
@@ -77,20 +77,20 @@ describe('ZORA_COMPONENT_META event metadata', () => {
|
|
|
77
77
|
describe('ZORA_COMPONENT_META requirement metadata', () => {
|
|
78
78
|
test('declares camera permission metadata for camera permission UI', () => {
|
|
79
79
|
expect(ZORA_COMPONENT_META.CameraPermissionView.requirements).toEqual({
|
|
80
|
-
permissions:
|
|
80
|
+
permissions: { camera: true },
|
|
81
81
|
});
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
test('declares camera and barcode scanner metadata for barcode scanner UI', () => {
|
|
85
85
|
expect(ZORA_COMPONENT_META.BarcodeScannerView.requirements).toEqual({
|
|
86
|
-
permissions:
|
|
87
|
-
capabilities:
|
|
86
|
+
permissions: { camera: true },
|
|
87
|
+
capabilities: { barcodeScanner: true },
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
test('declares ebook reader capability metadata for ReaderSurface', () => {
|
|
92
92
|
expect(ZORA_COMPONENT_META.ReaderSurface.requirements).toEqual({
|
|
93
|
-
capabilities:
|
|
93
|
+
capabilities: { ebookReader: true },
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
96
|
|
|
@@ -10,7 +10,7 @@ export const readerSurfaceMeta = {
|
|
|
10
10
|
'Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.',
|
|
11
11
|
directManifestNode: true,
|
|
12
12
|
requirements: {
|
|
13
|
-
capabilities:
|
|
13
|
+
capabilities: { ebookReader: true },
|
|
14
14
|
},
|
|
15
15
|
allowedChildren: [],
|
|
16
16
|
blueprint: {
|
|
@@ -44,7 +44,7 @@ export const cameraPermissionViewMeta = {
|
|
|
44
44
|
directManifestNode: true,
|
|
45
45
|
allowedChildren: [],
|
|
46
46
|
requirements: {
|
|
47
|
-
permissions:
|
|
47
|
+
permissions: { camera: true },
|
|
48
48
|
},
|
|
49
49
|
blueprint: {
|
|
50
50
|
label: 'Camera permission',
|
|
@@ -111,8 +111,8 @@ export const barcodeScannerViewMeta = {
|
|
|
111
111
|
directManifestNode: true,
|
|
112
112
|
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
113
113
|
requirements: {
|
|
114
|
-
permissions:
|
|
115
|
-
capabilities:
|
|
114
|
+
permissions: { camera: true },
|
|
115
|
+
capabilities: { barcodeScanner: true },
|
|
116
116
|
},
|
|
117
117
|
blueprint: {
|
|
118
118
|
label: 'Barcode scanner',
|