@juo/blocks 1.10.0 → 1.10.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.
- package/dist/{ExtensionRoot-C7tcvV-n.js → ExtensionRoot-9XfhG8YM.js} +1 -3
- package/dist/block.d.ts.map +1 -1
- package/dist/core.js +31 -32
- package/dist/editor/handler.d.ts +1 -1
- package/dist/editor/handler.d.ts.map +1 -1
- package/dist/editor.js +1 -3
- package/dist/juo-workflow-CkyZRq60.js +1667 -0
- package/dist/utils/editor.d.ts +18 -0
- package/dist/utils/editor.d.ts.map +1 -0
- package/dist/utils/editor.test.d.ts +2 -0
- package/dist/utils/editor.test.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/vue/block.d.ts +2 -2
- package/dist/vue/block.d.ts.map +1 -1
- package/dist/vue.js +3 -4
- package/dist/web-components-editor.js +2 -3
- package/dist/web-components-runtime.js +2 -3
- package/package.json +1 -1
- package/dist/block-WoHZvF51.js +0 -858
- package/dist/juo-workflow-DRauDEnU.js +0 -617
- package/dist/theme-state-CzXQGOTk.js +0 -202
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects whether a block is rendering inside an **editor preview** (the
|
|
3
|
+
* blocks visual editor or the Shopify theme editor) rather than the live
|
|
4
|
+
* storefront.
|
|
5
|
+
*
|
|
6
|
+
* Both editors load the customer portal in an iframe whose URL carries
|
|
7
|
+
* `?editor=true` (blocks editor: `blocks/editor/src/pages/Editor.vue`; theme
|
|
8
|
+
* editor: same param), and the param is persisted across client-side
|
|
9
|
+
* navigation and SSR redirects (`BlocksInitializer.vue`,
|
|
10
|
+
* `customer-portal/server.ts`).
|
|
11
|
+
*
|
|
12
|
+
* Prefer this over an iframe-topology check (`window.parent !== window`):
|
|
13
|
+
* that also fires for any non-editor embedding (app embeds, third-party
|
|
14
|
+
* wrappers), which would wrongly suppress storefront behavior. The explicit
|
|
15
|
+
* `?editor=true` signal only appears when an editor intends a preview.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isEditorPreview(): boolean;
|
|
18
|
+
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/utils/editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAGzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.test.d.ts","sourceRoot":"","sources":["../../src/utils/editor.test.ts"],"names":[],"mappings":""}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,OAAO,IAAI;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,IAAI,IAAI;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpE,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,MAAM,MAAM,Y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AC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,cAAc,UAAU,CAAC"}
|
package/dist/vue/block.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { App, Component } from 'vue';
|
|
2
|
-
import { BlockInstance } from '../main.ts';
|
|
3
|
-
export { hasRenderedContent }
|
|
2
|
+
import { BlockInstance, hasRenderedContent } from '../main.ts';
|
|
3
|
+
export { hasRenderedContent };
|
|
4
4
|
export declare function createVueRenderer(component: Component, options?: {
|
|
5
5
|
hostApp?: App;
|
|
6
6
|
}): (block: BlockInstance) => HTMLElement;
|
package/dist/vue/block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/vue/block.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAGR,SAAS,EAUV,MAAM,KAAK,CAAC;AACb,OAAO,
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/vue/block.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAGR,SAAS,EAUV,MAAM,KAAK,CAAC;AACb,OAAO,EAEL,aAAa,EAEb,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AA2B9B,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,WAuCZ,aAAa,iBA6D7B;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,EACpB,EAAE,UAAiB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,yCAoCrD"}
|
package/dist/vue.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { customRef, toValue, watchEffect, defineComponent, ref, getCurrentInstance, onMounted, provide, h, renderSlot, inject, computed, useHost, defineCustomElement, triggerRef, render, shallowRef } from "vue";
|
|
2
|
-
import { effect, signal, injectContext, provideContext, createCeRenderer } from "@juo/blocks";
|
|
3
|
-
import {
|
|
4
|
-
import { n } from "./block-WoHZvF51.js";
|
|
2
|
+
import { effect, signal, injectContext, provideContext, createCeRenderer, attachEmptyTracking } from "@juo/blocks";
|
|
3
|
+
import { hasRenderedContent } from "@juo/blocks";
|
|
5
4
|
import { c as createRegisterBlockTranslationKeysMessage, a as createEditorBridge } from "./bridge-w5KQ-czl.js";
|
|
6
5
|
const signalsMap = /* @__PURE__ */ new WeakMap();
|
|
7
6
|
function toSignal(ref2) {
|
|
@@ -291,7 +290,7 @@ export {
|
|
|
291
290
|
ContextProvider,
|
|
292
291
|
createVueCeRenderer,
|
|
293
292
|
createVueRenderer,
|
|
294
|
-
|
|
293
|
+
hasRenderedContent,
|
|
295
294
|
toRef,
|
|
296
295
|
toSignal,
|
|
297
296
|
useBlockId,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import {
|
|
5
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-
|
|
4
|
+
import { z as injectContext, E, b as TranslationContext, M as ContextRoot } from "./juo-workflow-CkyZRq60.js";
|
|
5
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-9XfhG8YM.js";
|
|
6
6
|
import { a as createEditorBridge, b as createFocusInlineTextMessage, d as createUpdateBlockTranslationMessage } from "./bridge-w5KQ-czl.js";
|
|
7
|
-
import { T as TranslationContext } from "./juo-workflow-DRauDEnU.js";
|
|
8
7
|
const _InlineText = class _InlineText extends HTMLElement {
|
|
9
8
|
constructor() {
|
|
10
9
|
super();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import {
|
|
5
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-
|
|
6
|
-
import { T as TranslationContext } from "./juo-workflow-DRauDEnU.js";
|
|
4
|
+
import { z as injectContext, b as TranslationContext, E, M as ContextRoot } from "./juo-workflow-CkyZRq60.js";
|
|
5
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-9XfhG8YM.js";
|
|
7
6
|
class InlineText extends HTMLElement {
|
|
8
7
|
constructor() {
|
|
9
8
|
super(...arguments);
|