@plitzi/sdk-shared 0.33.2 → 0.34.1

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 (204) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/actions/cron.d.ts +34 -0
  3. package/dist/actions/cron.mjs +72 -0
  4. package/dist/actions/index.d.ts +6 -0
  5. package/dist/actions/index.mjs +5 -0
  6. package/dist/actions/triggerParams.d.ts +41 -0
  7. package/dist/actions/triggerParams.mjs +40 -0
  8. package/dist/actions/triggers.d.ts +29 -0
  9. package/dist/actions/triggers.mjs +4 -0
  10. package/dist/actions/validateDocument.d.ts +23 -0
  11. package/dist/actions/validateDocument.mjs +267 -0
  12. package/dist/auth/failureChannel.d.ts +9 -4
  13. package/dist/auth/failureChannel.mjs +3 -2
  14. package/dist/authoring/builder.d.ts +51 -0
  15. package/dist/authoring/builder.mjs +29 -0
  16. package/dist/authoring/declare.d.ts +64 -0
  17. package/dist/authoring/declare.mjs +4 -0
  18. package/dist/authoring/elementCallbacks.d.ts +13 -0
  19. package/dist/authoring/elementCallbacks.mjs +71 -0
  20. package/dist/authoring/index.d.ts +21 -0
  21. package/dist/authoring/index.mjs +6 -0
  22. package/dist/authoring/paramSpec.d.ts +51 -0
  23. package/dist/authoring/paramSpec.mjs +40 -0
  24. package/dist/authoring/spaceCallbacks.d.ts +10 -0
  25. package/dist/authoring/spaceCallbacks.mjs +51 -0
  26. package/dist/builder/contexts/BuilderContext.d.ts +2 -4
  27. package/dist/dataSource/getBindingsDetails.mjs +1 -1
  28. package/dist/dataSource/helpers/getSourceName.d.ts +1 -3
  29. package/dist/dataSource/helpers/getSourceName.mjs +1 -1
  30. package/dist/dataSource/index.d.ts +2 -0
  31. package/dist/dataSource/index.mjs +6 -5
  32. package/dist/dataSource/resolveVariables.d.ts +22 -0
  33. package/dist/dataSource/resolveVariables.mjs +16 -0
  34. package/dist/dataSource/utility/index.mjs +15 -13
  35. package/dist/dataSource/utility/not.d.ts +11 -0
  36. package/dist/dataSource/utility/not.mjs +15 -0
  37. package/dist/devTools/debugCookie.d.ts +16 -0
  38. package/dist/devTools/debugCookie.mjs +7 -0
  39. package/dist/devTools/index.d.ts +6 -2
  40. package/dist/devTools/index.mjs +4 -2
  41. package/dist/devTools/interactionLog.d.ts +14 -0
  42. package/dist/devTools/interactionLog.mjs +4 -0
  43. package/dist/helpers/index.d.ts +2 -0
  44. package/dist/helpers/index.mjs +11 -9
  45. package/dist/helpers/reducerOrigin.d.ts +15 -0
  46. package/dist/helpers/reducerOrigin.mjs +4 -0
  47. package/dist/helpers/ruleEvaluator.d.ts +14 -0
  48. package/dist/helpers/ruleEvaluator.mjs +5 -0
  49. package/dist/helpers/twigWrapper/AST.d.ts +12 -1
  50. package/dist/helpers/twigWrapper/AST.mjs +0 -0
  51. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +7 -0
  52. package/dist/helpers/twigWrapper/Parser/Cursor.d.ts +7 -0
  53. package/dist/helpers/twigWrapper/Parser/Cursor.mjs +5 -0
  54. package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +46 -8
  55. package/dist/helpers/twigWrapper/Parser/types.mjs +0 -0
  56. package/dist/helpers/twigWrapper/charClass.d.ts +7 -0
  57. package/dist/helpers/twigWrapper/charClass.mjs +16 -12
  58. package/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs +2 -2
  59. package/dist/helpers/utils.d.ts +0 -2
  60. package/dist/helpers/utils.mjs +16 -19
  61. package/dist/hooks/index.d.ts +2 -1
  62. package/dist/hooks/index.mjs +4 -3
  63. package/dist/hooks/useFontHead.d.ts +3 -0
  64. package/dist/hooks/useFontHead.mjs +23 -0
  65. package/dist/hooks/usePlitziServiceContext.d.ts +3 -2
  66. package/dist/index.mjs +61 -45
  67. package/dist/navigation/index.d.ts +1 -1
  68. package/dist/navigation/index.mjs +2 -2
  69. package/dist/navigation/routes.d.ts +8 -0
  70. package/dist/navigation/routes.mjs +39 -39
  71. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +0 -1
  72. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +0 -1
  73. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +0 -1
  74. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +0 -1
  75. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +0 -1
  76. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +0 -1
  77. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +0 -1
  78. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.d.ts +3 -0
  79. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.mjs +9 -0
  80. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +0 -1
  81. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs +0 -1
  82. package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +0 -1
  83. package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.mjs +0 -1
  84. package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +0 -1
  85. package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +0 -1
  86. package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +0 -1
  87. package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.d.ts +5 -0
  88. package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.mjs +9 -0
  89. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +0 -1
  90. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs +0 -1
  91. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +0 -1
  92. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +0 -1
  93. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.d.ts +8 -0
  94. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.mjs +16 -0
  95. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.d.ts +4 -0
  96. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.mjs +16 -0
  97. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.d.ts +4 -0
  98. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +14 -0
  99. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.d.ts +4 -0
  100. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.mjs +16 -0
  101. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +2 -3
  102. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +0 -1
  103. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.d.ts +2 -0
  104. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.mjs +11 -0
  105. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.d.ts +2 -0
  106. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.mjs +11 -0
  107. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.d.ts +2 -0
  108. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.mjs +11 -0
  109. package/dist/network/graphql/builder/Mutations/index.d.ts +24 -0
  110. package/dist/network/graphql/builder/Mutations/index.mjs +150 -132
  111. package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -2
  112. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +0 -1
  113. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +0 -1
  114. package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.d.ts +9 -0
  115. package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.mjs +30 -0
  116. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.d.ts +6 -0
  117. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +16 -0
  118. package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.d.ts +9 -0
  119. package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.mjs +25 -0
  120. package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.d.ts +6 -0
  121. package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.mjs +17 -0
  122. package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.d.ts +30 -0
  123. package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.mjs +40 -0
  124. package/dist/network/graphql/builder/Queries/index.d.ts +16 -0
  125. package/dist/network/graphql/builder/Queries/index.mjs +24 -14
  126. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +4 -0
  127. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +5 -2
  128. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +0 -1
  129. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +0 -1
  130. package/dist/network/spaceEvents.d.ts +20 -1
  131. package/dist/network/spaceEvents.mjs +89 -74
  132. package/dist/schema/index.d.ts +1 -0
  133. package/dist/schema/index.mjs +2 -1
  134. package/dist/schema/serverElements.d.ts +16 -0
  135. package/dist/schema/serverElements.mjs +18 -0
  136. package/dist/server/actions/useActionsSync.d.ts +10 -0
  137. package/dist/server/actions/useActionsSync.mjs +7 -0
  138. package/dist/server/index.d.ts +2 -1
  139. package/dist/server/index.mjs +5 -4
  140. package/dist/server/rsc/refreshRsc.d.ts +11 -1
  141. package/dist/server/rsc/refreshRsc.mjs +30 -12
  142. package/dist/server/rsc/useRscSync.mjs +20 -13
  143. package/dist/state/runtimeStatePersist.mjs +4 -3
  144. package/dist/store/actionRuns/actionRunsRecorder.d.ts +36 -0
  145. package/dist/store/actionRuns/actionRunsRecorder.mjs +39 -0
  146. package/dist/store/actionRuns/actionRunsStore.d.ts +16 -0
  147. package/dist/store/actionRuns/actionRunsStore.mjs +5 -0
  148. package/dist/store/actionRuns/index.d.ts +6 -0
  149. package/dist/store/actionRuns/index.mjs +4 -0
  150. package/dist/store/actionRuns/useActionRuns.d.ts +13 -0
  151. package/dist/store/actionRuns/useActionRuns.mjs +10 -0
  152. package/dist/store/index.d.ts +46 -45
  153. package/dist/store/index.mjs +6 -3
  154. package/dist/store/renderSettings.d.ts +3 -0
  155. package/dist/store/renderSettings.mjs +17 -5
  156. package/dist/store/tracing/tracingCollector.d.ts +1 -1
  157. package/dist/store/tracing/tracingCollector.mjs +37 -35
  158. package/dist/store/tracing/tracingStore.d.ts +13 -0
  159. package/dist/store/tracing/tracingStore.mjs +3 -3
  160. package/dist/style/fontAssets.d.ts +12 -0
  161. package/dist/style/fontAssets.mjs +18 -0
  162. package/dist/style/fontValidation.d.ts +8 -0
  163. package/dist/style/fontValidation.mjs +107 -0
  164. package/dist/style/fonts.d.ts +74 -0
  165. package/dist/style/fonts.mjs +198 -0
  166. package/dist/style/fontsFromCss.d.ts +27 -0
  167. package/dist/style/fontsFromCss.mjs +43 -0
  168. package/dist/style/index.d.ts +4 -0
  169. package/dist/style/index.mjs +5 -1
  170. package/dist/style/styleConstants.d.ts +2 -2
  171. package/dist/style/styleConstants.mjs +1 -0
  172. package/dist/theme/ThemeProvider.d.ts +36 -6
  173. package/dist/theme/ThemeProvider.mjs +49 -35
  174. package/dist/theme/ThemeScope.d.ts +16 -0
  175. package/dist/theme/ThemeScope.mjs +6 -0
  176. package/dist/theme/index.d.ts +7 -1
  177. package/dist/theme/index.mjs +6 -2
  178. package/dist/theme/themeCookie.d.ts +30 -0
  179. package/dist/theme/themeCookie.mjs +24 -0
  180. package/dist/theme/themeStore.d.ts +40 -0
  181. package/dist/theme/themeStore.mjs +17 -0
  182. package/dist/theme/useTheme.d.ts +29 -0
  183. package/dist/theme/useTheme.mjs +20 -0
  184. package/dist/types/ActionTypes.d.ts +396 -0
  185. package/dist/types/ActionTypes.mjs +0 -0
  186. package/dist/types/AuthTypes.d.ts +23 -2
  187. package/dist/types/BuilderTypes.d.ts +0 -12
  188. package/dist/types/CommonTypes.d.ts +13 -0
  189. package/dist/types/DevToolsTypes.d.ts +57 -14
  190. package/dist/types/EventBridgeTypes.d.ts +1 -1
  191. package/dist/types/InteractionTypes.d.ts +23 -3
  192. package/dist/types/PluginTypes.d.ts +0 -3
  193. package/dist/types/SchemaTypes.d.ts +29 -4
  194. package/dist/types/ServerTypes.d.ts +390 -46
  195. package/dist/types/SpaceTypes.d.ts +16 -0
  196. package/dist/types/StoreTypes.d.ts +181 -3
  197. package/dist/types/StyleTypes.d.ts +83 -4
  198. package/dist/types/TemplateTypes.d.ts +20 -0
  199. package/dist/types/TemplateTypes.mjs +0 -0
  200. package/dist/types/ThemeTypes.d.ts +28 -1
  201. package/dist/types/index.d.ts +2 -0
  202. package/eslint.config.mjs +2 -0
  203. package/package.json +244 -29
  204. package/vite.config.ts +27 -7
@@ -0,0 +1,51 @@
1
+ import { ParamSpec } from './paramSpec';
2
+ import { InteractionCallback, InteractionCallbackContext, InteractionCallbackParam, InteractionCallbackPreviews, InteractionCallbackType } from '../types';
3
+ export declare const toBuilderParams: (spec: ParamSpec) => Record<string, InteractionCallbackParam>;
4
+ /** What a declared action carries, whichever kind of action it is. */
5
+ export interface BuiltinActionSpec {
6
+ title: string;
7
+ /**
8
+ * What KIND of node this action produces, which is also how the runtime resolves it: a `globalCallback` is
9
+ * looked up under its source module, a `callback` under an element's id, a `utility` under nothing at all.
10
+ * A global callback is the common case and the default.
11
+ */
12
+ type?: InteractionCallbackType;
13
+ /** When true the param set is CLOSED: a key not listed is a mistake, dropped on apply and warned in validation. */
14
+ strictParams: boolean;
15
+ params: ParamSpec;
16
+ /** The shape of what the step puts in the flow scope, so a later step can be written against it. */
17
+ preview?: InteractionCallbackPreviews;
18
+ }
19
+ /**
20
+ * What a source declares about a `globalCallback` of its own.
21
+ *
22
+ * The `source` is the registration id the runtime looks the callback up under — the value a node's `elementId`
23
+ * must carry. A global callback registers under a fixed module id (`space`, `state`, `navigation`, `auth`,
24
+ * `actions`) and NOT under the element hosting the flow: the runtime resolves one as
25
+ * `callbacksAvailables[elementId][action]`, so a node that stored the host element's id would resolve to
26
+ * nothing and the flow would silently do nothing.
27
+ *
28
+ * Here rather than with the catalog that gathers them (`@plitzi/sdk-authoring`) because a source declares its own
29
+ * and must not depend on the package that reads all five.
30
+ */
31
+ export interface BuiltinGlobalCallback extends BuiltinActionSpec {
32
+ source: string;
33
+ }
34
+ /**
35
+ * A declared action, ready for `useInteractions` — everything but the function that runs it, which is the only
36
+ * part a source has to write.
37
+ */
38
+ export declare const toInteractionCallback: <T extends Record<string, unknown> = Record<string, unknown>>(action: string, spec: BuiltinActionSpec, callback: InteractionCallback<T>["callback"], overrides?: Partial<InteractionCallback<T>>) => InteractionCallback<T>;
39
+ /**
40
+ * Every declared action of one source, ready for `useInteractions`.
41
+ *
42
+ * The reason to build the whole map rather than call {@link toInteractionCallback} per entry: the key a callback is
43
+ * registered under IS the name a document names it by, and writing that key by hand beside a catalog that also
44
+ * names it is two strings that have to agree with nothing checking. They stopped agreeing for all three of the auth
45
+ * callbacks — declared `authLogin`, registered `login` — and the only symptom was a sign-in button that did
46
+ * nothing at all.
47
+ *
48
+ * Here the key comes from the catalog, and `handlers` is checked against the same keys, so a renamed action is a
49
+ * compile error and an unimplemented one cannot be registered.
50
+ */
51
+ export declare const toInteractionCallbacks: <C extends Record<string, BuiltinActionSpec>>(catalog: C, handlers: { [K in keyof C]: (params: never, context?: InteractionCallbackContext) => unknown; }, overrides?: { [K in keyof C]?: Partial<InteractionCallback>; }) => Record<string, InteractionCallback>;
@@ -0,0 +1,29 @@
1
+ //#region src/authoring/builder.ts
2
+ var e = {
3
+ text: "text",
4
+ textarea: "textarea",
5
+ select: "select",
6
+ boolean: "boolean",
7
+ number: "text",
8
+ scalar: "text"
9
+ }, t = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[-_\s]+/).map((e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" "), n = (n, r) => ({
10
+ type: r.builderType ?? e[r.type],
11
+ label: r.label ?? t(n),
12
+ ...r.default === void 0 ? {} : { defaultValue: r.default },
13
+ ...r.options ? { options: r.options.map((e) => ({
14
+ value: e,
15
+ label: r.optionLabels?.[e] ?? t(e)
16
+ })) } : {},
17
+ ...r.when ? { when: r.when } : {},
18
+ ...r.canBind === void 0 ? {} : { canBind: r.canBind }
19
+ }), r = (e) => Object.fromEntries(Object.entries(e).map(([e, t]) => [e, n(e, t)])), i = (e, t, n, i = {}) => ({
20
+ action: e,
21
+ title: t.title,
22
+ type: t.type ?? "globalCallback",
23
+ callback: n,
24
+ preview: t.preview ?? {},
25
+ params: r(t.params),
26
+ ...i
27
+ }), a = (e, t, n = {}) => Object.fromEntries(Object.keys(e).map((r) => [r, i(r, e[r], t[r], n[r] ?? {})]));
28
+ //#endregion
29
+ export { r as toBuilderParams, i as toInteractionCallback, a as toInteractionCallbacks };
@@ -0,0 +1,64 @@
1
+ /**
2
+ * How an element says what it can be authored with.
3
+ *
4
+ * A declaration is data — `type`, default attributes, the metadata the builder shows — and the one thing it could
5
+ * not say until now is what those attributes *are*: `subType: 'h1'` in a default says `string`, not the six
6
+ * headings that exist. That type is already written and already maintained, on the element's own component, so
7
+ * this carries it rather than restating it: `elementDeclaration<HeadingAttributes>()({ … })` brands the
8
+ * declaration with the attributes it accepts, and every factory downstream reads them off the catalogue.
9
+ *
10
+ * A type-level brand rather than a field, because there is nothing to attach at runtime: a declaration is
11
+ * serialized into documents and manifests, and a marker with a value would travel with it. Nothing ever reads
12
+ * `__attributes` — it exists so `AttributesOf` has somewhere to look.
13
+ */
14
+ export interface ElementAttributesBrand<A> {
15
+ readonly __attributes: A;
16
+ }
17
+ /** What every declaration is, whatever else it carries. */
18
+ export interface ElementDeclarationData {
19
+ type: string;
20
+ /**
21
+ * The kind of data source this element publishes, when it publishes one.
22
+ *
23
+ * A source is named `<sourceType>_<id>`, and the two halves come from different places: the id is the
24
+ * author's, and this is the ELEMENT'S. They are not always the same word — a `form` publishes under
25
+ * `apiContainer`, because what it offers descendants is a record like any other provider's — so an author who
26
+ * assembles the name from the type they can see writes one that resolves to nothing.
27
+ *
28
+ * Declared here so there is one answer: the component reads it to register under, and the authoring surface
29
+ * reads it to resolve a binding that named the element alone.
30
+ */
31
+ sourceType?: string;
32
+ content?: {
33
+ attributes?: Record<string, unknown>;
34
+ definition?: {
35
+ label?: string;
36
+ };
37
+ };
38
+ }
39
+ /**
40
+ * The attributes a declaration accepts, defaulting to "anything" for one that never said.
41
+ *
42
+ * That default is the plugin case rather than an oversight: a type that arrives from a manifest at runtime has no
43
+ * TypeScript to offer, and refusing to author it would be worse than authoring it loosely.
44
+ */
45
+ export type AttributesOf<D> = D extends ElementAttributesBrand<infer A> ? A : Record<string, unknown>;
46
+ type AuthorableProps<Props, Injected extends keyof Props> = Omit<Props, 'ref' | 'className' | 'children' | Injected>;
47
+ /**
48
+ * The authorable half of an element's props.
49
+ *
50
+ * `ref`, `className` and `children` are the element machinery's, not the author's — the first two are how a
51
+ * rendered element receives what the document already decided, and children are a tree, declared as one. Anything
52
+ * else a component is handed and the author does not choose (a form control's `value` and change handler, arriving
53
+ * from the form around it) is named per element, where the reason is visible.
54
+ *
55
+ * Everything comes out optional: an attribute left out is the declaration's default, which is the whole point of a
56
+ * declaration having them.
57
+ *
58
+ * A component with nothing authorable comes out `unknown`, not `{}`. A factory's props are these attributes
59
+ * intersected with the authoring fields, and `unknown` is what adds nothing to that intersection — while `{}` means
60
+ * "any value that is not null" everywhere else it could land.
61
+ */
62
+ export type AuthorableAttributes<Props, Injected extends keyof Props = never> = keyof AuthorableProps<Props, Injected> extends never ? unknown : Partial<AuthorableProps<Props, Injected>>;
63
+ export declare const elementDeclaration: <A>() => <const D extends ElementDeclarationData>(declaration: D) => D & ElementAttributesBrand<A>;
64
+ export {};
@@ -0,0 +1,4 @@
1
+ //#region src/authoring/declare.ts
2
+ var e = () => (e) => e;
3
+ //#endregion
4
+ export { e as elementDeclaration };
@@ -0,0 +1,13 @@
1
+ import { BuiltinActionSpec } from './builder';
2
+ export type BuiltinElementCallback = BuiltinActionSpec;
3
+ export declare const BUILTIN_ELEMENT_CALLBACKS: Record<string, BuiltinElementCallback>;
4
+ /** The built-in element callback for an action, or undefined when the action is not a known built-in (an
5
+ * element-type-specific/plugin callback whose schema is not knowable here). */
6
+ export declare const getElementCallback: (action: string) => BuiltinElementCallback | undefined;
7
+ /** Reconcile a `callback` action against the element-callback catalog: unknown keys dropped for a closed callback,
8
+ * then missing defaults filled (category:"attribute", revertOnFinish:false). An unknown action yields unchanged
9
+ * params, so a plugin/element-specific callback keeps whatever the agent passed. */
10
+ export declare const applyElementCallback: (action: string, params: Record<string, unknown>) => {
11
+ known: boolean;
12
+ params: Record<string, unknown>;
13
+ };
@@ -0,0 +1,71 @@
1
+ import { reconcileParams as e } from "./paramSpec.mjs";
2
+ //#region src/authoring/elementCallbacks.ts
3
+ var t = {
4
+ setState: {
5
+ title: "Update Element (set attribute / state)",
6
+ type: "callback",
7
+ strictParams: !0,
8
+ params: {
9
+ category: {
10
+ type: "select",
11
+ description: "What to change on the element: \"attribute\" sets one of its props (the common case — e.g. content, disabled); \"state\" sets element state (visibility or a style selector). REQUIRED — always set it.",
12
+ default: "attribute",
13
+ options: ["attribute", "state"],
14
+ required: !0
15
+ },
16
+ key: {
17
+ type: "text",
18
+ description: "The field to set. When category=\"attribute\", an attribute/prop key of THIS element (e.g. \"content\", \"disabled\"). When category=\"state\", \"visibility\" or \"styleSelectors.<selector>\". REQUIRED.",
19
+ required: !0
20
+ },
21
+ value: {
22
+ type: "scalar",
23
+ description: "The value to set — its type follows the target attribute: a real boolean (true/false) for a boolean attribute, a number for a numeric one, otherwise a string (the strings \"true\"/\"false\" also coerce). There is NO separate `type` param (that belongs to the global state setState, not this one). REQUIRED.",
24
+ when: (e) => !!e.category,
25
+ required: !0
26
+ },
27
+ revertOnFinish: {
28
+ type: "boolean",
29
+ description: "When true, this change is UNDONE automatically when the whole flow finishes. Use it for a TEMPORARY change (a \"loading…\" label, disabling a button while it works) instead of adding manual restore steps at the end of the flow.",
30
+ default: !1,
31
+ label: "Revert changes after interaction"
32
+ }
33
+ }
34
+ },
35
+ toggleState: {
36
+ title: "Toggle Element (flip attribute / state)",
37
+ type: "callback",
38
+ strictParams: !0,
39
+ params: {
40
+ category: {
41
+ type: "select",
42
+ description: "What to flip on the element: \"attribute\" flips one of its props (e.g. disabled); \"state\" flips element state (\"visibility\", or \"styleSelectors.<selector>\" for an expanded/collapsed look). REQUIRED.",
43
+ default: "state",
44
+ options: ["attribute", "state"],
45
+ required: !0
46
+ },
47
+ key: {
48
+ type: "text",
49
+ description: "The field to flip. When category=\"attribute\", an attribute/prop key of THIS element. When category=\"state\", \"visibility\" or \"styleSelectors.<selector>\". Anything not already true counts as false, so a field that has never been set flips ON first. REQUIRED.",
50
+ required: !0
51
+ },
52
+ revertOnFinish: {
53
+ type: "boolean",
54
+ description: "When true, the flip is UNDONE automatically when the whole flow finishes — a change that lasts only as long as the flow does.",
55
+ default: !1,
56
+ label: "Revert changes after interaction"
57
+ }
58
+ }
59
+ }
60
+ }, n = (e) => Object.hasOwn(t, e) ? t[e] : void 0, r = (t, r) => {
61
+ let i = n(t);
62
+ return i ? {
63
+ known: !0,
64
+ params: e(r, i.params, i.strictParams)
65
+ } : {
66
+ known: !1,
67
+ params: r
68
+ };
69
+ };
70
+ //#endregion
71
+ export { t as BUILTIN_ELEMENT_CALLBACKS, r as applyElementCallback, n as getElementCallback };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The authoring vocabulary a RUNTIME reads — the only part of authoring that is not in `@plitzi/sdk-authoring`.
3
+ *
4
+ * Everything else about authoring lives in that package, and this is here for one reason: each of these is read
5
+ * while a page renders, in a browser. An element declares itself with `elementDeclaration` (39 declaration files
6
+ * do), a source turns its declarations into the controls the builder draws with `toInteractionCallback`, and
7
+ * `getInteractions` reads the callbacks every element registers. If they lived with the rest of the authoring
8
+ * surface, `@plitzi/sdk-elements` and `@plitzi/sdk-interactions` would have to depend on the package that already
9
+ * depends on them — a cycle the build refuses.
10
+ *
11
+ * So they sit in the package everything already depends on, gathered in one folder rather than scattered through
12
+ * this one, and `@plitzi/sdk-authoring` re-exports every name below: an author still writes one import and never
13
+ * learns this boundary exists. What decides whether something belongs here is not what it is ABOUT but who reads
14
+ * it — a catalog nobody but an author reads (the CSS vocabulary, the element factories, the binding transformers)
15
+ * belongs over there, whatever it describes.
16
+ */
17
+ export * from './builder';
18
+ export * from './declare';
19
+ export * from './elementCallbacks';
20
+ export * from './paramSpec';
21
+ export * from './spaceCallbacks';
@@ -0,0 +1,6 @@
1
+ import { toBuilderParams as e, toInteractionCallback as t, toInteractionCallbacks as n } from "./builder.mjs";
2
+ import { elementDeclaration as r } from "./declare.mjs";
3
+ import { hiddenParams as i, invalidParams as a, missingRequiredParams as o, reconcileParams as s } from "./paramSpec.mjs";
4
+ import { BUILTIN_ELEMENT_CALLBACKS as c, applyElementCallback as l, getElementCallback as u } from "./elementCallbacks.mjs";
5
+ import { spaceCallbacks as d } from "./spaceCallbacks.mjs";
6
+ export { c as BUILTIN_ELEMENT_CALLBACKS, l as applyElementCallback, r as elementDeclaration, u as getElementCallback, i as hiddenParams, a as invalidParams, o as missingRequiredParams, s as reconcileParams, d as spaceCallbacks, e as toBuilderParams, t as toInteractionCallback, n as toInteractionCallbacks };
@@ -0,0 +1,51 @@
1
+ import { InteractionParamType } from '../types';
2
+ export type BuiltinParamType = 'text' | 'textarea' | 'select' | 'boolean' | 'number' | 'scalar';
3
+ export interface BuiltinParam {
4
+ type: BuiltinParamType;
5
+ description: string;
6
+ default?: string | number | boolean;
7
+ options?: string[];
8
+ when?: (params: Record<string, unknown>) => boolean;
9
+ required?: boolean;
10
+ /** Overrides the label derived from the param name (`autoDismiss` → "Auto Dismiss"). */
11
+ label?: string;
12
+ /** Overrides the label derived from an option value (`top-right` → "Top Right"). */
13
+ optionLabels?: Record<string, string>;
14
+ /**
15
+ * The control the editor shows, when it is not the obvious one for `type` — including the case where it depends
16
+ * on what the author has already filled in (a value whose control follows the type they picked above it).
17
+ */
18
+ builderType?: InteractionParamType | ((params: Record<string, unknown>) => InteractionParamType);
19
+ /** Whether the editor offers to bind this param to a data source. Bindable unless a param says otherwise. */
20
+ canBind?: boolean;
21
+ }
22
+ export type ParamSpec = Record<string, BuiltinParam>;
23
+ /** Declared params the agent supplied that end up HIDDEN because their own `when` guard is false against the
24
+ * effective params — they are silently ignored (e.g. a global setState `value` with no `type`, or an
25
+ * addNotification `autoDismissTimeout` with autoDismiss:false). Evaluated against the effective params so a param
26
+ * the default fills in (e.g. category:"attribute") does not false-report a value as hidden. */
27
+ export declare const hiddenParams: (provided: Record<string, unknown>, effective: Record<string, unknown>, spec: ParamSpec) => string[];
28
+ /** Declared params marked `required` that the agent did NOT supply, and whose `when` guard holds against the
29
+ * effective params (so they are actually in play). Evaluated against the effective params so a required param
30
+ * gated by a companion (e.g. setState `value`, shown only once `category` is set) is not reported when its guard
31
+ * is not met. */
32
+ export declare const missingRequiredParams: (provided: Record<string, unknown>, effective: Record<string, unknown>, spec: ParamSpec) => string[];
33
+ /** A param the agent supplied whose VALUE does not match its declared type — a boolean given as the string "true",
34
+ * a number given as a string, a `select` value outside its options, a null placeholder left behind. `expected` is
35
+ * the declared type, `got` the JS typeof (or "null"), and `options` the allowed values for a `select`. */
36
+ export interface InvalidParam {
37
+ key: string;
38
+ expected: BuiltinParamType;
39
+ got: string;
40
+ options?: string[];
41
+ }
42
+ /** Declared params the agent supplied whose value is the WRONG type for the catalog — the check that catches a
43
+ * malformed node the unknown/missing/hidden checks miss (a boolean stored as a string, a select value not in its
44
+ * options, a leftover `null`). Only params actually in play are checked: undefined values (the param is absent) and
45
+ * params hidden by their own `when` guard against the effective params are skipped, so this never fires on a param
46
+ * that is not really used. Callers gate this to CLOSED (strict) catalogs, whose types we own authoritatively. */
47
+ export declare const invalidParams: (provided: Record<string, unknown>, effective: Record<string, unknown>, spec: ParamSpec) => InvalidParam[];
48
+ /** Reconcile supplied params to a catalog schema: drop unknown keys when the set is CLOSED (strict), then fill the
49
+ * builder's defaults for any declared param the agent omitted whose `when` guard holds. Mirrors what the builder
50
+ * stores, so the persisted node round-trips cleanly. */
51
+ export declare const reconcileParams: (params: Record<string, unknown>, spec: ParamSpec, strict: boolean) => Record<string, unknown>;
@@ -0,0 +1,40 @@
1
+ import { hasValidToken as e } from "../helpers/twigWrapper/tokens/hasValidToken.mjs";
2
+ //#region src/authoring/paramSpec.ts
3
+ var t = (e, t, n) => {
4
+ let r = [];
5
+ for (let [i, a] of Object.entries(n)) a.when && e[i] !== void 0 && !a.when(t) && r.push(i);
6
+ return r;
7
+ }, n = (e, t, n) => {
8
+ let r = [];
9
+ for (let [i, a] of Object.entries(n)) a.required && e[i] === void 0 && (!a.when || a.when(t)) && r.push(i);
10
+ return r;
11
+ }, r = (e) => e.trim() !== "" && Number.isFinite(Number(e)), i = (t) => typeof t == "string" && e(t), a = (e, t) => {
12
+ switch (t.type) {
13
+ case "boolean": return typeof e == "boolean";
14
+ case "number": return typeof e == "number" || typeof e == "string" && r(e);
15
+ case "select": return typeof e == "string" && (!t.options || t.options.includes(e));
16
+ case "scalar": return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
17
+ case "text":
18
+ case "textarea": return typeof e == "string";
19
+ default: return !0;
20
+ }
21
+ }, o = (e, t, n) => {
22
+ let r = [];
23
+ for (let [o, s] of Object.entries(n)) {
24
+ let n = e[o];
25
+ n === void 0 || i(n) || s.when && !s.when(t) || a(n, s) || r.push({
26
+ key: o,
27
+ expected: s.type,
28
+ got: n === null ? "null" : typeof n,
29
+ ...s.options ? { options: s.options } : {}
30
+ });
31
+ }
32
+ return r;
33
+ }, s = (e, t, n) => {
34
+ let r = {};
35
+ for (let [i, a] of Object.entries(e)) (!n || i in t) && (r[i] = a);
36
+ for (let [e, n] of Object.entries(t)) n.default === void 0 || r[e] !== void 0 || n.when && !n.when(r) || (r[e] = n.default);
37
+ return r;
38
+ };
39
+ //#endregion
40
+ export { t as hiddenParams, o as invalidParams, n as missingRequiredParams, s as reconcileParams };
@@ -0,0 +1,10 @@
1
+ import { BuiltinGlobalCallback } from './builder';
2
+ /**
3
+ * The `space` source, which the SDK application registers rather than this package.
4
+ *
5
+ * Its declaration lives here anyway, with the rest of the interaction vocabulary: the app supplies the function
6
+ * that shows a notification, and everything else about the action — its params, their defaults, what the editor
7
+ * shows — is the same knowledge every other source keeps here, and splitting it by which module happens to call
8
+ * `useInteractions` is how a catalog ends up being copied.
9
+ */
10
+ export declare const spaceCallbacks: Record<string, BuiltinGlobalCallback>;
@@ -0,0 +1,51 @@
1
+ //#region src/authoring/spaceCallbacks.ts
2
+ var e = { addNotification: {
3
+ source: "space",
4
+ title: "Add Notification",
5
+ strictParams: !0,
6
+ params: {
7
+ content: {
8
+ type: "textarea",
9
+ description: "The notification text shown to the user — this is the message body. There is no separate title/message/type param.",
10
+ default: "Content"
11
+ },
12
+ placement: {
13
+ type: "select",
14
+ description: "Where the toast appears on screen.",
15
+ default: "top-right",
16
+ options: [
17
+ "top-right",
18
+ "top-center",
19
+ "top-left",
20
+ "bottom-right",
21
+ "bottom-center",
22
+ "bottom-left"
23
+ ]
24
+ },
25
+ appeareance: {
26
+ type: "select",
27
+ description: "Visual style of the notification. NOTE: the key is spelled \"appeareance\".",
28
+ default: "success",
29
+ options: [
30
+ "success",
31
+ "danger",
32
+ "warning",
33
+ "info"
34
+ ]
35
+ },
36
+ autoDismiss: {
37
+ type: "boolean",
38
+ description: "Whether the notification dismisses itself after a timeout.",
39
+ default: !0,
40
+ canBind: !1
41
+ },
42
+ autoDismissTimeout: {
43
+ type: "number",
44
+ description: "Milliseconds before auto-dismiss. Only applies when autoDismiss is true.",
45
+ default: 5e3,
46
+ when: (e) => e.autoDismiss === !0
47
+ }
48
+ }
49
+ } };
50
+ //#endregion
51
+ export { e as spaceCallbacks };
@@ -1,8 +1,6 @@
1
- import { ComponentPluginWithHOC, DropPosition, Element, EventBridgeEvent, PluginBuilder, Schema, Style, StyleThemeMode } from '../../types';
1
+ import { ComponentPluginWithHOC, DropPosition, Element, EventBridgeEvent, PluginBuilder, Schema, Style } from '../../types';
2
2
  import { Dispatch, SetStateAction } from 'react';
3
3
  export type BuilderContextValue = {
4
- theme: StyleThemeMode;
5
- setTheme: Dispatch<SetStateAction<StyleThemeMode>>;
6
4
  mode: 'normal' | 'template' | 'segment';
7
5
  schemaName: string;
8
6
  setMultiPagesMode: Dispatch<SetStateAction<boolean>>;
@@ -33,7 +31,7 @@ export type BuilderContextValue = {
33
31
  variables: Schema['variables'];
34
32
  }, dropPosition: DropPosition, toElementId: string, rootId?: string): boolean;
35
33
  <T extends string>(type: `add##${Exclude<T, 'plitzi-template'>}`, data: {
36
- id: string;
34
+ id?: string;
37
35
  element: Element;
38
36
  }, dropPosition: DropPosition, toElementId: string, rootId?: string): boolean;
39
37
  <T extends string>(type: `move##${Exclude<T, 'plitzi-template'>}`, data: {
@@ -21,7 +21,7 @@ var o = (e, t, r, i, a) => {
21
21
  definition: d
22
22
  }, (a) => {
23
23
  Object.keys(f).forEach((c) => {
24
- !f[c] || !Array.isArray(f[c]) || !f[c].length || f[c].forEach((l) => {
24
+ f[c] && Array.isArray(f[c]) && f[c].length && f[c].forEach((l) => {
25
25
  let { source: u, transformers: d, when: f, enabled: p = !0 } = l, { to: m } = l;
26
26
  if (!m || f && !i(f, s, !1, !0) || !p) return;
27
27
  c === "style" && (m = t(m));
@@ -1,4 +1,2 @@
1
- declare const getSourceName: (type: string, element: {
2
- idRef?: string;
3
- }) => string;
1
+ declare const getSourceName: (type: string, id: string) => string;
4
2
  export default getSourceName;
@@ -1,4 +1,4 @@
1
1
  //#region src/dataSource/helpers/getSourceName.ts
2
- var e = (e, t) => t.idRef ? `${e}_${t.idRef}` : "";
2
+ var e = (e, t) => `${e}_${t}`;
3
3
  //#endregion
4
4
  export { e as default };
@@ -1,4 +1,6 @@
1
1
  export * from './hooks';
2
2
  export * from './helpers';
3
3
  export { default as getBindingsDetails } from './getBindingsDetails';
4
+ export { default as resolveVariables } from './resolveVariables';
5
+ export type { VariableScope } from './resolveVariables';
4
6
  export { default as utility, utilityOptions } from './utility';
@@ -1,5 +1,6 @@
1
- import e from "./helpers/getSourceName.mjs";
2
- import t from "./hooks/useRegisterSource.mjs";
3
- import n, { utilityOptions as r } from "./utility/index.mjs";
4
- import i from "./getBindingsDetails.mjs";
5
- export { i as getBindingsDetails, e as getSourceName, t as useRegisterSource, n as utility, r as utilityOptions };
1
+ import e, { utilityOptions as t } from "./utility/index.mjs";
2
+ import n from "./getBindingsDetails.mjs";
3
+ import r from "./helpers/getSourceName.mjs";
4
+ import i from "./hooks/useRegisterSource.mjs";
5
+ import a from "./resolveVariables.mjs";
6
+ export { n as getBindingsDetails, r as getSourceName, a as resolveVariables, i as useRegisterSource, e as utility, t as utilityOptions };
@@ -0,0 +1,22 @@
1
+ import { SchemaVariable } from '../types';
2
+ /** What a variable's `subValues` are matched against — everything a `when` rule may name. */
3
+ export type VariableScope = {
4
+ routeParams?: Record<string, unknown>;
5
+ queryParams?: Record<string, unknown>;
6
+ hostname?: string;
7
+ environment?: string;
8
+ };
9
+ /**
10
+ * The space's variables, resolved for this request: `{ apiUrl: 'https://api.plitzi.local', … }`.
11
+ *
12
+ * A variable carries a default and a list of `subValues`, each guarded by a rule on the host, the environment or
13
+ * the request's params — which is how one document names an API that lives at a different address in every
14
+ * environment. The FIRST matching sub-value wins; with none, the default stands.
15
+ *
16
+ * It lives here, apart from the provider that publishes the result into the store, because two callers need it at
17
+ * different moments. `GlobalSources` publishes it for everything that renders. The router needs it BEFORE that:
18
+ * a page that sends an unauthenticated visitor to `{{authUrl}}/` is deciding not to render at all, so the
19
+ * provider that would have resolved the token never runs.
20
+ */
21
+ export declare const resolveVariables: (variables: SchemaVariable[] | undefined, scope?: VariableScope) => Record<string, unknown>;
22
+ export default resolveVariables;
@@ -0,0 +1,16 @@
1
+ import { QueryBuilderEvaluator as e } from "@plitzi/plitzi-ui/QueryBuilder";
2
+ //#region src/dataSource/resolveVariables.ts
3
+ var t = (t, n = {}) => Array.isArray(t) ? t.reduce((t, r) => {
4
+ let { name: i, value: a, subValues: o } = r;
5
+ if (!Array.isArray(o) || o.length === 0) return {
6
+ ...t,
7
+ [i]: a
8
+ };
9
+ let s = o.find((t) => e(t.when, n));
10
+ return {
11
+ ...t,
12
+ [i]: s ? s.value : a
13
+ };
14
+ }, {}) : {};
15
+ //#endregion
16
+ export { t as default, t as resolveVariables };
@@ -1,24 +1,26 @@
1
1
  import e from "./arrayMap.mjs";
2
2
  import t from "./capitalize.mjs";
3
3
  import n from "./dateConverter.mjs";
4
- import r from "./staticValue.mjs";
5
- import i from "./stringToArray.mjs";
6
- import a from "./styleSelector.mjs";
7
- import o from "./styleVariant.mjs";
8
- import s from "./twigTemplate.mjs";
4
+ import r from "./not.mjs";
5
+ import i from "./staticValue.mjs";
6
+ import a from "./stringToArray.mjs";
7
+ import o from "./styleSelector.mjs";
8
+ import s from "./styleVariant.mjs";
9
+ import c from "./twigTemplate.mjs";
9
10
  //#region src/dataSource/utility/index.ts
10
- var c = {
11
- twigTemplate: s,
11
+ var l = {
12
+ twigTemplate: c,
12
13
  dateConverter: n,
13
- staticValue: r,
14
+ staticValue: i,
14
15
  capitalize: t,
15
16
  arrayMap: e,
16
- stringToArray: i,
17
- styleSelector: a,
18
- styleVariant: o
19
- }, l = Object.values(c).map(({ title: e, action: t }) => ({
17
+ stringToArray: a,
18
+ not: r,
19
+ styleSelector: o,
20
+ styleVariant: s
21
+ }, u = Object.values(l).map(({ title: e, action: t }) => ({
20
22
  label: e,
21
23
  value: t
22
24
  }));
23
25
  //#endregion
24
- export { c as default, l as utilityOptions };
26
+ export { l as default, u as utilityOptions };
@@ -0,0 +1,11 @@
1
+ import { DataSourceUtility } from '../../types';
2
+ /**
3
+ * The inverse of the value, as a boolean.
4
+ *
5
+ * A binding shows an element when its field is true and there is no "unless", so without this every condition a
6
+ * page reads has to arrive from the server in both polarities — `found` AND `missing`, `signedIn` AND `signedOut`.
7
+ * That is a field per question that exists only because the client could not say "not", and it puts the answer to
8
+ * "when is this hidden?" in a different repository from the page that hides it.
9
+ */
10
+ declare const not: DataSourceUtility<unknown, boolean>;
11
+ export default not;
@@ -0,0 +1,15 @@
1
+ //#region src/dataSource/utility/not.ts
2
+ var e = /* @__PURE__ */ new Set([
3
+ "false",
4
+ "0",
5
+ ""
6
+ ]), t = (t) => typeof t == "string" ? !e.has(t.trim().toLowerCase()) : Array.isArray(t) ? t.length > 0 : !!t, n = {
7
+ action: "not",
8
+ title: "Not",
9
+ type: "utility",
10
+ params: {},
11
+ preview: { content: "" },
12
+ callback: (e) => !t(e)
13
+ };
14
+ //#endregion
15
+ export { n as default };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The cookie carrying the visitor's "hide the dev tools" preference — named for the origin it belongs to.
3
+ *
4
+ * A cookie's scope is the HOST, and the host has no port in it. So one jar entry is shared by every site served
5
+ * from `localhost`, and hiding the panel on the example running at `:5009` hides it on the one at `:4013` too —
6
+ * on the next reload, with nothing on screen to say why, and no way back that does not involve knowing the
7
+ * keyboard shortcut. Whoever hit that has a broken tool and no reason to suspect a cookie.
8
+ *
9
+ * The port goes in the NAME because it cannot go in the scope. A deployment on a default port is unaffected and
10
+ * keeps the plain name.
11
+ *
12
+ * Both halves of the SDK call this: the browser writes the preference, and the server reads it back so the
13
+ * markup it renders matches what the client is about to hydrate.
14
+ */
15
+ export declare const debugCookieName: (host: string | undefined) => string;
16
+ export default debugCookieName;
@@ -0,0 +1,7 @@
1
+ //#region src/devTools/debugCookie.ts
2
+ var e = (e) => {
3
+ let t = e?.split(":")[1];
4
+ return t ? `plitzi_debug_${t}` : "plitzi_debug";
5
+ };
6
+ //#endregion
7
+ export { e as debugCookieName, e as default };
@@ -1,5 +1,9 @@
1
+ import { default as debugCookieName } from './debugCookie';
1
2
  import { default as DevToolsContext } from './DevToolsContext';
3
+ import { default as isInteractionFlow } from './interactionLog';
2
4
  import { default as PlitziConsole } from './utils/PlitziConsole';
3
- export * from './utils/PlitziConsole';
5
+ export * from './debugCookie';
4
6
  export * from './DevToolsContext';
5
- export { PlitziConsole, DevToolsContext };
7
+ export * from './interactionLog';
8
+ export * from './utils/PlitziConsole';
9
+ export { PlitziConsole, DevToolsContext, debugCookieName, isInteractionFlow };