@ankhorage/studio 0.10.8 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/host/layout/layoutGenerator.d.ts.map +1 -1
- package/dist/host/layout/layoutGenerator.js +10 -2
- package/dist/host/layout/layoutGenerator.js.map +1 -1
- package/dist/host/layout/templates/rootLayout.d.ts.map +1 -1
- package/dist/host/layout/templates/rootLayout.js +68 -106
- package/dist/host/layout/templates/rootLayout.js.map +1 -1
- package/dist/host/orchestrator/expoSdk54AnimationCompatibility.d.ts +7 -0
- package/dist/host/orchestrator/expoSdk54AnimationCompatibility.d.ts.map +1 -0
- package/dist/host/orchestrator/expoSdk54AnimationCompatibility.js +7 -0
- package/dist/host/orchestrator/expoSdk54AnimationCompatibility.js.map +1 -0
- package/dist/host/orchestrator/generatedAppFiles.d.ts +4 -0
- package/dist/host/orchestrator/generatedAppFiles.d.ts.map +1 -1
- package/dist/host/orchestrator/generatedAppFiles.js +16 -1
- package/dist/host/orchestrator/generatedAppFiles.js.map +1 -1
- package/dist/host/orchestrator/templates.d.ts +2 -2
- package/dist/host/orchestrator/templates.d.ts.map +1 -1
- package/dist/host/orchestrator/templates.js +5 -4
- package/dist/host/orchestrator/templates.js.map +1 -1
- package/dist/host/zoraExtensions/index.d.ts +1 -0
- package/dist/host/zoraExtensions/index.d.ts.map +1 -1
- package/dist/host/zoraExtensions/index.js.map +1 -1
- package/dist/runtime/appExtensionRegistry.d.ts +6 -0
- package/dist/runtime/appExtensionRegistry.d.ts.map +1 -1
- package/dist/runtime/appExtensionRegistry.js +6 -0
- package/dist/runtime/appExtensionRegistry.js.map +1 -1
- package/dist/runtime/index.d.ts +4 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/indicatorRefreshCoordinator.d.ts +11 -0
- package/dist/runtime/indicatorRefreshCoordinator.d.ts.map +1 -0
- package/dist/runtime/indicatorRefreshCoordinator.js +26 -0
- package/dist/runtime/indicatorRefreshCoordinator.js.map +1 -0
- package/dist/runtime/indicatorSettleCoordinator.d.ts +20 -0
- package/dist/runtime/indicatorSettleCoordinator.d.ts.map +1 -0
- package/dist/runtime/indicatorSettleCoordinator.js +78 -0
- package/dist/runtime/indicatorSettleCoordinator.js.map +1 -0
- package/dist/runtime/interactionPolicy.d.ts +10 -0
- package/dist/runtime/interactionPolicy.d.ts.map +1 -0
- package/dist/runtime/interactionPolicy.js +15 -0
- package/dist/runtime/interactionPolicy.js.map +1 -0
- package/dist/runtime/interactionPolicyCore.d.ts +27 -0
- package/dist/runtime/interactionPolicyCore.d.ts.map +1 -0
- package/dist/runtime/interactionPolicyCore.js +46 -0
- package/dist/runtime/interactionPolicyCore.js.map +1 -0
- package/dist/runtime/previewRuntimeConfig.d.ts +3 -0
- package/dist/runtime/previewRuntimeConfig.d.ts.map +1 -1
- package/dist/runtime/previewRuntimeConfig.js +6 -0
- package/dist/runtime/previewRuntimeConfig.js.map +1 -1
- package/dist/runtime/stationarySelection.d.ts +27 -0
- package/dist/runtime/stationarySelection.d.ts.map +1 -0
- package/dist/runtime/stationarySelection.js +470 -0
- package/dist/runtime/stationarySelection.js.map +1 -0
- package/dist/runtime/stationarySelectionCoordinator.d.ts +21 -0
- package/dist/runtime/stationarySelectionCoordinator.d.ts.map +1 -0
- package/dist/runtime/stationarySelectionCoordinator.js +84 -0
- package/dist/runtime/stationarySelectionCoordinator.js.map +1 -0
- package/dist/runtime/stationarySelectionInputState.d.ts +26 -0
- package/dist/runtime/stationarySelectionInputState.d.ts.map +1 -0
- package/dist/runtime/stationarySelectionInputState.js +56 -0
- package/dist/runtime/stationarySelectionInputState.js.map +1 -0
- package/package.json +4 -3
|
@@ -5,4 +5,10 @@ export const STUDIO_APP_EXTENSION_COMPONENT_REGISTRY = {
|
|
|
5
5
|
OpeningBook,
|
|
6
6
|
TabletopTable,
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Exact Studio-owned extension node types that accept and enforce interactionPolicy.
|
|
10
|
+
*
|
|
11
|
+
* Registry membership alone does not opt a component in.
|
|
12
|
+
*/
|
|
13
|
+
export const STUDIO_APP_EXTENSION_INTERACTION_POLICY_SUPPORT = {};
|
|
8
14
|
//# sourceMappingURL=appExtensionRegistry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appExtensionRegistry.js","sourceRoot":"","sources":["../../src/runtime/appExtensionRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,uCAAuC,GAAsB;IACxE,UAAU;IACV,WAAW;IACX,aAAa;CACd,CAAC"}
|
|
1
|
+
{"version":3,"file":"appExtensionRegistry.js","sourceRoot":"","sources":["../../src/runtime/appExtensionRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,uCAAuC,GAAsB;IACxE,UAAU;IACV,WAAW;IACX,aAAa;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAAG,EAAW,CAAC"}
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export * from './actionSuppression.js';
|
|
2
2
|
export * from './appExtensionRegistry.js';
|
|
3
|
+
export * from './interactionPolicy.js';
|
|
4
|
+
export * from './interactionPolicyCore.js';
|
|
3
5
|
export * from './localizationPreview.js';
|
|
4
6
|
export * from './previewRegistry.js';
|
|
5
7
|
export * from './previewRuntimeConfig.js';
|
|
6
8
|
export * from './registry.js';
|
|
7
9
|
export * from './runtimeActions.js';
|
|
10
|
+
export * from './stationarySelection.js';
|
|
11
|
+
export * from './stationarySelectionCoordinator.js';
|
|
8
12
|
export * from './useRuntimeAction.js';
|
|
9
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC"}
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export * from './actionSuppression.js';
|
|
2
2
|
export * from './appExtensionRegistry.js';
|
|
3
|
+
export * from './interactionPolicy.js';
|
|
4
|
+
export * from './interactionPolicyCore.js';
|
|
3
5
|
export * from './localizationPreview.js';
|
|
4
6
|
export * from './previewRegistry.js';
|
|
5
7
|
export * from './previewRuntimeConfig.js';
|
|
6
8
|
export * from './registry.js';
|
|
7
9
|
export * from './runtimeActions.js';
|
|
10
|
+
export * from './stationarySelection.js';
|
|
11
|
+
export * from './stationarySelectionCoordinator.js';
|
|
8
12
|
export * from './useRuntimeAction.js';
|
|
9
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface AnimationFrameScheduler {
|
|
2
|
+
readonly cancel: (frameId: number) => void;
|
|
3
|
+
readonly request: (callback: () => void) => number;
|
|
4
|
+
}
|
|
5
|
+
export interface IndicatorRefreshCoordinator {
|
|
6
|
+
requestRefresh(): boolean;
|
|
7
|
+
cancelPendingRefresh(): void;
|
|
8
|
+
hasPendingRefresh(): boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function createIndicatorRefreshCoordinator(refresh: () => void, scheduler: AnimationFrameScheduler): IndicatorRefreshCoordinator;
|
|
11
|
+
//# sourceMappingURL=indicatorRefreshCoordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicatorRefreshCoordinator.d.ts","sourceRoot":"","sources":["../../src/runtime/indicatorRefreshCoordinator.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,CAAC;CACpD;AAED,MAAM,WAAW,2BAA2B;IAC1C,cAAc,IAAI,OAAO,CAAC;IAC1B,oBAAoB,IAAI,IAAI,CAAC;IAC7B,iBAAiB,IAAI,OAAO,CAAC;CAC9B;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,MAAM,IAAI,EACnB,SAAS,EAAE,uBAAuB,GACjC,2BAA2B,CA4B7B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function createIndicatorRefreshCoordinator(refresh, scheduler) {
|
|
2
|
+
let pendingFrameId = null;
|
|
3
|
+
function requestRefresh() {
|
|
4
|
+
if (pendingFrameId !== null) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
pendingFrameId = scheduler.request(() => {
|
|
8
|
+
pendingFrameId = null;
|
|
9
|
+
refresh();
|
|
10
|
+
});
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
function cancelPendingRefresh() {
|
|
14
|
+
if (pendingFrameId === null) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
scheduler.cancel(pendingFrameId);
|
|
18
|
+
pendingFrameId = null;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
requestRefresh,
|
|
22
|
+
cancelPendingRefresh,
|
|
23
|
+
hasPendingRefresh: () => pendingFrameId !== null,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=indicatorRefreshCoordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicatorRefreshCoordinator.js","sourceRoot":"","sources":["../../src/runtime/indicatorRefreshCoordinator.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,iCAAiC,CAC/C,OAAmB,EACnB,SAAkC;IAElC,IAAI,cAAc,GAAkB,IAAI,CAAC;IAEzC,SAAS,cAAc;QACrB,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,cAAc,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE;YACtC,cAAc,GAAG,IAAI,CAAC;YACtB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,oBAAoB;QAC3B,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;YAC5B,OAAO;QACT,CAAC;QACD,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACjC,cAAc,GAAG,IAAI,CAAC;IACxB,CAAC;IAED,OAAO;QACL,cAAc;QACd,oBAAoB;QACpB,iBAAiB,EAAE,GAAG,EAAE,CAAC,cAAc,KAAK,IAAI;KACjD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface IndicatorSettleScheduler<Handle> {
|
|
2
|
+
readonly cancel: (handle: Handle) => void;
|
|
3
|
+
readonly schedule: (callback: () => void, delayMs: number) => Handle;
|
|
4
|
+
}
|
|
5
|
+
export interface IndicatorSettleCoordinator {
|
|
6
|
+
cancel(): void;
|
|
7
|
+
isActive(): boolean;
|
|
8
|
+
trigger(): boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface IndicatorSettleCoordinatorOptions<Snapshot, Handle> {
|
|
11
|
+
readonly areEqual: (left: Snapshot, right: Snapshot) => boolean;
|
|
12
|
+
readonly intervalMs: number;
|
|
13
|
+
readonly maxSamples: number;
|
|
14
|
+
readonly sample: () => Promise<Snapshot | null>;
|
|
15
|
+
readonly scheduler: IndicatorSettleScheduler<Handle>;
|
|
16
|
+
readonly stableSampleCount: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function createIndicatorSettleCoordinator<Snapshot, Handle>(options: IndicatorSettleCoordinatorOptions<Snapshot, Handle>): IndicatorSettleCoordinator;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=indicatorSettleCoordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicatorSettleCoordinator.d.ts","sourceRoot":"","sources":["../../src/runtime/indicatorSettleCoordinator.ts"],"names":[],"mappings":"AAAA,UAAU,wBAAwB,CAAC,MAAM;IACvC,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACtE;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,IAAI,OAAO,CAAC;IACpB,OAAO,IAAI,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC,CAAC,QAAQ,EAAE,MAAM;IACjE,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,KAAK,OAAO,CAAC;IAChE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAChD,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC,MAAM,CAAC,CAAC;IACrD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAED,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,MAAM,EAC/D,OAAO,EAAE,iCAAiC,CAAC,QAAQ,EAAE,MAAM,CAAC,GAC3D,0BAA0B,CAqF5B"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export function createIndicatorSettleCoordinator(options) {
|
|
2
|
+
let active = false;
|
|
3
|
+
let pendingHandle = null;
|
|
4
|
+
let sampling = false;
|
|
5
|
+
let revision = 0;
|
|
6
|
+
let sampleCount = 0;
|
|
7
|
+
let stableSampleCount = 0;
|
|
8
|
+
let previousSnapshot = null;
|
|
9
|
+
function clearPending() {
|
|
10
|
+
if (pendingHandle === null) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
options.scheduler.cancel(pendingHandle);
|
|
14
|
+
pendingHandle = null;
|
|
15
|
+
}
|
|
16
|
+
function cancel() {
|
|
17
|
+
active = false;
|
|
18
|
+
revision += 1;
|
|
19
|
+
sampleCount = 0;
|
|
20
|
+
stableSampleCount = 0;
|
|
21
|
+
previousSnapshot = null;
|
|
22
|
+
clearPending();
|
|
23
|
+
}
|
|
24
|
+
function scheduleNext(delayMs) {
|
|
25
|
+
if (!active || sampling || pendingHandle !== null) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
pendingHandle = options.scheduler.schedule(() => {
|
|
29
|
+
pendingHandle = null;
|
|
30
|
+
void sampleNext();
|
|
31
|
+
}, delayMs);
|
|
32
|
+
}
|
|
33
|
+
async function sampleNext() {
|
|
34
|
+
if (!active || sampling) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const sampleRevision = revision;
|
|
38
|
+
sampling = true;
|
|
39
|
+
const snapshot = await options.sample();
|
|
40
|
+
sampling = false;
|
|
41
|
+
if (sampleRevision !== revision) {
|
|
42
|
+
scheduleNext(0);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (snapshot === null) {
|
|
46
|
+
cancel();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
sampleCount += 1;
|
|
50
|
+
if (previousSnapshot !== null && options.areEqual(previousSnapshot, snapshot)) {
|
|
51
|
+
stableSampleCount += 1;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
stableSampleCount = 1;
|
|
55
|
+
}
|
|
56
|
+
previousSnapshot = snapshot;
|
|
57
|
+
if (stableSampleCount >= options.stableSampleCount || sampleCount >= options.maxSamples) {
|
|
58
|
+
cancel();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
scheduleNext(options.intervalMs);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
cancel,
|
|
65
|
+
isActive: () => active,
|
|
66
|
+
trigger: () => {
|
|
67
|
+
const wasActive = active;
|
|
68
|
+
active = true;
|
|
69
|
+
revision += 1;
|
|
70
|
+
sampleCount = 0;
|
|
71
|
+
stableSampleCount = 0;
|
|
72
|
+
previousSnapshot = null;
|
|
73
|
+
scheduleNext(0);
|
|
74
|
+
return !wasActive;
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=indicatorSettleCoordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicatorSettleCoordinator.js","sourceRoot":"","sources":["../../src/runtime/indicatorSettleCoordinator.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,gCAAgC,CAC9C,OAA4D;IAE5D,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,aAAa,GAAkB,IAAI,CAAC;IACxC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,iBAAiB,GAAG,CAAC,CAAC;IAC1B,IAAI,gBAAgB,GAAoB,IAAI,CAAC;IAE7C,SAAS,YAAY;QACnB,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;YAC3B,OAAO;QACT,CAAC;QACD,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACxC,aAAa,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,SAAS,MAAM;QACb,MAAM,GAAG,KAAK,CAAC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,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACxF,MAAM,EAAE,CAAC;YACT,OAAO;QACT,CAAC;QAED,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED,OAAO;QACL,MAAM;QACN,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM;QACtB,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,SAAS,GAAG,MAAM,CAAC;YACzB,MAAM,GAAG,IAAI,CAAC;YACd,QAAQ,IAAI,CAAC,CAAC;YACd,WAAW,GAAG,CAAC,CAAC;YAChB,iBAAiB,GAAG,CAAC,CAAC;YACtB,gBAAgB,GAAG,IAAI,CAAC;YACxB,YAAY,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO,CAAC,SAAS,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RuntimeNodePropsResolver } from '@ankhorage/runtime';
|
|
2
|
+
import type { ThirdPartyComponentSupport } from './interactionPolicyCore.js';
|
|
3
|
+
export type { InteractionPolicy, ThirdPartyComponentSupport } from './interactionPolicyCore.js';
|
|
4
|
+
export interface StudioInteractionPolicyResolverArgs {
|
|
5
|
+
readonly previewMode: boolean;
|
|
6
|
+
readonly thirdPartySupport?: ThirdPartyComponentSupport;
|
|
7
|
+
readonly existingResolver?: RuntimeNodePropsResolver;
|
|
8
|
+
}
|
|
9
|
+
export declare function createStudioInteractionPolicyResolver(args: StudioInteractionPolicyResolverArgs): RuntimeNodePropsResolver;
|
|
10
|
+
//# sourceMappingURL=interactionPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactionPolicy.d.ts","sourceRoot":"","sources":["../../src/runtime/interactionPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAGnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAM7E,YAAY,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAEhG,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IACxD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CACtD;AAED,wBAAgB,qCAAqC,CACnD,IAAI,EAAE,mCAAmC,GACxC,wBAAwB,CAa1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {} from '@ankhorage/runtime';
|
|
2
|
+
import { ZORA_COMPONENT_REGISTRY } from '@ankhorage/zora';
|
|
3
|
+
import { composeInteractionPolicyResolver, createInteractionPolicyResolver, } from './interactionPolicyCore.js';
|
|
4
|
+
export function createStudioInteractionPolicyResolver(args) {
|
|
5
|
+
const { previewMode, thirdPartySupport, existingResolver } = args;
|
|
6
|
+
const resolver = createInteractionPolicyResolver({
|
|
7
|
+
previewMode,
|
|
8
|
+
thirdPartySupport,
|
|
9
|
+
isSupportedNodeType: (nodeType) => Object.prototype.hasOwnProperty.call(ZORA_COMPONENT_REGISTRY, nodeType),
|
|
10
|
+
});
|
|
11
|
+
return existingResolver
|
|
12
|
+
? composeInteractionPolicyResolver(resolver, existingResolver)
|
|
13
|
+
: composeInteractionPolicyResolver(resolver);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=interactionPolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactionPolicy.js","sourceRoot":"","sources":["../../src/runtime/interactionPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EACL,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAUpC,MAAM,UAAU,qCAAqC,CACnD,IAAyC;IAEzC,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;IAElE,MAAM,QAAQ,GAAG,+BAA+B,CAAC;QAC/C,WAAW;QACX,iBAAiB;QACjB,mBAAmB,EAAE,CAAC,QAAQ,EAAE,EAAE,CAChC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC;KAC1E,CAAC,CAAC;IAEH,OAAO,gBAAgB;QACrB,CAAC,CAAC,gCAAgC,CAAC,QAAQ,EAAE,gBAAgB,CAAC;QAC9D,CAAC,CAAC,gCAAgC,CAAC,QAAQ,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type InteractionPolicy = 'enabled' | 'passive';
|
|
2
|
+
export type ThirdPartyComponentSupport = Readonly<Record<string, true>>;
|
|
3
|
+
export interface InteractionPolicyResolverArgs {
|
|
4
|
+
readonly previewMode: boolean;
|
|
5
|
+
readonly thirdPartySupport?: ThirdPartyComponentSupport;
|
|
6
|
+
readonly isSupportedNodeType: (nodeType: string) => boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function isComponentSupported(nodeType: string, thirdPartySupport: ThirdPartyComponentSupport, isSupportedNodeType: (type: string) => boolean): boolean;
|
|
9
|
+
export interface InteractionPolicyResolveArgs<TNode extends {
|
|
10
|
+
type: string;
|
|
11
|
+
} = {
|
|
12
|
+
type: string;
|
|
13
|
+
}> {
|
|
14
|
+
readonly node: TNode;
|
|
15
|
+
readonly props: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export type InteractionPolicyNodePropsResolver<TNode extends {
|
|
18
|
+
type: string;
|
|
19
|
+
} = {
|
|
20
|
+
type: string;
|
|
21
|
+
}> = (resolveArgs: InteractionPolicyResolveArgs<TNode>) => Record<string, unknown>;
|
|
22
|
+
export declare function createInteractionPolicyResolver(args: InteractionPolicyResolverArgs): InteractionPolicyNodePropsResolver;
|
|
23
|
+
export declare function composeInteractionPolicyResolver(interactionPolicyResolver: InteractionPolicyNodePropsResolver): InteractionPolicyNodePropsResolver;
|
|
24
|
+
export declare function composeInteractionPolicyResolver<TNode extends {
|
|
25
|
+
type: string;
|
|
26
|
+
}>(interactionPolicyResolver: InteractionPolicyNodePropsResolver, existingResolver: InteractionPolicyNodePropsResolver<TNode>): InteractionPolicyNodePropsResolver<TNode>;
|
|
27
|
+
//# sourceMappingURL=interactionPolicyCore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactionPolicyCore.d.ts","sourceRoot":"","sources":["../../src/runtime/interactionPolicyCore.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAC;AACtD,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AAExE,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IACxD,QAAQ,CAAC,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CAC7D;AAyBD,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,0BAA0B,EAC7C,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAC7C,OAAO,CAET;AAmBD,MAAM,WAAW,4BAA4B,CAAC,KAAK,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;IAC7F,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,MAAM,kCAAkC,CAAC,KAAK,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,IAC9F,CAAC,WAAW,EAAE,4BAA4B,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhF,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,6BAA6B,GAClC,kCAAkC,CAsBpC;AAED,wBAAgB,gCAAgC,CAC9C,yBAAyB,EAAE,kCAAkC,GAC5D,kCAAkC,CAAC;AACtC,wBAAgB,gCAAgC,CAAC,KAAK,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAC7E,yBAAyB,EAAE,kCAAkC,EAC7D,gBAAgB,EAAE,kCAAkC,CAAC,KAAK,CAAC,GAC1D,kCAAkC,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const EMPTY_THIRD_PARTY = {};
|
|
2
|
+
function classifyComponent(nodeType, isSupportedNodeType, thirdPartySupport) {
|
|
3
|
+
if (isSupportedNodeType(nodeType)) {
|
|
4
|
+
return 'zora-builtin';
|
|
5
|
+
}
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(thirdPartySupport, nodeType) &&
|
|
7
|
+
thirdPartySupport[nodeType] === true) {
|
|
8
|
+
return 'third-party-supported';
|
|
9
|
+
}
|
|
10
|
+
return 'unsupported';
|
|
11
|
+
}
|
|
12
|
+
export function isComponentSupported(nodeType, thirdPartySupport, isSupportedNodeType) {
|
|
13
|
+
return classifyComponent(nodeType, isSupportedNodeType, thirdPartySupport) !== 'unsupported';
|
|
14
|
+
}
|
|
15
|
+
function resolveInteractionPolicy(nodeType, previewMode, thirdPartySupport, isSupportedNodeType) {
|
|
16
|
+
const classification = classifyComponent(nodeType, isSupportedNodeType, thirdPartySupport);
|
|
17
|
+
if (classification === 'unsupported') {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
return previewMode ? 'enabled' : 'passive';
|
|
21
|
+
}
|
|
22
|
+
const POLICY_PROP = 'interactionPolicy';
|
|
23
|
+
export function createInteractionPolicyResolver(args) {
|
|
24
|
+
const { previewMode, thirdPartySupport = EMPTY_THIRD_PARTY, isSupportedNodeType } = args;
|
|
25
|
+
return (resolveArgs) => {
|
|
26
|
+
const baseProps = { ...resolveArgs.props };
|
|
27
|
+
const policy = resolveInteractionPolicy(resolveArgs.node.type, previewMode, thirdPartySupport, isSupportedNodeType);
|
|
28
|
+
if (policy === undefined) {
|
|
29
|
+
return baseProps;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
...baseProps,
|
|
33
|
+
[POLICY_PROP]: policy,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function composeInteractionPolicyResolver(interactionPolicyResolver, existingResolver) {
|
|
38
|
+
if (!existingResolver) {
|
|
39
|
+
return interactionPolicyResolver;
|
|
40
|
+
}
|
|
41
|
+
return (resolveArgs) => interactionPolicyResolver({
|
|
42
|
+
node: resolveArgs.node,
|
|
43
|
+
props: existingResolver(resolveArgs),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=interactionPolicyCore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactionPolicyCore.js","sourceRoot":"","sources":["../../src/runtime/interactionPolicyCore.ts"],"names":[],"mappings":"AASA,MAAM,iBAAiB,GAA+B,EAAE,CAAC;AAIzD,SAAS,iBAAiB,CACxB,QAAgB,EAChB,mBAA8C,EAC9C,iBAA6C;IAE7C,IAAI,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,IACE,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC;QACjE,iBAAiB,CAAC,QAAQ,CAAC,KAAK,IAAI,EACpC,CAAC;QACD,OAAO,uBAA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QACtB,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED,OAAO,CAAC,WAAW,EAAE,EAAE,CACrB,yBAAyB,CAAC;QACxB,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC;KACrC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ComponentRegistry, RuntimeRendererConfig } from '@ankhorage/runtime';
|
|
2
|
+
import type { ThirdPartyComponentSupport } from './interactionPolicyCore';
|
|
2
3
|
export interface StudioPreviewRuntimeConfigOptions {
|
|
3
4
|
readonly previewMode: boolean;
|
|
4
5
|
readonly components?: ComponentRegistry;
|
|
6
|
+
readonly interactionPolicySupport?: ThirdPartyComponentSupport;
|
|
7
|
+
readonly resolveNodeProps?: RuntimeRendererConfig['resolveNodeProps'];
|
|
5
8
|
}
|
|
6
9
|
export declare const createStudioPreviewRuntimeConfig: (options: StudioPreviewRuntimeConfigOptions) => RuntimeRendererConfig;
|
|
7
10
|
//# sourceMappingURL=previewRuntimeConfig.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAInF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAG1E,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IACxC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,0BAA0B,CAAC;IAC/D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACvE;AAED,eAAO,MAAM,gCAAgC,GAC3C,SAAS,iCAAiC,KACzC,qBAQD,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { shouldSuppressStudioRuntimeActions } from './actionSuppression';
|
|
2
|
+
import { createStudioInteractionPolicyResolver } from './interactionPolicy';
|
|
2
3
|
import { createStudioPreviewComponentRegistry } from './previewRegistry';
|
|
3
4
|
export const createStudioPreviewRuntimeConfig = (options) => ({
|
|
4
5
|
disableActions: shouldSuppressStudioRuntimeActions(options.previewMode),
|
|
5
6
|
registry: createStudioPreviewComponentRegistry({ components: options.components }),
|
|
7
|
+
resolveNodeProps: createStudioInteractionPolicyResolver({
|
|
8
|
+
previewMode: options.previewMode,
|
|
9
|
+
thirdPartySupport: options.interactionPolicySupport,
|
|
10
|
+
existingResolver: options.resolveNodeProps,
|
|
11
|
+
}),
|
|
6
12
|
});
|
|
7
13
|
//# sourceMappingURL=previewRuntimeConfig.js.map
|
|
@@ -1 +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;
|
|
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,qCAAqC,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,oCAAoC,EAAE,MAAM,mBAAmB,CAAC;AASzE,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;IAClF,gBAAgB,EAAE,qCAAqC,CAAC;QACtD,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,iBAAiB,EAAE,OAAO,CAAC,wBAAwB;QACnD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;KAC3C,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type LayoutChangeEvent, View } from 'react-native';
|
|
3
|
+
export type { CommitSelectionResult, StationarySelectionCoordinator, TransactionState, } from './stationarySelectionCoordinator.js';
|
|
4
|
+
type ViewRef = React.ElementRef<typeof View>;
|
|
5
|
+
export declare function useStudioUnsupportedNodeMeasurement(): {
|
|
6
|
+
readonly onLayout: (_event: LayoutChangeEvent) => void;
|
|
7
|
+
readonly ref: (view: ViewRef | null) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function createStudioStationarySelectionWrapNode(options?: {
|
|
10
|
+
readonly previewMode?: boolean;
|
|
11
|
+
readonly thirdPartySupport?: Readonly<Record<string, true>>;
|
|
12
|
+
}): (args: {
|
|
13
|
+
readonly node: {
|
|
14
|
+
readonly id?: string;
|
|
15
|
+
readonly type: string;
|
|
16
|
+
};
|
|
17
|
+
readonly rendered: React.ReactNode;
|
|
18
|
+
readonly isRoot: boolean;
|
|
19
|
+
}) => React.ReactNode;
|
|
20
|
+
declare function StationaryTapSelector(props: {
|
|
21
|
+
readonly isEditMode: boolean;
|
|
22
|
+
readonly selectedNodeId: string | null;
|
|
23
|
+
readonly selectNode: (id: string | null) => void;
|
|
24
|
+
readonly children: React.ReactNode;
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
export { StationaryTapSelector };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