@ankhorage/studio 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +1 -1
  2. package/dist/dnd/index.d.ts +3 -0
  3. package/dist/dnd/index.d.ts.map +1 -0
  4. package/dist/dnd/index.js +3 -0
  5. package/dist/dnd/index.js.map +1 -0
  6. package/dist/dnd/primitives.d.ts +2 -0
  7. package/dist/dnd/primitives.d.ts.map +1 -0
  8. package/dist/dnd/primitives.js +2 -0
  9. package/dist/dnd/primitives.js.map +1 -0
  10. package/dist/dnd/state.d.ts +6 -0
  11. package/dist/dnd/state.d.ts.map +1 -0
  12. package/dist/dnd/state.js +5 -0
  13. package/dist/dnd/state.js.map +1 -0
  14. package/dist/runtime/actionSuppression.d.ts +4 -0
  15. package/dist/runtime/actionSuppression.d.ts.map +1 -0
  16. package/dist/runtime/actionSuppression.js +5 -0
  17. package/dist/runtime/actionSuppression.js.map +1 -0
  18. package/dist/runtime/index.d.ts +5 -0
  19. package/dist/runtime/index.d.ts.map +1 -0
  20. package/dist/runtime/index.js +5 -0
  21. package/dist/runtime/index.js.map +1 -0
  22. package/dist/runtime/localizationPreview.d.ts +12 -0
  23. package/dist/runtime/localizationPreview.d.ts.map +1 -0
  24. package/dist/runtime/localizationPreview.js +11 -0
  25. package/dist/runtime/localizationPreview.js.map +1 -0
  26. package/dist/runtime/previewRegistry.d.ts +7 -0
  27. package/dist/runtime/previewRegistry.d.ts.map +1 -0
  28. package/dist/runtime/previewRegistry.js +4 -0
  29. package/dist/runtime/previewRegistry.js.map +1 -0
  30. package/dist/runtime/previewRuntimeConfig.d.ts +7 -0
  31. package/dist/runtime/previewRuntimeConfig.d.ts.map +1 -0
  32. package/dist/runtime/previewRuntimeConfig.js +7 -0
  33. package/dist/runtime/previewRuntimeConfig.js.map +1 -0
  34. package/package.json +35 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/studio
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v0.0.15](././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: v0.0.17](././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
  Standalone Studio authoring package for Ankhorage apps.
9
9
 
@@ -0,0 +1,3 @@
1
+ export * from './primitives';
2
+ export * from './state';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dnd/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './primitives';
2
+ export * from './state';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dnd/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from '@ankhorage/react-native-reanimated-dnd-web';
2
+ //# sourceMappingURL=primitives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/dnd/primitives.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from '@ankhorage/react-native-reanimated-dnd-web';
2
+ //# sourceMappingURL=primitives.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/dnd/primitives.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface StudioDragState {
2
+ readonly activeNodeId: string | null;
3
+ readonly activeDropZoneId: string | null;
4
+ }
5
+ export declare const createIdleStudioDragState: () => StudioDragState;
6
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/dnd/state.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,yBAAyB,QAAO,eAG3C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const createIdleStudioDragState = () => ({
2
+ activeNodeId: null,
3
+ activeDropZoneId: null,
4
+ });
5
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/dnd/state.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAoB,EAAE,CAAC,CAAC;IAC/D,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,IAAI;CACvB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { RuntimeRendererConfig } from '@ankhorage/runtime';
2
+ export declare const shouldSuppressStudioRuntimeActions: (previewMode: boolean) => boolean;
3
+ export declare const createStudioActionSuppressionConfig: (previewMode: boolean) => RuntimeRendererConfig;
4
+ //# sourceMappingURL=actionSuppression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionSuppression.d.ts","sourceRoot":"","sources":["../../src/runtime/actionSuppression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,eAAO,MAAM,kCAAkC,GAAI,aAAa,OAAO,KAAG,OAAuB,CAAC;AAElG,eAAO,MAAM,mCAAmC,GAC9C,aAAa,OAAO,KACnB,qBAED,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const shouldSuppressStudioRuntimeActions = (previewMode) => !previewMode;
2
+ export const createStudioActionSuppressionConfig = (previewMode) => ({
3
+ disableActions: shouldSuppressStudioRuntimeActions(previewMode),
4
+ });
5
+ //# sourceMappingURL=actionSuppression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionSuppression.js","sourceRoot":"","sources":["../../src/runtime/actionSuppression.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,WAAoB,EAAW,EAAE,CAAC,CAAC,WAAW,CAAC;AAElG,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,WAAoB,EACG,EAAE,CAAC,CAAC;IAC3B,cAAc,EAAE,kCAAkC,CAAC,WAAW,CAAC;CAChE,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './actionSuppression';
2
+ export * from './localizationPreview';
3
+ export * from './previewRegistry';
4
+ export * from './previewRuntimeConfig';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './actionSuppression';
2
+ export * from './localizationPreview';
3
+ export * from './previewRegistry';
4
+ export * from './previewRuntimeConfig';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface StudioLocalizationPreviewInput {
2
+ readonly activeLocale?: string | null;
3
+ readonly defaultLocale: string;
4
+ readonly locales: readonly string[];
5
+ }
6
+ export interface StudioLocalizationPreview {
7
+ readonly activeLocale: string;
8
+ readonly defaultLocale: string;
9
+ readonly locales: readonly string[];
10
+ }
11
+ export declare const resolveStudioLocalizationPreview: (input: StudioLocalizationPreviewInput) => StudioLocalizationPreview;
12
+ //# sourceMappingURL=localizationPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localizationPreview.d.ts","sourceRoot":"","sources":["../../src/runtime/localizationPreview.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,gCAAgC,GAC3C,OAAO,8BAA8B,KACpC,yBAWF,CAAC"}
@@ -0,0 +1,11 @@
1
+ export const resolveStudioLocalizationPreview = (input) => {
2
+ const activeLocale = input.activeLocale && input.locales.includes(input.activeLocale)
3
+ ? input.activeLocale
4
+ : input.defaultLocale;
5
+ return {
6
+ activeLocale,
7
+ defaultLocale: input.defaultLocale,
8
+ locales: input.locales,
9
+ };
10
+ };
11
+ //# sourceMappingURL=localizationPreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localizationPreview.js","sourceRoot":"","sources":["../../src/runtime/localizationPreview.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC9C,KAAqC,EACV,EAAE;IAC7B,MAAM,YAAY,GAChB,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC;QAC9D,CAAC,CAAC,KAAK,CAAC,YAAY;QACpB,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;IAE1B,OAAO;QACL,YAAY;QACZ,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ComponentRegistry } from '@ankhorage/runtime';
2
+ export interface StudioPreviewRegistryOptions {
3
+ readonly components?: ComponentRegistry;
4
+ }
5
+ export declare const createStudioPreviewComponentRegistry: (options?: StudioPreviewRegistryOptions) => ComponentRegistry;
6
+ export declare const STUDIO_PREVIEW_COMPONENT_REGISTRY: ComponentRegistry;
7
+ //# sourceMappingURL=previewRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"previewRegistry.d.ts","sourceRoot":"","sources":["../../src/runtime/previewRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAED,eAAO,MAAM,oCAAoC,GAC/C,UAAS,4BAAiC,KACzC,iBAA+F,CAAC;AAEnG,eAAO,MAAM,iCAAiC,mBAAyC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { createComponentRegistry, ZORA_COMPONENT_REGISTRY } from '@ankhorage/runtime';
2
+ export const createStudioPreviewComponentRegistry = (options = {}) => createComponentRegistry(ZORA_COMPONENT_REGISTRY, options.components ?? {});
3
+ export const STUDIO_PREVIEW_COMPONENT_REGISTRY = createStudioPreviewComponentRegistry();
4
+ //# sourceMappingURL=previewRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"previewRegistry.js","sourceRoot":"","sources":["../../src/runtime/previewRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAMtF,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAClD,UAAwC,EAAE,EACvB,EAAE,CAAC,uBAAuB,CAAC,uBAAuB,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;AAEnG,MAAM,CAAC,MAAM,iCAAiC,GAAG,oCAAoC,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ComponentRegistry, RuntimeRendererConfig } from '@ankhorage/runtime';
2
+ export interface StudioPreviewRuntimeConfigOptions {
3
+ readonly previewMode: boolean;
4
+ readonly components?: ComponentRegistry;
5
+ }
6
+ export declare const createStudioPreviewRuntimeConfig: (options: StudioPreviewRuntimeConfigOptions) => RuntimeRendererConfig;
7
+ //# sourceMappingURL=previewRuntimeConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"previewRuntimeConfig.d.ts","sourceRoot":"","sources":["../../src/runtime/previewRuntimeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAKnF,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAED,eAAO,MAAM,gCAAgC,GAC3C,SAAS,iCAAiC,KACzC,qBAGD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { shouldSuppressStudioRuntimeActions } from './actionSuppression';
2
+ import { createStudioPreviewComponentRegistry } from './previewRegistry';
3
+ export const createStudioPreviewRuntimeConfig = (options) => ({
4
+ disableActions: shouldSuppressStudioRuntimeActions(options.previewMode),
5
+ registry: createStudioPreviewComponentRegistry({ components: options.components }),
6
+ });
7
+ //# sourceMappingURL=previewRuntimeConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"previewRuntimeConfig.js","sourceRoot":"","sources":["../../src/runtime/previewRuntimeConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,oCAAoC,EAAE,MAAM,mBAAmB,CAAC;AAOzE,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC9C,OAA0C,EACnB,EAAE,CAAC,CAAC;IAC3B,cAAc,EAAE,kCAAkC,CAAC,OAAO,CAAC,WAAW,CAAC;IACvE,QAAQ,EAAE,oCAAoC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;CACnF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/studio",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Studio authoring package for Ankhorage apps",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/ankhorage/studio#readme",
@@ -36,6 +36,38 @@
36
36
  "types": "./dist/app/index.d.ts",
37
37
  "import": "./dist/app/index.js"
38
38
  },
39
+ "./dnd": {
40
+ "types": "./dist/dnd/index.d.ts",
41
+ "import": "./dist/dnd/index.js"
42
+ },
43
+ "./dnd/primitives": {
44
+ "types": "./dist/dnd/primitives.d.ts",
45
+ "import": "./dist/dnd/primitives.js"
46
+ },
47
+ "./dnd/state": {
48
+ "types": "./dist/dnd/state.d.ts",
49
+ "import": "./dist/dnd/state.js"
50
+ },
51
+ "./runtime": {
52
+ "types": "./dist/runtime/index.d.ts",
53
+ "import": "./dist/runtime/index.js"
54
+ },
55
+ "./runtime/actionSuppression": {
56
+ "types": "./dist/runtime/actionSuppression.d.ts",
57
+ "import": "./dist/runtime/actionSuppression.js"
58
+ },
59
+ "./runtime/localizationPreview": {
60
+ "types": "./dist/runtime/localizationPreview.d.ts",
61
+ "import": "./dist/runtime/localizationPreview.js"
62
+ },
63
+ "./runtime/previewRegistry": {
64
+ "types": "./dist/runtime/previewRegistry.d.ts",
65
+ "import": "./dist/runtime/previewRegistry.js"
66
+ },
67
+ "./runtime/previewRuntimeConfig": {
68
+ "types": "./dist/runtime/previewRuntimeConfig.d.ts",
69
+ "import": "./dist/runtime/previewRuntimeConfig.js"
70
+ },
39
71
  "./core/StudioContext": {
40
72
  "types": "./dist/core/StudioContext.d.ts",
41
73
  "import": "./dist/core/StudioContext.js"
@@ -139,6 +171,8 @@
139
171
  ],
140
172
  "dependencies": {
141
173
  "@ankhorage/contracts": "^1.19.2",
174
+ "@ankhorage/react-native-reanimated-dnd-web": "^0.3.2",
175
+ "@ankhorage/runtime": "^0.2.1",
142
176
  "@ankhorage/zora": "^2.8.1"
143
177
  },
144
178
  "peerDependencies": {