@juo/orion-core 0.15.0 → 0.16.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.
- package/dist/{ExtensionRoot-B3VZYOFl.js → ExtensionRoot-Cy6c9p75.js} +2 -2
- package/dist/{bridge-DjBr4DlY.js → bridge-D-0V6_BT.js} +12 -4
- package/dist/core.js +3 -3
- package/dist/editor/messages.d.ts +9 -2
- package/dist/editor.js +7 -6
- package/dist/{juo-workflow-CtdYqg0V.js → juo-workflow-ComG9rLp.js} +2 -2
- package/dist/preact.js +1 -1
- package/dist/react.js +1 -1
- package/dist/{theme-state-CVjQY7tL.js → theme-state-D4n_2n_h.js} +1 -1
- package/dist/vue.js +1 -1
- package/dist/web-components-editor.js +4 -4
- package/dist/web-components-runtime.js +3 -3
- package/package.json +1 -1
|
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { signal, effect, createBlockInstance } from "@juo/orion-core";
|
|
8
|
-
import { d, j as withWrapper, t as subscribeContext, T as ThemeStateContext, E, v as n } from "./theme-state-
|
|
9
|
-
import "./juo-workflow-
|
|
8
|
+
import { d, j as withWrapper, t as subscribeContext, T as ThemeStateContext, E, v as n } from "./theme-state-D4n_2n_h.js";
|
|
9
|
+
import "./juo-workflow-ComG9rLp.js";
|
|
10
10
|
class Block extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
@@ -2,7 +2,7 @@ function isEditorMessage(message) {
|
|
|
2
2
|
return message.type === "PROVIDE_THEME_STATE" || message.type === "PROVIDE_TRANSLATION_OVERRIDES" || message.type === "SELECT_BLOCK" || message.type === "UPDATE_BLOCK_PROPS" || message.type === "ADD_BLOCK" || message.type === "REMOVE_BLOCK" || message.type === "MOVE_BLOCK" || message.type === "SET_BLOCK_PRESET" || message.type === "SET_LOCALE" || message.type === "SET_GLOBAL_STYLES" || message.type === "PROVIDE_GLOBAL_STYLES" || message.type === "SCROLL_SYNC" || message.type === "REQUEST_CONTENT_HEIGHT";
|
|
3
3
|
}
|
|
4
4
|
function isIframeMessage(message) {
|
|
5
|
-
return message.type === "SELECT_BLOCK" || message.type === "IFRAME_READY" || message.type === "REGISTER_BLOCKS" || message.type === "REGISTER_ROUTES" || message.type === "REMOVE_BLOCK" || message.type === "UPDATE_BLOCK_PROPS" || message.type === "REQUEST_THEME_STATE" || message.type === "REQUEST_TRANSLATION_OVERRIDES" || message.type === "UPDATE_BLOCK_TRANSLATION" || message.type === "FOCUS_INLINE_TEXT" || message.type === "REQUEST_GLOBAL_STYLES" || message.type === "REPORT_CONTENT_HEIGHT" || message.type === "SCROLL_SYNC";
|
|
5
|
+
return message.type === "SELECT_BLOCK" || message.type === "IFRAME_READY" || message.type === "REGISTER_BLOCKS" || message.type === "REGISTER_ROUTES" || message.type === "REMOVE_BLOCK" || message.type === "UPDATE_BLOCK_PROPS" || message.type === "REQUEST_THEME_STATE" || message.type === "REQUEST_TRANSLATION_OVERRIDES" || message.type === "UPDATE_BLOCK_TRANSLATION" || message.type === "FOCUS_INLINE_TEXT" || message.type === "REQUEST_GLOBAL_STYLES" || message.type === "PROVIDE_INITIAL_GLOBAL_STYLES" || message.type === "REPORT_CONTENT_HEIGHT" || message.type === "SCROLL_SYNC";
|
|
6
6
|
}
|
|
7
7
|
function createProvideThemeStateMessage(payload) {
|
|
8
8
|
return {
|
|
@@ -146,6 +146,13 @@ function createProvideGlobalStylesMessage(payload) {
|
|
|
146
146
|
timestamp: Date.now()
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
+
function createProvideInitialGlobalStylesMessage(payload) {
|
|
150
|
+
return {
|
|
151
|
+
type: "PROVIDE_INITIAL_GLOBAL_STYLES",
|
|
152
|
+
payload,
|
|
153
|
+
timestamp: Date.now()
|
|
154
|
+
};
|
|
155
|
+
}
|
|
149
156
|
function createScrollSyncMessage(payload) {
|
|
150
157
|
return {
|
|
151
158
|
type: "SCROLL_SYNC",
|
|
@@ -472,7 +479,8 @@ export {
|
|
|
472
479
|
createSetGlobalStylesMessage as s,
|
|
473
480
|
createRequestGlobalStylesMessage as t,
|
|
474
481
|
createProvideGlobalStylesMessage as u,
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
482
|
+
createProvideInitialGlobalStylesMessage as v,
|
|
483
|
+
createScrollSyncMessage as w,
|
|
484
|
+
createReportContentHeightMessage as x,
|
|
485
|
+
getEditorBridge as y
|
|
478
486
|
};
|
package/dist/core.js
CHANGED
|
@@ -4,9 +4,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import { c as createContext, d, w, E, u } from "./theme-state-
|
|
8
|
-
import { B, n, C, D, S, T, a, b, e, f, k, l, g, h, i, m, p, o, q, r, s, t, v, j } from "./theme-state-
|
|
9
|
-
import { T as T2, W, c, b as b2, a as a2, g as g2, h as h2 } from "./juo-workflow-
|
|
7
|
+
import { c as createContext, d, w, E, u } from "./theme-state-D4n_2n_h.js";
|
|
8
|
+
import { B, n, C, D, S, T, a, b, e, f, k, l, g, h, i, m, p, o, q, r, s, t, v, j } from "./theme-state-D4n_2n_h.js";
|
|
9
|
+
import { T as T2, W, c, b as b2, a as a2, g as g2, h as h2 } from "./juo-workflow-ComG9rLp.js";
|
|
10
10
|
function createState() {
|
|
11
11
|
const discountCode = d(null);
|
|
12
12
|
const products = d([]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Block, BlockPresets } from '../block';
|
|
2
2
|
import { GlobalStyles, ThemeSurface, TranslationOverride } from '../theme-state';
|
|
3
|
-
export type MessageType = "PROVIDE_THEME_STATE" | "SELECT_BLOCK" | "UPDATE_BLOCK_PROPS" | "ADD_BLOCK" | "REMOVE_BLOCK" | "MOVE_BLOCK" | "IFRAME_READY" | "REGISTER_BLOCKS" | "REGISTER_ROUTES" | "SET_BLOCK_PRESET" | "SET_LOCALE" | "REQUEST_THEME_STATE" | "REQUEST_TRANSLATION_OVERRIDES" | "PROVIDE_TRANSLATION_OVERRIDES" | "UPDATE_BLOCK_TRANSLATION" | "FOCUS_INLINE_TEXT" | "SET_GLOBAL_STYLES" | "REQUEST_GLOBAL_STYLES" | "PROVIDE_GLOBAL_STYLES" | "SCROLL_SYNC" | "REPORT_CONTENT_HEIGHT" | "REQUEST_CONTENT_HEIGHT";
|
|
3
|
+
export type MessageType = "PROVIDE_THEME_STATE" | "SELECT_BLOCK" | "UPDATE_BLOCK_PROPS" | "ADD_BLOCK" | "REMOVE_BLOCK" | "MOVE_BLOCK" | "IFRAME_READY" | "REGISTER_BLOCKS" | "REGISTER_ROUTES" | "SET_BLOCK_PRESET" | "SET_LOCALE" | "REQUEST_THEME_STATE" | "REQUEST_TRANSLATION_OVERRIDES" | "PROVIDE_TRANSLATION_OVERRIDES" | "UPDATE_BLOCK_TRANSLATION" | "FOCUS_INLINE_TEXT" | "SET_GLOBAL_STYLES" | "REQUEST_GLOBAL_STYLES" | "PROVIDE_GLOBAL_STYLES" | "PROVIDE_INITIAL_GLOBAL_STYLES" | "SCROLL_SYNC" | "REPORT_CONTENT_HEIGHT" | "REQUEST_CONTENT_HEIGHT";
|
|
4
4
|
export interface BaseMessage {
|
|
5
5
|
type: MessageType;
|
|
6
6
|
timestamp: number;
|
|
@@ -170,8 +170,14 @@ export interface ProvideGlobalStylesMessage extends BaseMessage {
|
|
|
170
170
|
styles: GlobalStyles;
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
+
export interface ProvideInitialGlobalStylesMessage extends BaseMessage {
|
|
174
|
+
type: "PROVIDE_INITIAL_GLOBAL_STYLES";
|
|
175
|
+
payload: {
|
|
176
|
+
styles: GlobalStyles;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
173
179
|
export type EditorMessage = ProvideThemeStateMessage | ProvideTranslationOverridesMessage | SelectBlockMessage | UpdateBlockPropsMessage | AddBlockMessage | RemoveBlockMessage | MoveBlockMessage | SetBlockPresetMessage | SetLocaleMessage | SetGlobalStylesMessage | ProvideGlobalStylesMessage | ScrollSyncMessage | RequestContentHeightMessage;
|
|
174
|
-
export type IframeMessage = SelectBlockMessage | IframeReadyMessage | RegisterBlocksMessage | RegisterRoutesMessage | RemoveBlockMessage | UpdateBlockPropsMessage | RequestThemeStateMessage | RequestTranslationOverridesMessage | UpdateBlockTranslationMessage | FocusInlineTextMessage | RequestGlobalStylesMessage | ReportContentHeightMessage | ScrollSyncMessage;
|
|
180
|
+
export type IframeMessage = SelectBlockMessage | IframeReadyMessage | RegisterBlocksMessage | RegisterRoutesMessage | RemoveBlockMessage | UpdateBlockPropsMessage | RequestThemeStateMessage | RequestTranslationOverridesMessage | UpdateBlockTranslationMessage | FocusInlineTextMessage | RequestGlobalStylesMessage | ProvideInitialGlobalStylesMessage | ReportContentHeightMessage | ScrollSyncMessage;
|
|
175
181
|
export type AnyMessage = EditorMessage | IframeMessage;
|
|
176
182
|
export declare function isEditorMessage(message: AnyMessage): message is EditorMessage;
|
|
177
183
|
export declare function isIframeMessage(message: AnyMessage): message is IframeMessage;
|
|
@@ -209,5 +215,6 @@ export interface RequestContentHeightMessage extends BaseMessage {
|
|
|
209
215
|
payload: Record<string, never>;
|
|
210
216
|
}
|
|
211
217
|
export declare function createProvideGlobalStylesMessage(payload: ProvideGlobalStylesMessage["payload"]): ProvideGlobalStylesMessage;
|
|
218
|
+
export declare function createProvideInitialGlobalStylesMessage(payload: ProvideInitialGlobalStylesMessage["payload"]): ProvideInitialGlobalStylesMessage;
|
|
212
219
|
export declare function createScrollSyncMessage(payload: ScrollSyncMessage["payload"]): ScrollSyncMessage;
|
|
213
220
|
export declare function createReportContentHeightMessage(payload: ReportContentHeightMessage["payload"]): ReportContentHeightMessage;
|
package/dist/editor.js
CHANGED
|
@@ -5,9 +5,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { getDefinedBlocks, onRegisterBlock } from "@juo/orion-core";
|
|
8
|
-
import { c as createEditorBridge, d as createRemoveBlockMessage, e as createRegisterBlocksMessage, f as createRegisterRoutesMessage } from "./bridge-
|
|
9
|
-
import { o, a, p, u, h, l,
|
|
10
|
-
import { e as createBlockInstanceFromObject, m as indexOverrides } from "./theme-state-
|
|
8
|
+
import { c as createEditorBridge, d as createRemoveBlockMessage, e as createRegisterBlocksMessage, f as createRegisterRoutesMessage } from "./bridge-D-0V6_BT.js";
|
|
9
|
+
import { o, a, p, u, v, h, l, x, t, j, k, w, m, q, s, r, n, b, y, i, g } from "./bridge-D-0V6_BT.js";
|
|
10
|
+
import { e as createBlockInstanceFromObject, m as indexOverrides } from "./theme-state-D4n_2n_h.js";
|
|
11
11
|
function createEditorHandler(options) {
|
|
12
12
|
const { themeState, onBlockSelection } = options;
|
|
13
13
|
const blockSurfaceIndex = /* @__PURE__ */ new Map();
|
|
@@ -669,23 +669,24 @@ export {
|
|
|
669
669
|
a as createFocusInlineTextMessage,
|
|
670
670
|
p as createMoveBlockMessage,
|
|
671
671
|
u as createProvideGlobalStylesMessage,
|
|
672
|
+
v as createProvideInitialGlobalStylesMessage,
|
|
672
673
|
h as createProvideThemeStateMessage,
|
|
673
674
|
l as createProvideTranslationOverridesMessage,
|
|
674
675
|
createRegisterBlocksMessage,
|
|
675
676
|
createRegisterRoutesMessage,
|
|
676
677
|
createRemoveBlockMessage,
|
|
677
|
-
|
|
678
|
+
x as createReportContentHeightMessage,
|
|
678
679
|
t as createRequestGlobalStylesMessage,
|
|
679
680
|
j as createRequestThemeStateMessage,
|
|
680
681
|
k as createRequestTranslationOverridesMessage,
|
|
681
|
-
|
|
682
|
+
w as createScrollSyncMessage,
|
|
682
683
|
m as createSelectBlockMessage,
|
|
683
684
|
q as createSetBlockPresetMessage,
|
|
684
685
|
s as createSetGlobalStylesMessage,
|
|
685
686
|
r as createSetLocaleMessage,
|
|
686
687
|
n as createUpdateBlockPropsMessage,
|
|
687
688
|
b as createUpdateBlockTranslationMessage,
|
|
688
|
-
|
|
689
|
+
y as getEditorBridge,
|
|
689
690
|
i as isEditorMessage,
|
|
690
691
|
g as isIframeMessage,
|
|
691
692
|
setupEditorMode
|
|
@@ -4,8 +4,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import { c as createContext, d, E, i as getDefinedBlocks, a as createBlockInstance, w, r as registerBlock, g as defineBlock, t as subscribeContext } from "./theme-state-
|
|
8
|
-
import { c as createEditorBridge } from "./bridge-
|
|
7
|
+
import { c as createContext, d, E, i as getDefinedBlocks, a as createBlockInstance, w, r as registerBlock, g as defineBlock, t as subscribeContext } from "./theme-state-D4n_2n_h.js";
|
|
8
|
+
import { c as createEditorBridge } from "./bridge-D-0V6_BT.js";
|
|
9
9
|
const TranslationContext = createContext("translation");
|
|
10
10
|
function toStringRecord(input) {
|
|
11
11
|
if (input == null)
|
package/dist/preact.js
CHANGED
|
@@ -9,7 +9,7 @@ import { useState, useRef, useEffect, useContext as useContext$1, useMemo } from
|
|
|
9
9
|
import { g as getSignalValue, s as setSignalValue, w as wrapContext, c as createSlotChildren } from "./block-DPjf_G7G.js";
|
|
10
10
|
import { t } from "./block-DPjf_G7G.js";
|
|
11
11
|
import { createContext, h, render } from "preact";
|
|
12
|
-
import { c as createEditorBridge } from "./bridge-
|
|
12
|
+
import { c as createEditorBridge } from "./bridge-D-0V6_BT.js";
|
|
13
13
|
function toState(signal) {
|
|
14
14
|
const [value, setValue] = useState(() => getSignalValue(signal));
|
|
15
15
|
const disposeRef = useRef(null);
|
package/dist/react.js
CHANGED
|
@@ -9,7 +9,7 @@ import React, { useSyncExternalStore, createContext, useState, useContext as use
|
|
|
9
9
|
import { g as getSignalValue, s as setSignalValue, w as wrapContext, c as createSlotChildren } from "./block-DPjf_G7G.js";
|
|
10
10
|
import { t } from "./block-DPjf_G7G.js";
|
|
11
11
|
import { createRoot } from "react-dom/client";
|
|
12
|
-
import { c as createEditorBridge } from "./bridge-
|
|
12
|
+
import { c as createEditorBridge } from "./bridge-D-0V6_BT.js";
|
|
13
13
|
function toState(signal) {
|
|
14
14
|
const subscribe = (callback) => {
|
|
15
15
|
const dispose = effect(() => {
|
package/dist/vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toValue, watchEffect, customRef, defineComponent, ref, getCurrentInstance, onMounted, provide, h, renderSlot, inject, computed, createApp, useHost, defineCustomElement } from "vue";
|
|
2
2
|
import { signal, effect, injectContext, provideContext, createCeRenderer } from "@juo/orion-core";
|
|
3
|
-
import { c as createEditorBridge } from "./bridge-
|
|
3
|
+
import { c as createEditorBridge } from "./bridge-D-0V6_BT.js";
|
|
4
4
|
const signalsMap = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
function toSignal(ref2) {
|
|
6
6
|
if (!signalsMap.has(ref2)) {
|
|
@@ -4,10 +4,10 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import { p as injectContext, E, x as ContextRoot } from "./theme-state-
|
|
8
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-
|
|
9
|
-
import { c as createEditorBridge, a as createFocusInlineTextMessage, b as createUpdateBlockTranslationMessage } from "./bridge-
|
|
10
|
-
import { T as TranslationContext } from "./juo-workflow-
|
|
7
|
+
import { p as injectContext, E, x as ContextRoot } from "./theme-state-D4n_2n_h.js";
|
|
8
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-Cy6c9p75.js";
|
|
9
|
+
import { c as createEditorBridge, a as createFocusInlineTextMessage, b as createUpdateBlockTranslationMessage } from "./bridge-D-0V6_BT.js";
|
|
10
|
+
import { T as TranslationContext } from "./juo-workflow-ComG9rLp.js";
|
|
11
11
|
const _InlineText = class _InlineText extends HTMLElement {
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
@@ -4,9 +4,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import { p as injectContext, E, x as ContextRoot } from "./theme-state-
|
|
8
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-
|
|
9
|
-
import { T as TranslationContext } from "./juo-workflow-
|
|
7
|
+
import { p as injectContext, E, x as ContextRoot } from "./theme-state-D4n_2n_h.js";
|
|
8
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-Cy6c9p75.js";
|
|
9
|
+
import { T as TranslationContext } from "./juo-workflow-ComG9rLp.js";
|
|
10
10
|
class InlineText extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|