@kizenapps/engine 1.1.0-d939a15 → 1.2.0-70fc7c2

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 (30) hide show
  1. package/dist/{chunk-6G7FOXZI.js → chunk-6AELDX3G.js} +3 -3
  2. package/dist/{chunk-6G7FOXZI.js.map → chunk-6AELDX3G.js.map} +1 -1
  3. package/dist/{chunk-7O2G74YB.js → chunk-CL6AC3ZL.js} +3 -3
  4. package/dist/{chunk-7O2G74YB.js.map → chunk-CL6AC3ZL.js.map} +1 -1
  5. package/dist/{chunk-GENGXQSR.js → chunk-DTAWTWVH.js} +5 -5
  6. package/dist/{chunk-GENGXQSR.js.map → chunk-DTAWTWVH.js.map} +1 -1
  7. package/dist/{chunk-33SITFRU.js → chunk-GLMIG5QG.js} +3 -3
  8. package/dist/{chunk-33SITFRU.js.map → chunk-GLMIG5QG.js.map} +1 -1
  9. package/dist/{chunk-J4O7ASPN.js → chunk-LGZ5VFMW.js} +4 -4
  10. package/dist/{chunk-J4O7ASPN.js.map → chunk-LGZ5VFMW.js.map} +1 -1
  11. package/dist/{chunk-6AVD5CO7.js → chunk-PV247HYV.js} +3 -3
  12. package/dist/{chunk-6AVD5CO7.js.map → chunk-PV247HYV.js.map} +1 -1
  13. package/dist/{chunk-KUL4CLV4.js → chunk-PYBTDLGY.js} +3 -3
  14. package/dist/{chunk-KUL4CLV4.js.map → chunk-PYBTDLGY.js.map} +1 -1
  15. package/dist/{chunk-BFQWTE4G.js → chunk-VKMZQHVH.js} +5 -5
  16. package/dist/{chunk-BFQWTE4G.js.map → chunk-VKMZQHVH.js.map} +1 -1
  17. package/dist/{chunk-PKVVV7CO.js → chunk-WWFCBKFR.js} +3 -3
  18. package/dist/{chunk-PKVVV7CO.js.map → chunk-WWFCBKFR.js.map} +1 -1
  19. package/dist/communication.js +2 -2
  20. package/dist/contexts/base.js +4 -4
  21. package/dist/contexts/floatingFrame.js +5 -5
  22. package/dist/contexts/recordDetail.js +5 -5
  23. package/dist/index.js +3 -3
  24. package/dist/react.js +5 -5
  25. package/dist/util.js +6 -6
  26. package/dist/workers/calendarSource.worker.js +6 -6
  27. package/dist/workers/floatingFrame.worker.js +7 -7
  28. package/dist/workers/generic.worker.js +6 -6
  29. package/dist/workers/recordDetail.worker.js +7 -7
  30. package/package.json +1 -6
@@ -1,4 +1,4 @@
1
- import { ROUTE_CHANGE_INTERNAL_EVENT } from './chunk-33SITFRU.js';
1
+ import { ROUTE_CHANGE_INTERNAL_EVENT } from './chunk-GLMIG5QG.js';
2
2
 
3
3
  // src/util/run.ts
4
4
  var getPartialLocation = () => {
@@ -117,5 +117,5 @@ var findMatchingAction = (availableActions, apiName) => {
117
117
  };
118
118
 
119
119
  export { emitRouteChange, findMatchingAction, generateExecutionKey, generateUUIDV4, getFn, getFnWithReturn, getPartialLocation };
120
- //# sourceMappingURL=chunk-PKVVV7CO.js.map
121
- //# sourceMappingURL=chunk-PKVVV7CO.js.map
120
+ //# sourceMappingURL=chunk-WWFCBKFR.js.map
121
+ //# sourceMappingURL=chunk-WWFCBKFR.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/util/run.ts"],"names":["action"],"mappings":";;;AAKO,IAAM,qBAAqB,MAAuB;AACvD,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,OAAO,QAAA,CAAS,IAAA;AAAA,IACtB,IAAA,EAAM,OAAO,QAAA,CAAS,IAAA;AAAA,IACtB,IAAA,EAAM,OAAO,QAAA,CAAS,IAAA;AAAA,IACtB,MAAA,EAAQ,OAAO,QAAA,CAAS,MAAA;AAAA,IACxB,QAAA,EAAU,OAAO,QAAA,CAAS,QAAA;AAAA,IAC1B,MAAA,EAAQ,OAAO,QAAA,CAAS,MAAA;AAAA,IACxB,IAAA,EAAM,OAAO,QAAA,CAAS,IAAA;AAAA,IACtB,QAAA,EAAU,OAAO,QAAA,CAAS;AAAA,GAC5B;AACF;AAEO,IAAM,iBAAiB,MAAc;AAC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EAMA,OAAA,KACY;AACZ,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,EAAE,aAAA,EAAe,aAAA,EAAc,GAAI,mBAAmB,OAAO,CAAA;AAEnE,EAAA,IAAI,CAAC,aAAA,EAAe;AAClB,IAAA,MAAMA,OAAAA,GAAS,gBAAA,CAAiB,IAAA,CAAK,CAAC,GAAA,KAAQ,CAAC,GAAA,CAAI,SAAA,IAAa,GAAA,CAAI,OAAA,KAAY,aAAa,CAAA;AAE7F,IAAA,OAAOA,OAAAA;AAAA,EACT;AAEA,EAAA,MAAM,SAAS,gBAAA,CAAiB,IAAA;AAAA,IAC9B,CAAC,GAAA,KAAQ,GAAA,CAAI,YAAY,aAAA,IAAiB,GAAA,CAAI,WAAW,OAAA,KAAY;AAAA,GACvE;AAEA,EAAA,OAAO,MAAA;AACT","file":"chunk-PKVVV7CO.js","sourcesContent":["import { ROUTE_CHANGE_INTERNAL_EVENT } from '../communication/constants.js';\nimport type { PartialLocation } from '../types/common.js';\nimport type { CommonExecutionPlugin, CommonPluginDefinition } from '../types/run.js';\nimport type { AsyncFunctionConstructor, BuiltAsyncFn } from '../types/workers.js';\n\nexport const getPartialLocation = (): PartialLocation => {\n return {\n host: window.location.host,\n hash: window.location.hash,\n href: window.location.href,\n origin: window.location.origin,\n pathname: window.location.pathname,\n search: window.location.search,\n port: window.location.port,\n protocol: window.location.protocol,\n };\n};\n\nexport const generateUUIDV4 = (): string => {\n let d = new Date().getTime();\n\n if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n d += performance.now();\n }\n\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = ((d + Math.random() * 16) % 16) | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nconst AsyncFunction = (\n Object.getPrototypeOf(async function () {\n /* empty */\n }) as { constructor: AsyncFunctionConstructor }\n).constructor;\n\nexport const getFnWithReturn = (script: string): BuiltAsyncFn => {\n const functionBody = `\n const __cleanup = this.__cleanup.bind(this);\n const __error = this.onError.bind(this);\n let __kizen_internal_result;\n {\n this.__setup();\n }\n try {\n __kizen_internal_result = await (async () => { ${script} })();\n } catch (ex) {\n __error(ex);\n } finally {\n __cleanup(__kizen_internal_result);\n }\n `;\n\n try {\n const fn = new AsyncFunction(functionBody);\n\n return { fn, functionBody };\n } catch {\n const errorFnBody = `\n this.__setup();\n this.onError({ message: \"The script has a syntax error and could not be parsed\" });\n this.__cleanup();\n `;\n\n const fn = new AsyncFunction(errorFnBody);\n\n return { fn, functionBody: errorFnBody };\n }\n};\n\nexport const getFn = (script: string): BuiltAsyncFn => {\n const functionBody = `\n const __cleanup = this.__cleanup.bind(this);\n const __error = this.onError.bind(this);\n {\n this.__setup();\n }\n try {\n ${script}\n } catch (ex) {\n __error(ex);\n } finally {\n __cleanup();\n }\n `;\n\n try {\n const fn = new AsyncFunction(functionBody);\n\n return { fn, functionBody };\n } catch {\n const errorFnBody = `\n this.__setup();\n this.onError({ message: \"The script has a syntax error and could not be parsed\" });\n this.__cleanup();\n `;\n\n const fn = new AsyncFunction(errorFnBody);\n\n return { fn, functionBody: errorFnBody };\n }\n};\n\nexport const generateExecutionKey = (\n pluginConfig?: CommonPluginDefinition | CommonExecutionPlugin,\n): string => {\n return `${pluginConfig?.plugin_api_name ?? ''}-${pluginConfig?.id ?? ''}-${pluginConfig?.api_name ?? ''}-${pluginConfig?.script_id ?? ''}`;\n};\n\nexport const emitRouteChange = (): void => {\n const event = new CustomEvent(ROUTE_CHANGE_INTERNAL_EVENT, {\n detail: {\n location: getPartialLocation(),\n },\n });\n\n window.dispatchEvent(event);\n};\n\nconst splitScriptApiName = (\n scriptApiName: string,\n): { pluginApiName: string | undefined; actionApiName: string | undefined } => {\n const [pluginApiName, actionApiName] = scriptApiName.split('.');\n\n return {\n pluginApiName,\n actionApiName,\n };\n};\n\nexport const findMatchingAction = (\n availableActions: {\n pluginApp?: {\n apiName: string;\n };\n apiName: string;\n }[],\n apiName?: string,\n): unknown => {\n if (!apiName) {\n return null;\n }\n\n const { pluginApiName, actionApiName } = splitScriptApiName(apiName);\n\n if (!pluginApiName) {\n const action = availableActions.find((act) => !act.pluginApp && act.apiName === actionApiName);\n\n return action;\n }\n\n const action = availableActions.find(\n (act) => act.apiName === actionApiName && act.pluginApp?.apiName === pluginApiName,\n );\n\n return action;\n};\n"]}
1
+ {"version":3,"sources":["../src/util/run.ts"],"names":["action"],"mappings":";;;AAKO,IAAM,qBAAqB,MAAuB;AACvD,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,OAAO,QAAA,CAAS,IAAA;AAAA,IACtB,IAAA,EAAM,OAAO,QAAA,CAAS,IAAA;AAAA,IACtB,IAAA,EAAM,OAAO,QAAA,CAAS,IAAA;AAAA,IACtB,MAAA,EAAQ,OAAO,QAAA,CAAS,MAAA;AAAA,IACxB,QAAA,EAAU,OAAO,QAAA,CAAS,QAAA;AAAA,IAC1B,MAAA,EAAQ,OAAO,QAAA,CAAS,MAAA;AAAA,IACxB,IAAA,EAAM,OAAO,QAAA,CAAS,IAAA;AAAA,IACtB,QAAA,EAAU,OAAO,QAAA,CAAS;AAAA,GAC5B;AACF;AAEO,IAAM,iBAAiB,MAAc;AAC1C,EAAA,IAAI,CAAA,GAAA,iBAAI,IAAI,IAAA,EAAK,EAAE,OAAA,EAAQ;AAE3B,EAAA,IAAI,OAAO,WAAA,KAAgB,WAAA,IAAe,OAAO,WAAA,CAAY,QAAQ,UAAA,EAAY;AAC/E,IAAA,CAAA,IAAK,YAAY,GAAA,EAAI;AAAA,EACvB;AAEA,EAAA,OAAO,sCAAA,CAAuC,OAAA,CAAQ,OAAA,EAAS,CAAC,CAAA,KAAM;AACpE,IAAA,MAAM,KAAM,CAAA,GAAI,IAAA,CAAK,MAAA,EAAO,GAAI,MAAM,EAAA,GAAM,CAAA;AAC5C,IAAA,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MAAM,SAAS,gBAAA,CAAiB,IAAA;AAAA,IAC9B,CAAC,GAAA,KAAQ,GAAA,CAAI,YAAY,aAAA,IAAiB,GAAA,CAAI,WAAW,OAAA,KAAY;AAAA,GACvE;AAEA,EAAA,OAAO,MAAA;AACT","file":"chunk-WWFCBKFR.js","sourcesContent":["import { ROUTE_CHANGE_INTERNAL_EVENT } from '../communication/constants.js';\nimport type { PartialLocation } from '../types/common.js';\nimport type { CommonExecutionPlugin, CommonPluginDefinition } from '../types/run.js';\nimport type { AsyncFunctionConstructor, BuiltAsyncFn } from '../types/workers.js';\n\nexport const getPartialLocation = (): PartialLocation => {\n return {\n host: window.location.host,\n hash: window.location.hash,\n href: window.location.href,\n origin: window.location.origin,\n pathname: window.location.pathname,\n search: window.location.search,\n port: window.location.port,\n protocol: window.location.protocol,\n };\n};\n\nexport const generateUUIDV4 = (): string => {\n let d = new Date().getTime();\n\n if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n d += performance.now();\n }\n\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = ((d + Math.random() * 16) % 16) | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nconst AsyncFunction = (\n Object.getPrototypeOf(async function () {\n /* empty */\n }) as { constructor: AsyncFunctionConstructor }\n).constructor;\n\nexport const getFnWithReturn = (script: string): BuiltAsyncFn => {\n const functionBody = `\n const __cleanup = this.__cleanup.bind(this);\n const __error = this.onError.bind(this);\n let __kizen_internal_result;\n {\n this.__setup();\n }\n try {\n __kizen_internal_result = await (async () => { ${script} })();\n } catch (ex) {\n __error(ex);\n } finally {\n __cleanup(__kizen_internal_result);\n }\n `;\n\n try {\n const fn = new AsyncFunction(functionBody);\n\n return { fn, functionBody };\n } catch {\n const errorFnBody = `\n this.__setup();\n this.onError({ message: \"The script has a syntax error and could not be parsed\" });\n this.__cleanup();\n `;\n\n const fn = new AsyncFunction(errorFnBody);\n\n return { fn, functionBody: errorFnBody };\n }\n};\n\nexport const getFn = (script: string): BuiltAsyncFn => {\n const functionBody = `\n const __cleanup = this.__cleanup.bind(this);\n const __error = this.onError.bind(this);\n {\n this.__setup();\n }\n try {\n ${script}\n } catch (ex) {\n __error(ex);\n } finally {\n __cleanup();\n }\n `;\n\n try {\n const fn = new AsyncFunction(functionBody);\n\n return { fn, functionBody };\n } catch {\n const errorFnBody = `\n this.__setup();\n this.onError({ message: \"The script has a syntax error and could not be parsed\" });\n this.__cleanup();\n `;\n\n const fn = new AsyncFunction(errorFnBody);\n\n return { fn, functionBody: errorFnBody };\n }\n};\n\nexport const generateExecutionKey = (\n pluginConfig?: CommonPluginDefinition | CommonExecutionPlugin,\n): string => {\n return `${pluginConfig?.plugin_api_name ?? ''}-${pluginConfig?.id ?? ''}-${pluginConfig?.api_name ?? ''}-${pluginConfig?.script_id ?? ''}`;\n};\n\nexport const emitRouteChange = (): void => {\n const event = new CustomEvent(ROUTE_CHANGE_INTERNAL_EVENT, {\n detail: {\n location: getPartialLocation(),\n },\n });\n\n window.dispatchEvent(event);\n};\n\nconst splitScriptApiName = (\n scriptApiName: string,\n): { pluginApiName: string | undefined; actionApiName: string | undefined } => {\n const [pluginApiName, actionApiName] = scriptApiName.split('.');\n\n return {\n pluginApiName,\n actionApiName,\n };\n};\n\nexport const findMatchingAction = (\n availableActions: {\n pluginApp?: {\n apiName: string;\n };\n apiName: string;\n }[],\n apiName?: string,\n): unknown => {\n if (!apiName) {\n return null;\n }\n\n const { pluginApiName, actionApiName } = splitScriptApiName(apiName);\n\n if (!pluginApiName) {\n const action = availableActions.find((act) => !act.pluginApp && act.apiName === actionApiName);\n\n return action;\n }\n\n const action = availableActions.find(\n (act) => act.apiName === actionApiName && act.pluginApp?.apiName === pluginApiName,\n );\n\n return action;\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  import './chunk-LGJYUPYZ.js';
2
- export { Communicate, runFrameScriptEventName } from './chunk-KUL4CLV4.js';
3
- export { IFRAME_PREFIX, INDICATOR_TYPE, ThirdPartyScript } from './chunk-33SITFRU.js';
2
+ export { Communicate, runFrameScriptEventName } from './chunk-PYBTDLGY.js';
3
+ export { IFRAME_PREFIX, INDICATOR_TYPE, ThirdPartyScript } from './chunk-GLMIG5QG.js';
4
4
  import './chunk-5WRI5ZAA.js';
5
5
  //# sourceMappingURL=communication.js.map
6
6
  //# sourceMappingURL=communication.js.map
@@ -1,7 +1,7 @@
1
- export { BaseWorkerContext } from '../chunk-GENGXQSR.js';
2
- import '../chunk-7O2G74YB.js';
3
- import '../chunk-KUL4CLV4.js';
4
- import '../chunk-33SITFRU.js';
1
+ export { BaseWorkerContext } from '../chunk-DTAWTWVH.js';
2
+ import '../chunk-CL6AC3ZL.js';
3
+ import '../chunk-PYBTDLGY.js';
4
+ import '../chunk-GLMIG5QG.js';
5
5
  import '../chunk-5WRI5ZAA.js';
6
6
  //# sourceMappingURL=base.js.map
7
7
  //# sourceMappingURL=base.js.map
@@ -1,8 +1,8 @@
1
- export { FloatingFrameWorkerContext } from '../chunk-J4O7ASPN.js';
2
- import '../chunk-GENGXQSR.js';
3
- import '../chunk-7O2G74YB.js';
4
- import '../chunk-KUL4CLV4.js';
5
- import '../chunk-33SITFRU.js';
1
+ export { FloatingFrameWorkerContext } from '../chunk-LGZ5VFMW.js';
2
+ import '../chunk-DTAWTWVH.js';
3
+ import '../chunk-CL6AC3ZL.js';
4
+ import '../chunk-PYBTDLGY.js';
5
+ import '../chunk-GLMIG5QG.js';
6
6
  import '../chunk-5WRI5ZAA.js';
7
7
  //# sourceMappingURL=floatingFrame.js.map
8
8
  //# sourceMappingURL=floatingFrame.js.map
@@ -1,8 +1,8 @@
1
- export { RecordDetailWorkerContext } from '../chunk-6G7FOXZI.js';
2
- import '../chunk-GENGXQSR.js';
3
- import '../chunk-7O2G74YB.js';
4
- import '../chunk-KUL4CLV4.js';
5
- import '../chunk-33SITFRU.js';
1
+ export { RecordDetailWorkerContext } from '../chunk-6AELDX3G.js';
2
+ import '../chunk-DTAWTWVH.js';
3
+ import '../chunk-CL6AC3ZL.js';
4
+ import '../chunk-PYBTDLGY.js';
5
+ import '../chunk-GLMIG5QG.js';
6
6
  import '../chunk-5WRI5ZAA.js';
7
7
  //# sourceMappingURL=recordDetail.js.map
8
8
  //# sourceMappingURL=recordDetail.js.map
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version } from './chunk-BFQWTE4G.js';
2
- import './chunk-PKVVV7CO.js';
3
- import './chunk-33SITFRU.js';
1
+ export { runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version } from './chunk-VKMZQHVH.js';
2
+ import './chunk-WWFCBKFR.js';
3
+ import './chunk-GLMIG5QG.js';
4
4
  import './chunk-5WRI5ZAA.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map
package/dist/react.js CHANGED
@@ -1,9 +1,9 @@
1
- import { runScript, runExpression, getStableHash, isFlagEnabled } from './chunk-BFQWTE4G.js';
1
+ import { runScript, runExpression, getStableHash, isFlagEnabled } from './chunk-VKMZQHVH.js';
2
2
  import './chunk-LGJYUPYZ.js';
3
- import { generateExecutionKey } from './chunk-PKVVV7CO.js';
4
- import { getAllNestedInputsFromConfig, getFieldFromAction } from './chunk-7O2G74YB.js';
5
- import { runFrameScriptEventName } from './chunk-KUL4CLV4.js';
6
- import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-33SITFRU.js';
3
+ import { generateExecutionKey } from './chunk-WWFCBKFR.js';
4
+ import { getAllNestedInputsFromConfig, getFieldFromAction } from './chunk-CL6AC3ZL.js';
5
+ import { runFrameScriptEventName } from './chunk-PYBTDLGY.js';
6
+ import { QUERY_KEYS, ROUTE_CHANGE_INTERNAL_EVENT, IFRAME_PREFIX, ROUTE_CHANGE_IFRAME_EVENT } from './chunk-GLMIG5QG.js';
7
7
  import './chunk-5WRI5ZAA.js';
8
8
  import { QueryClient, useQueries, useQueryClient, QueryClientContext, QueryClientProvider } from '@tanstack/react-query';
9
9
  import { createContext, useContext, useState, useCallback, useMemo, useRef, useEffect } from 'react';
package/dist/util.js CHANGED
@@ -1,9 +1,9 @@
1
- import { runExpression } from './chunk-BFQWTE4G.js';
2
- export { getHash, getStableHash, isFlagEnabled } from './chunk-BFQWTE4G.js';
3
- export { emitRouteChange, findMatchingAction, getPartialLocation } from './chunk-PKVVV7CO.js';
4
- import { getAllNestedInputsFromConfig } from './chunk-7O2G74YB.js';
5
- export { cleanConfig, getFieldFromAction } from './chunk-7O2G74YB.js';
6
- import './chunk-33SITFRU.js';
1
+ import { runExpression } from './chunk-VKMZQHVH.js';
2
+ export { getHash, getStableHash, isFlagEnabled } from './chunk-VKMZQHVH.js';
3
+ export { emitRouteChange, findMatchingAction, getPartialLocation } from './chunk-WWFCBKFR.js';
4
+ import { getAllNestedInputsFromConfig } from './chunk-CL6AC3ZL.js';
5
+ export { cleanConfig, getFieldFromAction } from './chunk-CL6AC3ZL.js';
6
+ import './chunk-GLMIG5QG.js';
7
7
  import './chunk-5WRI5ZAA.js';
8
8
 
9
9
  // src/util/values.ts
@@ -1,9 +1,9 @@
1
- import { WorkerPromise } from '../chunk-6AVD5CO7.js';
2
- import { getFnWithReturn } from '../chunk-PKVVV7CO.js';
3
- import { BaseWorkerContext } from '../chunk-GENGXQSR.js';
4
- import { dynamicPromptHandler, promptHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-7O2G74YB.js';
5
- import '../chunk-KUL4CLV4.js';
6
- import { ACTIONS } from '../chunk-33SITFRU.js';
1
+ import { WorkerPromise } from '../chunk-PV247HYV.js';
2
+ import { getFnWithReturn } from '../chunk-WWFCBKFR.js';
3
+ import { BaseWorkerContext } from '../chunk-DTAWTWVH.js';
4
+ import { dynamicPromptHandler, promptHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-CL6AC3ZL.js';
5
+ import '../chunk-PYBTDLGY.js';
6
+ import { ACTIONS } from '../chunk-GLMIG5QG.js';
7
7
  import '../chunk-5WRI5ZAA.js';
8
8
 
9
9
  // src/workers/calendarSource.worker.ts
@@ -1,10 +1,10 @@
1
- import { FloatingFrameWorkerContext } from '../chunk-J4O7ASPN.js';
2
- import { WorkerPromise } from '../chunk-6AVD5CO7.js';
3
- import { getFn } from '../chunk-PKVVV7CO.js';
4
- import '../chunk-GENGXQSR.js';
5
- import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-7O2G74YB.js';
6
- import '../chunk-KUL4CLV4.js';
7
- import { ACTIONS } from '../chunk-33SITFRU.js';
1
+ import { FloatingFrameWorkerContext } from '../chunk-LGZ5VFMW.js';
2
+ import { WorkerPromise } from '../chunk-PV247HYV.js';
3
+ import { getFn } from '../chunk-WWFCBKFR.js';
4
+ import '../chunk-DTAWTWVH.js';
5
+ import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-CL6AC3ZL.js';
6
+ import '../chunk-PYBTDLGY.js';
7
+ import { ACTIONS } from '../chunk-GLMIG5QG.js';
8
8
  import '../chunk-5WRI5ZAA.js';
9
9
 
10
10
  // src/workers/floatingFrame.worker.ts
@@ -1,9 +1,9 @@
1
- import { WorkerPromise } from '../chunk-6AVD5CO7.js';
2
- import { getFn } from '../chunk-PKVVV7CO.js';
3
- import { BaseWorkerContext } from '../chunk-GENGXQSR.js';
4
- import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-7O2G74YB.js';
5
- import '../chunk-KUL4CLV4.js';
6
- import { ACTIONS } from '../chunk-33SITFRU.js';
1
+ import { WorkerPromise } from '../chunk-PV247HYV.js';
2
+ import { getFn } from '../chunk-WWFCBKFR.js';
3
+ import { BaseWorkerContext } from '../chunk-DTAWTWVH.js';
4
+ import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-CL6AC3ZL.js';
5
+ import '../chunk-PYBTDLGY.js';
6
+ import { ACTIONS } from '../chunk-GLMIG5QG.js';
7
7
  import '../chunk-5WRI5ZAA.js';
8
8
 
9
9
  // src/workers/generic.worker.ts
@@ -1,10 +1,10 @@
1
- import { RecordDetailWorkerContext } from '../chunk-6G7FOXZI.js';
2
- import { WorkerPromise } from '../chunk-6AVD5CO7.js';
3
- import { getFn } from '../chunk-PKVVV7CO.js';
4
- import '../chunk-GENGXQSR.js';
5
- import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-7O2G74YB.js';
6
- import '../chunk-KUL4CLV4.js';
7
- import { ACTIONS } from '../chunk-33SITFRU.js';
1
+ import { RecordDetailWorkerContext } from '../chunk-6AELDX3G.js';
2
+ import { WorkerPromise } from '../chunk-PV247HYV.js';
3
+ import { getFn } from '../chunk-WWFCBKFR.js';
4
+ import '../chunk-DTAWTWVH.js';
5
+ import { openCreateRelatedRecordHandler, openCreateRecordHandler, refreshEntityHandler, dynamicPromptHandler, promptHandler, installThirdPartyScriptHandler, uploadFileHandler, postFormDataHandler, kizenRequestHandler, handleCommonResponse } from '../chunk-CL6AC3ZL.js';
6
+ import '../chunk-PYBTDLGY.js';
7
+ import { ACTIONS } from '../chunk-GLMIG5QG.js';
8
8
  import '../chunk-5WRI5ZAA.js';
9
9
 
10
10
  // src/workers/recordDetail.worker.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizenapps/engine",
3
- "version": "1.1.0-d939a15",
3
+ "version": "1.2.0-70fc7c2",
4
4
  "description": "Run JavaScript plugin apps inside Web Workers with host ↔ worker messaging",
5
5
  "license": "GPL-3.0",
6
6
  "type": "module",
@@ -47,11 +47,6 @@
47
47
  "README.md",
48
48
  "LICENSE.md"
49
49
  ],
50
- "dependencies": {
51
- "@tanstack/react-query": "^5.0.0",
52
- "date-fns": "^3.6.0",
53
- "date-fns-tz": "^3.2.0"
54
- },
55
50
  "peerDependencies": {
56
51
  "@tanstack/react-query": ">=5",
57
52
  "date-fns": ">=3",