@kizenapps/engine 1.9.1-83a6c38 → 1.9.2-606b66e

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 (32) hide show
  1. package/README.md +136 -120
  2. package/dist/{chunk-JJ73EPHG.js → chunk-5YJW62FL.js} +4 -4
  3. package/dist/{chunk-JJ73EPHG.js.map → chunk-5YJW62FL.js.map} +1 -1
  4. package/dist/{chunk-TP7GSF2G.js → chunk-ATHQU7SK.js} +6 -6
  5. package/dist/{chunk-TP7GSF2G.js.map → chunk-ATHQU7SK.js.map} +1 -1
  6. package/dist/{chunk-2KN64BCJ.js → chunk-FPAHVMF2.js} +3 -3
  7. package/dist/{chunk-2KN64BCJ.js.map → chunk-FPAHVMF2.js.map} +1 -1
  8. package/dist/{chunk-ZA5NLC5A.js → chunk-KOFWEAGS.js} +6 -8
  9. package/dist/chunk-KOFWEAGS.js.map +1 -0
  10. package/dist/{chunk-RVMKI3GK.js → chunk-LGZ3YO4Y.js} +3 -3
  11. package/dist/{chunk-RVMKI3GK.js.map → chunk-LGZ3YO4Y.js.map} +1 -1
  12. package/dist/{chunk-5NF4DYQJ.js → chunk-SEYJTWOJ.js} +3 -3
  13. package/dist/{chunk-5NF4DYQJ.js.map → chunk-SEYJTWOJ.js.map} +1 -1
  14. package/dist/{chunk-4DK3CMXY.js → chunk-TVIBQ23X.js} +3 -3
  15. package/dist/{chunk-4DK3CMXY.js.map → chunk-TVIBQ23X.js.map} +1 -1
  16. package/dist/{chunk-Z4KYP5P5.js → chunk-UTQU6FE3.js} +3 -3
  17. package/dist/{chunk-Z4KYP5P5.js.map → chunk-UTQU6FE3.js.map} +1 -1
  18. package/dist/{chunk-JVRZSUQ2.js → chunk-ZEKWEAGC.js} +3 -3
  19. package/dist/{chunk-JVRZSUQ2.js.map → chunk-ZEKWEAGC.js.map} +1 -1
  20. package/dist/communication.js +2 -2
  21. package/dist/contexts/base.js +4 -4
  22. package/dist/contexts/floatingFrame.js +5 -5
  23. package/dist/contexts/recordDetail.js +5 -5
  24. package/dist/index.js +4 -4
  25. package/dist/react.js +5 -5
  26. package/dist/util.js +6 -6
  27. package/dist/workers/calendarSource.worker.js +6 -6
  28. package/dist/workers/floatingFrame.worker.js +7 -7
  29. package/dist/workers/generic.worker.js +6 -6
  30. package/dist/workers/recordDetail.worker.js +7 -7
  31. package/package.json +21 -3
  32. package/dist/chunk-ZA5NLC5A.js.map +0 -1
package/README.md CHANGED
@@ -1,11 +1,21 @@
1
1
  ## Kizen App Engine
2
2
 
3
- The core app engine for the Kizen developer platform for running plugin apps in web workers.
3
+ The runtime that powers plugin apps on the Kizen developer platform. It executes plugin JavaScript
4
+ inside sandboxed Web Workers and brokers everything that crosses the worker boundary — network
5
+ requests, rendered UI, modals, toasts, navigation, and file uploads.
6
+
7
+ **If you are writing a plugin,** you want the [plugin developer
8
+ documentation](https://kizen.github.io/app-engine/) (source under [`docs/`](docs/README.md)) and the
9
+ `@kizenapps/cli` app builder. The engine is what your plugin runs _on_ — you do not install it
10
+ yourself.
11
+
12
+ **If you are embedding the engine in a host application,** that is what the rest of this README
13
+ covers.
4
14
 
5
15
  ### Installation
6
16
 
7
17
  ```
8
- yarn add @kizenapps/engine
18
+ pnpm add @kizenapps/engine
9
19
  ```
10
20
 
11
21
  #### Usage With Vite
@@ -40,160 +50,137 @@ In order for translated strings to appear, you'll need to pass the app's transla
40
50
 
41
51
  ### Engine Usage
42
52
 
43
- Your app needs to be wrapped in the `AppEngineProvider`. This provider gives the internal components access to the worker runner, network requests, and other consumer-specific features, and adapts your application's common UI components like modals and toasts to a common API that plugins can use.
53
+ The engine has two halves:
54
+
55
+ - **Worker side** — the `this.*` API a plugin script calls. Fully documented in [`docs/`](docs/README.md); nothing to configure here.
56
+ - **Host side** — a React provider plus hooks, which is what you integrate.
57
+
58
+ The host side is deliberately unopinionated about your UI. You supply primitives — how to navigate,
59
+ how to show a toast, how to open a modal, how to make an authenticated request — and the engine
60
+ adapts them to the stable API that plugins are written against. That indirection is the point: a
61
+ plugin written once runs in any host that satisfies this contract.
44
62
 
45
63
  #### Context Provider
46
64
 
65
+ Wrap your application in `AppEngineProvider`.
66
+
67
+ **Required props**
68
+
69
+ | Prop | Type | Purpose |
70
+ | --------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
71
+ | `user` | `{ id, crm_client_id }` | The signed-in user. |
72
+ | `teamMember` | `{ id, full_name, first_name, last_name, email, phone, created }` | Team-member profile, exposed to plugins as `this.currentUser.profile`. |
73
+ | `business` | `{ id }` | The active business/tenant. |
74
+ | `appPath` | `string` | Your API base path. |
75
+ | `onNavigate` | `(path: string, options?: { replace?: boolean }) => void` | Hand off to your router. |
76
+ | `performRequest` | `(method, url, payload?, options?) => Promise<{ data } \| undefined>` | Your authenticated HTTP client. Every plugin `this.get/post/patch/delete` is routed through it. |
77
+ | `showToast` | `({ message, variant?, autohide? }) => void` | Your toast implementation. |
78
+ | `clearToasts` | `() => void` | Dismiss all toasts. |
79
+ | `monitoringExceptionHelper` | `(error: Error, extra: { extra }) => void` | Where uncaught plugin errors are reported. |
80
+ | `modal` | `{ showing, show, showPrompt, onConfirm, onHide }` | Your confirm/prompt modal primitives. |
81
+ | `children` | render prop | See the render-prop table below. |
82
+
83
+ **Optional props**
84
+
85
+ | Prop | Type | Notes |
86
+ | ---------------------- | -------------------------------------------------------------- | --------------------------------------------------------------- |
87
+ | `clientObject` | `{ id, objectName }` | Contextual record object, when there is one. |
88
+ | `bootstrapPlugins` | `{ id, api_name }[]` | Plugins to bootstrap on mount. Defaults to `[]`. |
89
+ | `userConfigs` | `{ config, api_name }[]` | Per-user plugin config. Defaults to `[]`. |
90
+ | `onCompleteSetup` | `(pluginApiName, payload, options?) => Promise<unknown>` | Persist a plugin's setup-assistant result. |
91
+ | `createFileId` | `() => string` | Required only if plugins upload files. |
92
+ | `performFileUpload` | `(args) => Promise<unknown>` | Required only if plugins upload files. |
93
+ | `getPendingCacheCount` | `(search: string) => number` | Lets the engine wait on your in-flight cache writes. |
94
+ | `invalidateCache` | `(category: 'timeline' \| 'entity', entityId: string) => void` | Called when a plugin mutates a record. |
95
+ | `hideFramesOnModal` | `boolean` | Hide floating frames while a modal is open. Defaults to `true`. |
96
+ | `t` | `(s: string) => string` | Translation function. Omit for English. |
97
+
98
+ **A minimal integration**
99
+
47
100
  ```tsx
48
101
  import { AppEngineProvider } from '@kizenapps/engine/react';
49
- import { useHistory } from 'react-router-dom';
50
- import PluginContext from 'contexts/Plugins';
51
- import { useTranslation } from 'react-i18next';
102
+ import { useNavigate } from 'react-router-dom';
103
+ import { useCallback } from 'react';
52
104
 
53
- const AppProvider = ({ user, teamMember, business, clientObject }) => {
54
- const history = useHistory();
105
+ const AppProvider = ({ user, teamMember, business, children }) => {
106
+ const navigate = useNavigate();
55
107
 
56
108
  const onNavigate = useCallback(
57
- (path: string, args?: { replace?: boolean }) => {
58
- if (args?.replace) {
59
- history.replace(path);
60
- } else {
61
- history.push(path);
62
- }
109
+ (path: string, options?: { replace?: boolean }) => {
110
+ navigate(path, { replace: Boolean(options?.replace) });
63
111
  },
64
- [history],
112
+ [navigate],
65
113
  );
66
114
 
67
- const [showToast, , clearToasts] = useToast();
68
-
69
- const [integrationModalProps, , integrationModalTriggerProps] = useModal({});
70
-
71
- const { onConfirm, show, onHide } = integrationModalProps;
72
- const { show: showPrompt, showing } = integrationModalTriggerProps;
73
-
74
- const { t } = useTranslation();
75
-
76
-
77
115
  return (
78
116
  <AppEngineProvider
79
117
  user={user}
80
118
  teamMember={teamMember}
81
119
  business={business}
82
- clientObject={clientObject}
120
+ appPath={API_BASE_PATH}
83
121
  onNavigate={onNavigate}
84
- monitoringExceptionHelper={onError}
85
- showToast={showToast}
86
- clearToasts={clearToasts}
87
- modal={{
88
- showing,
89
- show,
90
- onConfirm,
91
- onHide,
92
- showPrompt,
93
- }}
94
- performRequest={performKizenRequest}
95
- appPath={import.meta.env.VITE_API_BASE_PATH}
96
- bootstrapPlugins={pluginApps}
97
- performFileUpload={FileService.upload}
98
- getPendingCacheCount={getPendingCacheCount}
99
- invalidateCache={invalidateCache}
100
- t={t}
122
+ performRequest={myApiClient.request}
123
+ showToast={myToast.show}
124
+ clearToasts={myToast.clearAll}
125
+ monitoringExceptionHelper={reportError}
126
+ modal={myConfirmModal}
101
127
  >
102
- {({
103
- handleCreateRecordComplete,
104
- handleCreateRelatedRecordComplete,
105
- showCreateRecordModal,
106
- showCreateRelatedRecordModal,
107
- createRecordModalObjectId,
108
- createRelatedRecordModalObjectId,
109
- createRelatedRecordModalRelatedEntityId,
110
- showLoadingIndicator,
111
- hasFinishedBootstrapping,
112
- derivedModalState,
113
- showPluginModal,
114
- pluginApiName,
115
- ...rest
116
- }) => {
117
- return (
118
- <PluginContext.Provider
119
- value={{
120
- isFetched: hasFetchedBootstrap,
121
- isLoading,
122
- pluginNames,
123
- floatingFrames: isLoading ? [] : floatingFrames,
124
- routablePages,
125
- dataAdornments,
126
- calendarSources,
127
- refetch,
128
- fullRefetch,
129
- installedPluginAPINamesToIds,
130
- plugins: data,
131
- toolbarItems,
132
- toolbarItemsByFullId,
133
- routeScripts,
134
- automationSteps: isLoading ? [] : automationSteps,
135
- objectSettingsMenuItems,
136
- userConfigsByApiName,
137
- featureFlags,
138
- refetchFeatureFlags,
139
- featureFlagsLoading: !hasCalculatedFeatureFlags && !hasFinishedBootstrapping,
140
- businessPluginAppsByApiName,
141
- ...rest,
142
- }}
143
- >
144
- {showLoadingIndicator ? <StyledLoader loading /> : null}
145
- {children}
146
- {showPluginModal ? (
147
- <PluginModal modalState={derivedModalState} pluginApiName={pluginApiName} />
148
- ) : null}
149
- {showCreateRecordModal ? (
150
- <Suspense fallback={null}>
151
- <CreateRecordModal
152
- objectId={createRecordModalObjectId}
153
- onComplete={handleCreateRecordComplete}
154
- />
155
- </Suspense>
156
- ) : null}
157
- {showCreateRelatedRecordModal ? (
158
- <Suspense fallback={null}>
159
- <CreateRelatedRecordModal
160
- objectId={createRelatedRecordModalObjectId}
161
- relatedEntityId={createRelatedRecordModalRelatedEntityId}
162
- onComplete={handleCreateRelatedRecordComplete}
163
- />
164
- </Suspense>
165
- ) : null}
166
- </PluginContext.Provider>
167
- );
168
- }}
169
- </PluginEngineProvider>
128
+ {({ showLoadingIndicator, showPluginModal, pluginApiName, derivedModalState }) => (
129
+ <>
130
+ {showLoadingIndicator ? <YourSpinner /> : null}
131
+ {children}
132
+ {showPluginModal ? (
133
+ <YourPluginModal modalState={derivedModalState} pluginApiName={pluginApiName} />
134
+ ) : null}
135
+ </>
136
+ )}
137
+ </AppEngineProvider>
170
138
  );
171
139
  };
172
140
  ```
173
141
 
142
+ **The render prop**
143
+
144
+ The engine tells you _when_ to render something and _what_ to render it for; you supply the
145
+ component. Alongside the modal callbacks it passes:
146
+
147
+ | Key | Meaning |
148
+ | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
149
+ | `showLoadingIndicator` | A blocking plugin script is running. |
150
+ | `hasFinishedBootstrapping` | All bootstrapped plugins have loaded. |
151
+ | `waitingOnRouteScript` | A route script is still resolving. |
152
+ | `hiddenByModal` | Floating frames are hidden behind a modal. |
153
+ | `showPluginModal`, `pluginApiName`, `derivedModalState` | Render a plugin-owned modal. |
154
+ | `showCreateRecordModal`, `createRecordModalObjectId`, `handleCreateRecordComplete` | A plugin asked for a record-creation modal. Call the handler with the created record. |
155
+ | `showCreateRelatedRecordModal`, `createRelatedRecordModalObjectId`, `createRelatedRecordModalRelatedEntityId`, `handleCreateRelatedRecordComplete` | Same, for a related record. |
156
+ | `handleShowModal`, `handleShowCreateRecordModal`, `handleShowCreateRelatedRecordModal`, `closeCurrentModal` | Imperative modal controls. |
157
+
174
158
  #### Running Scripts
175
159
 
176
- ```tsx
177
- import { useGenericPluginCustomScript } from '@kizenapps/engine/react';
178
- import { useToast } from 'components/ToastProvider';
160
+ Hooks are provided for each surface a plugin script can run on. The generic one:
179
161
 
180
- const ScriptButton = ({ pluginScript }: { pluginScript: string }) => {
181
- const [showToast] = useToast();
162
+ ```tsx
163
+ import { useGenericAppCustomScript } from '@kizenapps/engine/react';
182
164
 
183
- const [executeInline, { pending: inlinePending }] = useGenericPluginCustomScript({
165
+ const ScriptButton = ({ plugin, pluginScript }) => {
166
+ const [executeInline, { pending }] = useGenericAppCustomScript({
167
+ plugin,
184
168
  onError: (e) => {
185
- showToast({
169
+ myToast.show({
186
170
  message: `Script could not be executed: ${e?.message}`,
187
171
  variant: 'failure',
188
172
  });
189
173
  },
190
- plugin: item,
191
174
  });
192
175
 
193
- return <button onClick={() => executeInline(pluginScript)} disabled={inlinePending} />;
176
+ return <button onClick={() => executeInline(pluginScript)} disabled={pending} />;
194
177
  };
195
178
  ```
196
179
 
180
+ Surface-specific equivalents are exported from `@kizenapps/engine/react` — `useAppPage`,
181
+ `useCustomBlock`, `useFloatingFrame`, `useRecordDetailCustomScript`,
182
+ `useCalendarSourceCustomScript`, and others.
183
+
197
184
  #### Worker Runner
198
185
 
199
186
  Some worker calls are coordinated using `@tanstack/react-query`. If your consumer app also uses react-query, the app engine will use your existing query provider. If you aren't already using react-query, the engine provider will be wrapped in its own query context and no additional action is needed.
@@ -275,3 +262,32 @@ if (context?.unsavedFilter) {
275
262
  applyUnsavedFilter(context.unsavedFilter);
276
263
  }
277
264
  ```
265
+
266
+ ### Development
267
+
268
+ This repo uses pnpm.
269
+
270
+ ```
271
+ pnpm install
272
+ pnpm build # extract translations, bundle with tsup, verify worker bundles
273
+ pnpm test # unit tests
274
+ pnpm typecheck
275
+ pnpm lint
276
+ pnpm format:check
277
+ ```
278
+
279
+ `pnpm build` finishes by running `scripts/check-worker-bundles.js`, which fails the build if a
280
+ worker bundle pulls in code that must never run inside a worker (`localStorage`, React, and
281
+ similar) or if the worker chunks exceed their size budget.
282
+
283
+ The plugin developer documentation lives in [`docs/`](docs/README.md) and publishes to GitHub Pages
284
+ on merge to `main`. Its static-site generator is a standalone project under `docs/site`, with its
285
+ own lockfile and tests.
286
+
287
+ ### License
288
+
289
+ Licensed under the GNU General Public License, version 3. See [LICENSE.md](LICENSE.md) for the full
290
+ text.
291
+
292
+ This matches the other published Kizen developer platform packages, `@kizenapps/cli` and
293
+ `@kizenapps/packager`. Note that the plugins themselves are licensed separately, under GPL 2.0.
@@ -1,5 +1,5 @@
1
- import { BaseWorkerContext } from './chunk-ZA5NLC5A.js';
2
- import { ACTIONS } from './chunk-5NF4DYQJ.js';
1
+ import { BaseWorkerContext } from './chunk-KOFWEAGS.js';
2
+ import { ACTIONS } from './chunk-SEYJTWOJ.js';
3
3
 
4
4
  // src/contexts/FloatingFrameWorkerContext.ts
5
5
  var FloatingFrameWorkerContext = class extends BaseWorkerContext {
@@ -57,5 +57,5 @@ var FloatingFrameWorkerContext = class extends BaseWorkerContext {
57
57
  };
58
58
 
59
59
  export { FloatingFrameWorkerContext };
60
- //# sourceMappingURL=chunk-JJ73EPHG.js.map
61
- //# sourceMappingURL=chunk-JJ73EPHG.js.map
60
+ //# sourceMappingURL=chunk-5YJW62FL.js.map
61
+ //# sourceMappingURL=chunk-5YJW62FL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/FloatingFrameWorkerContext.ts"],"names":[],"mappings":";;;;AAKO,IAAM,0BAAA,GAAN,cAAyC,iBAAA,CAAkB;AAAA,EAChE,YAAY,IAAA,EAAyB;AACnC,IAAA,KAAA,CAAM,IAAI,CAAA;AACV,IAAA,IAAA,CAAK,UAAA,GAAa,eAAA;AAAA,EACpB;AAAA,EAEO,IAAA,CAAK,MAAA,GAAqB,EAAC,EAAS;AACzC,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ,IAAA;AAAA,QAChB;AAAA,OACD;AAAA,KACH;AAAA,EACF;AAAA,EAEO,UAAA,GAAmB;AACxB,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ;AAAA,OACjB;AAAA,KACH;AAAA,EACF;AAAA,EAEO,UAAA,GAAmB;AACxB,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ;AAAA,OACjB;AAAA,KACH;AAAA,EACF;AAAA,EAEO,IAAA,CAAK,MAAA,GAAqB,EAAC,EAAS;AACzC,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ,IAAA;AAAA,QAChB;AAAA,OACD;AAAA,KACH;AAAA,EACF;AAAA,EAEO,MAAA,GAAe;AACpB,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ;AAAA,OACjB;AAAA,KACH;AAAA,EACF;AAAA,EAEO,QAAA,GAAiB;AACtB,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ;AAAA,OACjB;AAAA,KACH;AAAA,EACF;AAAA,EAEmB,UAAA,GAAmB;AACpC,IAAA,IAAA,CAAK,IAAA,EAAK;AAAA,EACZ;AACF","file":"chunk-JJ73EPHG.js","sourcesContent":["import { ACTIONS } from '../communication/constants.js';\nimport type { WorkerContextArgs } from '../types/contexts.js';\nimport type { HideConfig, ShowConfig } from '../types/floatingFrames.js';\nimport { BaseWorkerContext } from './BaseWorkerContext.js';\n\nexport class FloatingFrameWorkerContext extends BaseWorkerContext {\n constructor(args: WorkerContextArgs) {\n super(args);\n this.runnerType = 'floatingFrame';\n }\n\n public hide(config: HideConfig = {}): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.HIDE,\n config,\n }),\n );\n }\n\n public hideHeader(): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.HIDE_HEADER,\n }),\n );\n }\n\n public showHeader(): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.SHOW_HEADER,\n }),\n );\n }\n\n public show(config: ShowConfig = {}): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.SHOW,\n config,\n }),\n );\n }\n\n public expand(): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.EXPAND,\n }),\n );\n }\n\n public collapse(): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.COLLAPSE,\n }),\n );\n }\n\n protected override afterSetup(): void {\n this.show();\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/contexts/FloatingFrameWorkerContext.ts"],"names":[],"mappings":";;;;AAKO,IAAM,0BAAA,GAAN,cAAyC,iBAAA,CAAkB;AAAA,EAChE,YAAY,IAAA,EAAyB;AACnC,IAAA,KAAA,CAAM,IAAI,CAAA;AACV,IAAA,IAAA,CAAK,UAAA,GAAa,eAAA;AAAA,EACpB;AAAA,EAEO,IAAA,CAAK,MAAA,GAAqB,EAAC,EAAS;AACzC,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ,IAAA;AAAA,QAChB;AAAA,OACD;AAAA,KACH;AAAA,EACF;AAAA,EAEO,UAAA,GAAmB;AACxB,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ;AAAA,OACjB;AAAA,KACH;AAAA,EACF;AAAA,EAEO,UAAA,GAAmB;AACxB,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ;AAAA,OACjB;AAAA,KACH;AAAA,EACF;AAAA,EAEO,IAAA,CAAK,MAAA,GAAqB,EAAC,EAAS;AACzC,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ,IAAA;AAAA,QAChB;AAAA,OACD;AAAA,KACH;AAAA,EACF;AAAA,EAEO,MAAA,GAAe;AACpB,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ;AAAA,OACjB;AAAA,KACH;AAAA,EACF;AAAA,EAEO,QAAA,GAAiB;AACtB,IAAA,IAAA,CAAK,QAAA,CAAS,WAAA;AAAA,MACZ,KAAK,SAAA,CAAU;AAAA,QACb,QAAQ,OAAA,CAAQ;AAAA,OACjB;AAAA,KACH;AAAA,EACF;AAAA,EAEmB,UAAA,GAAmB;AACpC,IAAA,IAAA,CAAK,IAAA,EAAK;AAAA,EACZ;AACF","file":"chunk-5YJW62FL.js","sourcesContent":["import { ACTIONS } from '../communication/constants.js';\nimport type { WorkerContextArgs } from '../types/contexts.js';\nimport type { HideConfig, ShowConfig } from '../types/floatingFrames.js';\nimport { BaseWorkerContext } from './BaseWorkerContext.js';\n\nexport class FloatingFrameWorkerContext extends BaseWorkerContext {\n constructor(args: WorkerContextArgs) {\n super(args);\n this.runnerType = 'floatingFrame';\n }\n\n public hide(config: HideConfig = {}): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.HIDE,\n config,\n }),\n );\n }\n\n public hideHeader(): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.HIDE_HEADER,\n }),\n );\n }\n\n public showHeader(): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.SHOW_HEADER,\n }),\n );\n }\n\n public show(config: ShowConfig = {}): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.SHOW,\n config,\n }),\n );\n }\n\n public expand(): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.EXPAND,\n }),\n );\n }\n\n public collapse(): void {\n this.instance.postMessage(\n JSON.stringify({\n action: ACTIONS.COLLAPSE,\n }),\n );\n }\n\n protected override afterSetup(): void {\n this.show();\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { getPartialLocation, generateUUIDV4 } from './chunk-RVMKI3GK.js';
2
- import { getAllNestedInputsFromConfig, buildIframeURLWithProxy, getParentFrameAllowParam, deserializeConsoleArg, KizenRequestError, filterSandboxList, filterAllowList } from './chunk-4DK3CMXY.js';
3
- import { IFRAME_PREFIX, ACTIONS, RESPONSES, COMMUNICATIONS, thirdPartyGlobalNames, getScriptIntegrationType, thirdPartySetupScripts, thirdPartyReadyPredicates } from './chunk-5NF4DYQJ.js';
1
+ import { getPartialLocation, generateUUIDV4 } from './chunk-LGZ3YO4Y.js';
2
+ import { getAllNestedInputsFromConfig, buildIframeURLWithProxy, getParentFrameAllowParam, deserializeConsoleArg, KizenRequestError, filterSandboxList, filterAllowList } from './chunk-TVIBQ23X.js';
3
+ import { IFRAME_PREFIX, ACTIONS, RESPONSES, COMMUNICATIONS, thirdPartyGlobalNames, getScriptIntegrationType, thirdPartySetupScripts, thirdPartyReadyPredicates } from './chunk-SEYJTWOJ.js';
4
4
  import { __commonJS, __toESM } from './chunk-5WRI5ZAA.js';
5
5
  import DOMPurify from 'dompurify';
6
6
 
@@ -2816,8 +2816,8 @@ var modalSize = {
2816
2816
  };
2817
2817
 
2818
2818
  // src/index.ts
2819
- var version = "1.9.1-83a6c38";
2819
+ var version = "1.9.2-606b66e";
2820
2820
 
2821
2821
  export { clearNavigationContext, consumeNavigationContext, forceQualifiedUrl, getDisabledValue, getEnabledState, getHash, getLinkValue, getPluginSafeHTML, getQrCodeValue, getStableHash, isFlagEnabled, mergeConfig, modalSize, pluginMapper, readNavigationContext, reduceEnabledResults, replaceConfigValues, runExpression, runObjectExpression, runOptionExpression, runScript, runStringExpression, version };
2822
- //# sourceMappingURL=chunk-TP7GSF2G.js.map
2823
- //# sourceMappingURL=chunk-TP7GSF2G.js.map
2822
+ //# sourceMappingURL=chunk-ATHQU7SK.js.map
2823
+ //# sourceMappingURL=chunk-ATHQU7SK.js.map