@syntrologie/runtime-sdk 2.4.0-canary.7 → 2.4.0-canary.8
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/dist/api.d.ts +0 -5
- package/dist/{chunk-TTSCPUOI.js → chunk-LOOSAOHM.js} +2 -26
- package/dist/{chunk-TTSCPUOI.js.map → chunk-LOOSAOHM.js.map} +3 -3
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/dist/smart-canvas.esm.js +26 -26
- package/dist/smart-canvas.esm.js.map +3 -3
- package/dist/smart-canvas.js +2 -25
- package/dist/smart-canvas.js.map +2 -2
- package/dist/smart-canvas.min.js +23 -23
- package/dist/smart-canvas.min.js.map +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +7 -7
package/dist/api.d.ts
CHANGED
|
@@ -59,11 +59,6 @@ export interface SmartCanvasHandle {
|
|
|
59
59
|
* Get the current config.
|
|
60
60
|
*/
|
|
61
61
|
getConfig(): Promise<CanvasConfigResponse>;
|
|
62
|
-
/**
|
|
63
|
-
* Update the config and re-apply actions.
|
|
64
|
-
* This is the primary way to modify what the canvas displays.
|
|
65
|
-
*/
|
|
66
|
-
updateConfig(newConfig: CanvasConfigResponse): Promise<void>;
|
|
67
62
|
/**
|
|
68
63
|
* Enable or disable the canvas.
|
|
69
64
|
* When disabled, all actions are reverted.
|
|
@@ -2193,7 +2193,7 @@ function getAntiFlickerSnippet(config = {}) {
|
|
|
2193
2193
|
}
|
|
2194
2194
|
|
|
2195
2195
|
// src/version.ts
|
|
2196
|
-
var SDK_VERSION = "2.4.0-canary.
|
|
2196
|
+
var SDK_VERSION = "2.4.0-canary.8";
|
|
2197
2197
|
|
|
2198
2198
|
// src/types.ts
|
|
2199
2199
|
var SDK_SCHEMA_VERSION = "2.0";
|
|
@@ -4821,7 +4821,6 @@ var createSmartCanvas = async (config = {}) => {
|
|
|
4821
4821
|
let currentConfig = null;
|
|
4822
4822
|
let currentFetcher = null;
|
|
4823
4823
|
let currentBatchHandle = null;
|
|
4824
|
-
let isEnabled = true;
|
|
4825
4824
|
const { runtime: runtime3 } = config;
|
|
4826
4825
|
async function applyActions(actions) {
|
|
4827
4826
|
if (!(runtime3 == null ? void 0 : runtime3.actions) || actions.length === 0) {
|
|
@@ -4953,30 +4952,7 @@ var createSmartCanvas = async (config = {}) => {
|
|
|
4953
4952
|
}
|
|
4954
4953
|
return currentConfig != null ? currentConfig : { tiles: [], actions: [], fetchedAt: "" };
|
|
4955
4954
|
},
|
|
4956
|
-
updateConfig: async (newConfig) => {
|
|
4957
|
-
var _a3, _b2, _c2, _d2;
|
|
4958
|
-
console.log(
|
|
4959
|
-
"[SmartCanvas] updateConfig:",
|
|
4960
|
-
`tiles=${(_b2 = (_a3 = newConfig.tiles) == null ? void 0 : _a3.length) != null ? _b2 : 0},`,
|
|
4961
|
-
`actions=${(_d2 = (_c2 = newConfig.actions) == null ? void 0 : _c2.length) != null ? _d2 : 0},`,
|
|
4962
|
-
`enabled=${isEnabled}`
|
|
4963
|
-
);
|
|
4964
|
-
currentConfig = newConfig;
|
|
4965
|
-
if (newConfig.tiles && (runtime3 == null ? void 0 : runtime3.accumulator)) {
|
|
4966
|
-
registerConfigPredicates(newConfig.tiles, runtime3.accumulator);
|
|
4967
|
-
}
|
|
4968
|
-
if (isEnabled) {
|
|
4969
|
-
try {
|
|
4970
|
-
await applyActions(newConfig.actions);
|
|
4971
|
-
console.log("[SmartCanvas] updateConfig actions applied successfully");
|
|
4972
|
-
} catch (error2) {
|
|
4973
|
-
console.error("[SmartCanvas] updateConfig failed to apply actions:", error2);
|
|
4974
|
-
}
|
|
4975
|
-
}
|
|
4976
|
-
host.setOverrideFetcher(() => Promise.resolve(newConfig));
|
|
4977
|
-
},
|
|
4978
4955
|
setEnabled: async (enabled) => {
|
|
4979
|
-
isEnabled = enabled;
|
|
4980
4956
|
if (enabled) {
|
|
4981
4957
|
if (currentConfig) {
|
|
4982
4958
|
await applyActions(currentConfig.actions);
|
|
@@ -9605,4 +9581,4 @@ export {
|
|
|
9605
9581
|
encodeToken,
|
|
9606
9582
|
Syntro
|
|
9607
9583
|
};
|
|
9608
|
-
//# sourceMappingURL=chunk-
|
|
9584
|
+
//# sourceMappingURL=chunk-LOOSAOHM.js.map
|