@juo/blocks 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/ExtensionRoot-CZyBNJZY.js +159 -0
  2. package/dist/block-VhmfGB3N.js +51 -0
  3. package/dist/block.d.ts +96 -0
  4. package/dist/block.d.ts.map +1 -0
  5. package/dist/bridge-DQsM97cH.js +490 -0
  6. package/dist/context.d.ts +76 -0
  7. package/dist/context.d.ts.map +1 -0
  8. package/dist/context.test.d.ts +2 -0
  9. package/dist/context.test.d.ts.map +1 -0
  10. package/dist/core.js +1163 -0
  11. package/dist/editor/bridge.d.ts +75 -0
  12. package/dist/editor/bridge.d.ts.map +1 -0
  13. package/dist/editor/bridge.test.d.ts +2 -0
  14. package/dist/editor/bridge.test.d.ts.map +1 -0
  15. package/dist/editor/components.d.ts +31 -0
  16. package/dist/editor/components.d.ts.map +1 -0
  17. package/dist/editor/handler.d.ts +10 -0
  18. package/dist/editor/handler.d.ts.map +1 -0
  19. package/dist/editor/main.d.ts +17 -0
  20. package/dist/editor/main.d.ts.map +1 -0
  21. package/dist/editor/messages.d.ts +233 -0
  22. package/dist/editor/messages.d.ts.map +1 -0
  23. package/dist/editor.js +711 -0
  24. package/dist/flows/MockWorkflowApiAdapter.d.ts +13 -0
  25. package/dist/flows/MockWorkflowApiAdapter.d.ts.map +1 -0
  26. package/dist/flows/WorkflowService.d.ts +175 -0
  27. package/dist/flows/WorkflowService.d.ts.map +1 -0
  28. package/dist/flows/__tests__/WorkflowService.test.d.ts +2 -0
  29. package/dist/flows/__tests__/WorkflowService.test.d.ts.map +1 -0
  30. package/dist/flows/__tests__/defaults.test.d.ts +2 -0
  31. package/dist/flows/__tests__/defaults.test.d.ts.map +1 -0
  32. package/dist/flows/__tests__/juo-workflow.test.d.ts +2 -0
  33. package/dist/flows/__tests__/juo-workflow.test.d.ts.map +1 -0
  34. package/dist/flows/__tests__/overlay-behavior.test.d.ts +2 -0
  35. package/dist/flows/__tests__/overlay-behavior.test.d.ts.map +1 -0
  36. package/dist/flows/__tests__/theme-state-surfaces.test.d.ts +2 -0
  37. package/dist/flows/__tests__/theme-state-surfaces.test.d.ts.map +1 -0
  38. package/dist/flows/defaults.d.ts +15 -0
  39. package/dist/flows/defaults.d.ts.map +1 -0
  40. package/dist/flows/index.d.ts +4 -0
  41. package/dist/flows/index.d.ts.map +1 -0
  42. package/dist/flows/juo-workflow.d.ts +48 -0
  43. package/dist/flows/juo-workflow.d.ts.map +1 -0
  44. package/dist/juo-workflow-RSrOuKUH.js +591 -0
  45. package/dist/main.d.ts +11 -0
  46. package/dist/main.d.ts.map +1 -0
  47. package/dist/preact/block.d.ts +21 -0
  48. package/dist/preact/block.d.ts.map +1 -0
  49. package/dist/preact/block.test.d.ts +2 -0
  50. package/dist/preact/block.test.d.ts.map +1 -0
  51. package/dist/preact/bridge.d.ts +11 -0
  52. package/dist/preact/bridge.d.ts.map +1 -0
  53. package/dist/preact/context.d.ts +31 -0
  54. package/dist/preact/context.d.ts.map +1 -0
  55. package/dist/preact/main.d.ts +11 -0
  56. package/dist/preact/main.d.ts.map +1 -0
  57. package/dist/preact/signals.d.ts +23 -0
  58. package/dist/preact/signals.d.ts.map +1 -0
  59. package/dist/preact.js +230 -0
  60. package/dist/react/block.d.ts +21 -0
  61. package/dist/react/block.d.ts.map +1 -0
  62. package/dist/react/block.test.d.ts +2 -0
  63. package/dist/react/block.test.d.ts.map +1 -0
  64. package/dist/react/bridge.d.ts +11 -0
  65. package/dist/react/bridge.d.ts.map +1 -0
  66. package/dist/react/context.d.ts +28 -0
  67. package/dist/react/context.d.ts.map +1 -0
  68. package/dist/react/main.d.ts +11 -0
  69. package/dist/react/main.d.ts.map +1 -0
  70. package/dist/react/signals.d.ts +23 -0
  71. package/dist/react/signals.d.ts.map +1 -0
  72. package/dist/react.js +205 -0
  73. package/dist/services/index.d.ts +4 -0
  74. package/dist/services/index.d.ts.map +1 -0
  75. package/dist/services/login/index.d.ts +23 -0
  76. package/dist/services/login/index.d.ts.map +1 -0
  77. package/dist/services/login/loginService.d.ts +82 -0
  78. package/dist/services/login/loginService.d.ts.map +1 -0
  79. package/dist/services/product/adapter.d.ts +20 -0
  80. package/dist/services/product/adapter.d.ts.map +1 -0
  81. package/dist/services/product/index.d.ts +5 -0
  82. package/dist/services/product/index.d.ts.map +1 -0
  83. package/dist/services/product/productService.d.ts +12 -0
  84. package/dist/services/product/productService.d.ts.map +1 -0
  85. package/dist/services/product/types.d.ts +32 -0
  86. package/dist/services/product/types.d.ts.map +1 -0
  87. package/dist/services/subscription/adapter.d.ts +49 -0
  88. package/dist/services/subscription/adapter.d.ts.map +1 -0
  89. package/dist/services/subscription/index.d.ts +5 -0
  90. package/dist/services/subscription/index.d.ts.map +1 -0
  91. package/dist/services/subscription/list.d.ts +22 -0
  92. package/dist/services/subscription/list.d.ts.map +1 -0
  93. package/dist/services/subscription/store.d.ts +30 -0
  94. package/dist/services/subscription/store.d.ts.map +1 -0
  95. package/dist/services/subscription/subscriptionService.d.ts +12 -0
  96. package/dist/services/subscription/subscriptionService.d.ts.map +1 -0
  97. package/dist/services/subscription/types.d.ts +76 -0
  98. package/dist/services/subscription/types.d.ts.map +1 -0
  99. package/dist/shared/block.d.ts +17 -0
  100. package/dist/shared/block.d.ts.map +1 -0
  101. package/dist/shared/context.d.ts +16 -0
  102. package/dist/shared/context.d.ts.map +1 -0
  103. package/dist/shared/signals.d.ts +17 -0
  104. package/dist/shared/signals.d.ts.map +1 -0
  105. package/dist/state.d.ts +81 -0
  106. package/dist/state.d.ts.map +1 -0
  107. package/dist/theme-state-BZplRS92.js +886 -0
  108. package/dist/theme-state.d.ts +85 -0
  109. package/dist/theme-state.d.ts.map +1 -0
  110. package/dist/theme-state.locales.test.d.ts +2 -0
  111. package/dist/theme-state.locales.test.d.ts.map +1 -0
  112. package/dist/translation.d.ts +14 -0
  113. package/dist/translation.d.ts.map +1 -0
  114. package/dist/translation.test.d.ts +2 -0
  115. package/dist/translation.test.d.ts.map +1 -0
  116. package/dist/utils/index.d.ts +32 -0
  117. package/dist/utils/index.d.ts.map +1 -0
  118. package/dist/utils/login.d.ts +11 -0
  119. package/dist/utils/login.d.ts.map +1 -0
  120. package/dist/utils/uuid.d.ts +2 -0
  121. package/dist/utils/uuid.d.ts.map +1 -0
  122. package/dist/vue/block.d.ts +7 -0
  123. package/dist/vue/block.d.ts.map +1 -0
  124. package/dist/vue/bridge.d.ts +11 -0
  125. package/dist/vue/bridge.d.ts.map +1 -0
  126. package/dist/vue/context.d.ts +24 -0
  127. package/dist/vue/context.d.ts.map +1 -0
  128. package/dist/vue/main.d.ts +6 -0
  129. package/dist/vue/main.d.ts.map +1 -0
  130. package/dist/vue/signals.d.ts +5 -0
  131. package/dist/vue/signals.d.ts.map +1 -0
  132. package/dist/vue/target.d.ts +2 -0
  133. package/dist/vue/target.d.ts.map +1 -0
  134. package/dist/vue/transform.d.ts +2 -0
  135. package/dist/vue/transform.d.ts.map +1 -0
  136. package/dist/vue.js +254 -0
  137. package/dist/web-components/Block.d.ts +17 -0
  138. package/dist/web-components/Block.d.ts.map +1 -0
  139. package/dist/web-components/Block.test.d.ts +2 -0
  140. package/dist/web-components/Block.test.d.ts.map +1 -0
  141. package/dist/web-components/ExtensionRoot.d.ts +29 -0
  142. package/dist/web-components/ExtensionRoot.d.ts.map +1 -0
  143. package/dist/web-components/editor/InlineText.d.ts +29 -0
  144. package/dist/web-components/editor/InlineText.d.ts.map +1 -0
  145. package/dist/web-components/editor/main.d.ts +2 -0
  146. package/dist/web-components/editor/main.d.ts.map +1 -0
  147. package/dist/web-components/runtime/InlineText.d.ts +6 -0
  148. package/dist/web-components/runtime/InlineText.d.ts.map +1 -0
  149. package/dist/web-components/runtime/main.d.ts +2 -0
  150. package/dist/web-components/runtime/main.d.ts.map +1 -0
  151. package/dist/web-components-editor.js +183 -0
  152. package/dist/web-components-runtime.js +55 -0
  153. package/package.json +62 -0
@@ -0,0 +1,159 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { signal, effect, createBlockInstance } from "@juo/blocks";
5
+ import { d, j as withWrapper, t as subscribeContext, T as ThemeStateContext, E, v as n } from "./theme-state-BZplRS92.js";
6
+ import "./juo-workflow-RSrOuKUH.js";
7
+ class Block extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ /** @description The block name to render */
11
+ __publicField(this, "name", signal(null));
12
+ __publicField(this, "disposeEffect");
13
+ }
14
+ static get observedAttributes() {
15
+ return ["name"];
16
+ }
17
+ connectedCallback() {
18
+ this.name.value = this.getAttribute("name") ?? null;
19
+ this.disposeEffect = effect(() => {
20
+ this.renderBlock(this.name.value);
21
+ });
22
+ }
23
+ attributeChangedCallback(name, oldValue, newValue) {
24
+ if (name === "name" && oldValue !== newValue) {
25
+ this.name.value = newValue ?? null;
26
+ }
27
+ }
28
+ disconnectedCallback() {
29
+ if (this.disposeEffect) {
30
+ this.disposeEffect();
31
+ this.disposeEffect = void 0;
32
+ }
33
+ }
34
+ renderBlock(name) {
35
+ if (name == null) {
36
+ console.error("'name' attribute is required");
37
+ this.replaceChildren();
38
+ return;
39
+ }
40
+ const props = Object.fromEntries(
41
+ Array.from(this.attributes).map((attr) => [attr.name, attr.value])
42
+ );
43
+ const block = createBlockInstance(name, { props });
44
+ if (block == null) {
45
+ console.error(`Block definition for '${name}' not found`);
46
+ this.replaceChildren();
47
+ return;
48
+ }
49
+ this.replaceChildren(block.definition.render(block));
50
+ }
51
+ }
52
+ class ExtensionRoot extends HTMLElement {
53
+ constructor() {
54
+ super();
55
+ __publicField(this, "state", d(null));
56
+ __publicField(this, "themeState", null);
57
+ __publicField(this, "unsubscribeThemeContext");
58
+ __publicField(this, "disposeEffect");
59
+ /**
60
+ * Optional function to wrap each rendered block element.
61
+ * Called with the rendered block HTMLElement, must return an HTMLElement.
62
+ * When set, the wrapper sits between the editor wrapper (outer) and the actual block (inner).
63
+ * Must be set before blocks are first rendered; changing it afterwards has no effect
64
+ * on already-cached block wrappers.
65
+ */
66
+ __publicField(this, "blockWrapper", null);
67
+ __publicField(this, "wrapperCache", /* @__PURE__ */ new WeakMap());
68
+ }
69
+ static get observedAttributes() {
70
+ return ["name", "surface"];
71
+ }
72
+ withWrapper(block) {
73
+ if (!this.wrapperCache.has(block)) {
74
+ const blockWrapper = this.blockWrapper;
75
+ const wrapper = withWrapper((block2) => {
76
+ const rendered = block2.definition.render(block2);
77
+ return blockWrapper ? blockWrapper(rendered) : rendered;
78
+ });
79
+ this.wrapperCache.set(block, wrapper);
80
+ }
81
+ return this.wrapperCache.get(block)(block);
82
+ }
83
+ getSurface() {
84
+ return this.getAttribute("surface") === "overlay" ? "overlay" : "page";
85
+ }
86
+ setStateFromThemeState(themeState) {
87
+ const surface = this.getSurface();
88
+ this.state.value = surface === "overlay" ? themeState.overlay : themeState.page;
89
+ }
90
+ connectedCallback() {
91
+ this.state.value = null;
92
+ this.themeState = null;
93
+ this.style.display = "flex";
94
+ this.style.flexDirection = "column";
95
+ this.style.gap = "16px";
96
+ this.style.maxWidth = "100%";
97
+ this.style.justifySelf = "center";
98
+ this.unsubscribeThemeContext = subscribeContext(
99
+ this,
100
+ ThemeStateContext,
101
+ (contextValue) => {
102
+ this.themeState = contextValue;
103
+ this.setStateFromThemeState(contextValue);
104
+ }
105
+ );
106
+ this.disposeEffect = E(() => {
107
+ const state = this.state.value;
108
+ if (state == null) {
109
+ this.replaceChildren();
110
+ return;
111
+ }
112
+ const name = this.getAttribute("name");
113
+ if (name == null) {
114
+ console.error("'name' attribute is required");
115
+ this.replaceChildren();
116
+ return;
117
+ }
118
+ const blocks = state.blocks.value;
119
+ n(() => {
120
+ var _a;
121
+ try {
122
+ const extensionBlocks = (((_a = blocks.at(0)) == null ? void 0 : _a.slots) ?? {})[name] ?? [];
123
+ const children = extensionBlocks.map(
124
+ (block) => this.withWrapper(block)
125
+ ) ?? [];
126
+ this.replaceChildren(...children);
127
+ } catch (error) {
128
+ console.error(error);
129
+ this.replaceChildren();
130
+ }
131
+ });
132
+ });
133
+ }
134
+ attributeChangedCallback(name, oldValue, newValue) {
135
+ if ((name === "name" || name === "surface") && oldValue !== newValue && this.state.value) {
136
+ if (name === "surface") {
137
+ if (this.themeState) {
138
+ this.setStateFromThemeState(this.themeState);
139
+ return;
140
+ }
141
+ }
142
+ this.state.value = { ...this.state.value };
143
+ }
144
+ }
145
+ disconnectedCallback() {
146
+ if (this.unsubscribeThemeContext) {
147
+ this.unsubscribeThemeContext();
148
+ this.unsubscribeThemeContext = void 0;
149
+ }
150
+ if (this.disposeEffect) {
151
+ this.disposeEffect();
152
+ this.disposeEffect = void 0;
153
+ }
154
+ }
155
+ }
156
+ export {
157
+ Block as B,
158
+ ExtensionRoot as E
159
+ };
@@ -0,0 +1,51 @@
1
+ import { signal } from "@juo/blocks";
2
+ const signalsMap = /* @__PURE__ */ new WeakMap();
3
+ function toSignal(value) {
4
+ if (!signalsMap.has(value)) {
5
+ const initialValue = typeof value === "function" ? value() : value;
6
+ const s = signal(initialValue);
7
+ signalsMap.set(value, s);
8
+ }
9
+ return signalsMap.get(value);
10
+ }
11
+ function getSignalValue(signal2) {
12
+ return typeof signal2 === "function" ? signal2() : signal2.value;
13
+ }
14
+ function setSignalValue(signal2, value) {
15
+ if (typeof signal2 === "function") {
16
+ throw new Error("Readonly signal - cannot set value on computed signal");
17
+ }
18
+ signal2.value = value;
19
+ }
20
+ function wrapContext(obj, toState) {
21
+ if (typeof obj !== "object" || obj == null) {
22
+ return obj;
23
+ }
24
+ return new Proxy(obj, {
25
+ get(target, key) {
26
+ const val = target[key];
27
+ if (typeof val === "object" && val != null && "brand" in val) {
28
+ return toState(val);
29
+ }
30
+ return val;
31
+ }
32
+ });
33
+ }
34
+ function createSlotChildren(block) {
35
+ const blocks = Array.isArray(block) ? block : [block];
36
+ return blocks.map((b) => {
37
+ if (typeof b === "string") {
38
+ const el = document.createElement("span");
39
+ el.innerText = b;
40
+ return el;
41
+ }
42
+ return b.definition.render(b);
43
+ });
44
+ }
45
+ export {
46
+ createSlotChildren as c,
47
+ getSignalValue as g,
48
+ setSignalValue as s,
49
+ toSignal as t,
50
+ wrapContext as w
51
+ };
@@ -0,0 +1,96 @@
1
+ import { JSONSchema } from 'json-schema-to-ts';
2
+ type Schema = {} | (JSONSchema & {
3
+ type: "object";
4
+ });
5
+ export interface BlockPreset<TState = unknown, TContext extends Record<string, unknown> = Record<string, unknown>> {
6
+ label: string;
7
+ description?: string;
8
+ group?: string;
9
+ state: TState;
10
+ context: TContext;
11
+ }
12
+ export type BlockPresets = Record<string, BlockPreset<unknown, Record<string, unknown>>>;
13
+ export type BlockRenderer = (block: BlockInstance) => HTMLElement;
14
+ export type BlockLocaleFile = {
15
+ overrides?: Record<string, string>;
16
+ [key: string]: string | Record<string, string> | undefined;
17
+ };
18
+ export type BlockDefinition<T = unknown> = {
19
+ name: string;
20
+ group: "internal" | "juo" | "theme" | "integration" | "page" | "workflow" | "action";
21
+ schema: Schema;
22
+ initialValue: T | (() => T);
23
+ render: BlockRenderer;
24
+ presets?: BlockPresets;
25
+ locales?: {
26
+ /** Locale codes supported by this block (e.g. ["en", "de", "nl"]). */
27
+ supported?: string[];
28
+ load: (locale: string) => Promise<BlockLocaleFile>;
29
+ };
30
+ };
31
+ export type Block = {
32
+ id: string;
33
+ type: string;
34
+ props: any;
35
+ slots: any;
36
+ };
37
+ export type BlockInstance = Block & {
38
+ readonly definition: BlockDefinition;
39
+ };
40
+ export declare function serializeBlocks(blocks: (Block | BlockInstance)[]): Block[];
41
+ export declare function createSelectedBlock(): {
42
+ selected: import('@preact/signals-core').Signal<BlockInstance | null>;
43
+ setSelection: (block: BlockInstance) => void;
44
+ clearSelection: (block?: BlockInstance) => void;
45
+ };
46
+ export declare const SelectedBlockContext: {
47
+ __context__: {
48
+ selected: import('@preact/signals-core').Signal<BlockInstance | null>;
49
+ setSelection: (block: BlockInstance) => void;
50
+ clearSelection: (block?: BlockInstance) => void;
51
+ };
52
+ };
53
+ declare global {
54
+ interface Window {
55
+ _juoBlocks: Map<string, BlockDefinition<unknown>>;
56
+ }
57
+ }
58
+ export declare class BlockWrapperEvent extends Event {
59
+ readonly block: BlockInstance;
60
+ readonly callback: (wrapper: HTMLElement) => void;
61
+ constructor(block: BlockInstance, callback: (wrapper: HTMLElement) => void);
62
+ }
63
+ declare global {
64
+ interface HTMLElementEventMap {
65
+ "juo:block-wrapper-render": BlockWrapperEvent;
66
+ }
67
+ }
68
+ export declare function withWrapper(fn: (block: BlockInstance) => HTMLElement): (block: BlockInstance) => HTMLElement;
69
+ export declare function registerBlock<T>(block: BlockDefinition<T>): void;
70
+ export declare function onRegisterBlock(cb: (name: string, block: BlockDefinition) => void): void;
71
+ export declare function defineBlock<T>(name: string, opts: {
72
+ group: "internal" | "juo" | "theme" | "integration" | "page" | "workflow" | "action";
73
+ schema: JSONSchema;
74
+ initialValue: T | (() => T);
75
+ renderer: (block: BlockInstance) => HTMLElement;
76
+ presets?: BlockPresets;
77
+ locales?: {
78
+ supported?: string[];
79
+ load: (locale: string) => Promise<BlockLocaleFile>;
80
+ };
81
+ }): BlockDefinition<T>;
82
+ export declare function defineBlockRuntime<T = never>(name: string, opts: {
83
+ group: "internal" | "juo" | "theme" | "integration" | "page" | "workflow" | "action";
84
+ renderer: (block: BlockInstance) => HTMLElement;
85
+ }): BlockDefinition<T>;
86
+ export declare function getDefinedBlocks(): BlockDefinition[];
87
+ export declare function createCeRenderer(name: string): (block: BlockInstance) => HTMLDivElement;
88
+ export declare function createBlockInstance(name: string, opts?: {
89
+ props?: any;
90
+ slots?: any;
91
+ id?: string;
92
+ }): BlockInstance;
93
+ export declare function createBlockInstanceFromObject(input: Block): BlockInstance;
94
+ export declare function createBlockInstanceFromJSON(input: string): BlockInstance;
95
+ export {};
96
+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