@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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function isSupportedPointerInput(input) {
|
|
2
|
+
if (!input.isPrimary) {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
5
|
+
return input.pointerType !== 'mouse' || input.button === 0;
|
|
6
|
+
}
|
|
7
|
+
function getInteractionKey(input) {
|
|
8
|
+
return input.kind === 'pointer'
|
|
9
|
+
? `pointer:${input.pointerId}:${input.interactionId}`
|
|
10
|
+
: `touch:${input.touchId}:${input.interactionId}`;
|
|
11
|
+
}
|
|
12
|
+
export function createStationarySelectionInputState(args) {
|
|
13
|
+
let pendingInteractionKey = null;
|
|
14
|
+
let pendingPath = [];
|
|
15
|
+
function clear() {
|
|
16
|
+
pendingInteractionKey = null;
|
|
17
|
+
pendingPath = [];
|
|
18
|
+
}
|
|
19
|
+
function recordNode(nodeId, input) {
|
|
20
|
+
if (input.kind === 'pointer' && !isSupportedPointerInput(input)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
if (args.hasActiveTransaction()) {
|
|
24
|
+
args.recordActiveNode(nodeId);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
const interactionKey = getInteractionKey(input);
|
|
28
|
+
if (pendingInteractionKey !== interactionKey) {
|
|
29
|
+
pendingInteractionKey = interactionKey;
|
|
30
|
+
pendingPath = [];
|
|
31
|
+
}
|
|
32
|
+
if (!pendingPath.includes(nodeId)) {
|
|
33
|
+
pendingPath.push(nodeId);
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function beginTransaction(recordNode) {
|
|
38
|
+
for (const nodeId of pendingPath) {
|
|
39
|
+
recordNode(nodeId);
|
|
40
|
+
}
|
|
41
|
+
clear();
|
|
42
|
+
}
|
|
43
|
+
function completePendingInteraction() {
|
|
44
|
+
if (!args.hasActiveTransaction()) {
|
|
45
|
+
clear();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
recordNode,
|
|
50
|
+
beginTransaction,
|
|
51
|
+
completePendingInteraction,
|
|
52
|
+
clear,
|
|
53
|
+
getPendingPath: () => pendingPath,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=stationarySelectionInputState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stationarySelectionInputState.js","sourceRoot":"","sources":["../../src/runtime/stationarySelectionInputState.ts"],"names":[],"mappings":"AAyBA,SAAS,uBAAuB,CAAC,KAA6B;IAC5D,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,KAAK,CAAC,WAAW,KAAK,OAAO,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,iBAAiB,CAAC,KAA+B;IACxD,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS;QAC7B,CAAC,CAAC,WAAW,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,aAAa,EAAE;QACrD,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,mCAAmC,CAAC,IAGnD;IACC,IAAI,qBAAqB,GAAkB,IAAI,CAAC;IAChD,IAAI,WAAW,GAAa,EAAE,CAAC;IAE/B,SAAS,KAAK;QACZ,qBAAqB,GAAG,IAAI,CAAC;QAC7B,WAAW,GAAG,EAAE,CAAC;IACnB,CAAC;IAED,SAAS,UAAU,CAAC,MAAc,EAAE,KAA+B;QACjE,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC;YAChE,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC;YAChC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;YAC9B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,cAAc,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,qBAAqB,KAAK,cAAc,EAAE,CAAC;YAC7C,qBAAqB,GAAG,cAAc,CAAC;YACvC,WAAW,GAAG,EAAE,CAAC;QACnB,CAAC;QAED,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,gBAAgB,CAAC,UAAoC;QAC5D,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;YACjC,UAAU,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC;QACD,KAAK,EAAE,CAAC;IACV,CAAC;IAED,SAAS,0BAA0B;QACjC,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC;YACjC,KAAK,EAAE,CAAC;QACV,CAAC;IACH,CAAC;IAED,OAAO;QACL,UAAU;QACV,gBAAgB;QAChB,0BAA0B;QAC1B,KAAK;QACL,cAAc,EAAE,GAAG,EAAE,CAAC,WAAW;KAClC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Studio authoring package for Ankhorage apps",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/studio#readme",
|
|
@@ -240,11 +240,12 @@
|
|
|
240
240
|
"@ankhorage/supabase-auth": "^1.1.1",
|
|
241
241
|
"@ankhorage/supabase-vault": "^0.2.0",
|
|
242
242
|
"@ankhorage/templates": "^3.0.0",
|
|
243
|
-
"@ankhorage/zora": "^2.
|
|
243
|
+
"@ankhorage/zora": "^2.9.0",
|
|
244
244
|
"@ankhorage/zora-chess": "^0.1.2",
|
|
245
245
|
"@ankhorage/zora-tabletop": "^0.0.5",
|
|
246
246
|
"@fastify/cors": "^11.2.0",
|
|
247
|
-
"fastify": "^5.7.4"
|
|
247
|
+
"fastify": "^5.7.4",
|
|
248
|
+
"react-native-gesture-handler": "~2.28.0"
|
|
248
249
|
},
|
|
249
250
|
"peerDependencies": {
|
|
250
251
|
"@expo/vector-icons": "^15.0.3",
|