@juo/blocks 1.4.6 → 1.5.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-CoDMQ-Gw.js → ExtensionRoot--ykEAINN.js} +1 -1
- package/dist/{bridge-B8cVa2-2.js → bridge-BbG-fSU2.js} +20 -2
- package/dist/core.js +6 -6
- package/dist/editor/bridge.d.ts.map +1 -1
- package/dist/editor/components.d.ts.map +1 -1
- package/dist/editor/main.d.ts.map +1 -1
- package/dist/editor.js +43 -7
- package/dist/flows/WorkflowService.d.ts +2 -0
- package/dist/flows/WorkflowService.d.ts.map +1 -1
- package/dist/{juo-workflow-ZGS5rbZi.js → juo-workflow-CEJOM_bA.js} +15 -5
- package/dist/preact.js +1 -1
- package/dist/react.js +1 -1
- package/dist/vue.js +1 -1
- package/dist/web-components-editor.js +3 -3
- package/dist/web-components-runtime.js +2 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { signal, effect, createBlockInstance } from "@juo/blocks";
|
|
5
5
|
import { reportBlockWarning, reportBlockError } from "./observability.js";
|
|
6
6
|
import { d, v as subscribeContext, T as ThemeStateContext, E, y as withWrapper, x as n, b as backfillInstanceDefaults, p as isStubDefinition, q as onRegisterBlock } from "./theme-state-D3w_B6gQ.js";
|
|
7
|
-
import "./juo-workflow-
|
|
7
|
+
import "./juo-workflow-CEJOM_bA.js";
|
|
8
8
|
class Block extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
@@ -269,12 +269,22 @@ function createEditorBridge() {
|
|
|
269
269
|
if (!blockWrapper && isEditorUI) {
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
+
if (blockWrapper && isWorkflowPreview) {
|
|
273
|
+
const inOverlay = blockWrapper.closest('juo-extension-root[surface="overlay"]') !== null;
|
|
274
|
+
if (!inOverlay) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
272
278
|
const clickedBlockId = (blockWrapper == null ? void 0 : blockWrapper.getAttribute("data-block-id")) || null;
|
|
279
|
+
const newBlockId = clickedBlockId || null;
|
|
280
|
+
const isNewSelection = newBlockId !== selectedBlockId.value;
|
|
281
|
+
if (isWorkflowPreview && !clickedBlockId) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
273
284
|
if (clickedBlockId && clickedBlockId === selectedBlockId.value) {
|
|
274
285
|
return;
|
|
275
286
|
}
|
|
276
|
-
|
|
277
|
-
if (newBlockId !== selectedBlockId.value) {
|
|
287
|
+
if (isNewSelection) {
|
|
278
288
|
const message = createSelectBlockMessage(
|
|
279
289
|
{ blockId: newBlockId },
|
|
280
290
|
newBlockId || void 0
|
|
@@ -397,6 +407,14 @@ function createEditorBridge() {
|
|
|
397
407
|
});
|
|
398
408
|
}
|
|
399
409
|
const isEditorMode = window.parent !== window;
|
|
410
|
+
const isWorkflowPreview = (() => {
|
|
411
|
+
try {
|
|
412
|
+
const params = new URLSearchParams(window.location.search);
|
|
413
|
+
return params.get("workflow-mode") === "true";
|
|
414
|
+
} catch {
|
|
415
|
+
return false;
|
|
416
|
+
}
|
|
417
|
+
})();
|
|
400
418
|
let ghostScrollStyleEl = null;
|
|
401
419
|
let ghostScrollObserver = null;
|
|
402
420
|
let suppressScrollReport = false;
|
package/dist/core.js
CHANGED
|
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { c as createContext, d, w, r as registerBlock, E, u } from "./theme-state-D3w_B6gQ.js";
|
|
5
5
|
import { B, C, a, D, S, T, b, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, v, x, y } from "./theme-state-D3w_B6gQ.js";
|
|
6
|
-
import { T as T2, W, c, a as a2, b as b2, g as g2, h as h2 } from "./juo-workflow-
|
|
6
|
+
import { T as T2, W, c, a as a2, b as b2, g as g2, h as h2 } from "./juo-workflow-CEJOM_bA.js";
|
|
7
7
|
import { reportBlockWarning, reportBlockError } from "./observability.js";
|
|
8
8
|
function createState() {
|
|
9
9
|
const discountCode = d(null);
|
|
@@ -1067,14 +1067,14 @@ const MOCK_FLOWS = {
|
|
|
1067
1067
|
]
|
|
1068
1068
|
},
|
|
1069
1069
|
{
|
|
1070
|
-
stepId: "step-offer-
|
|
1071
|
-
actionType: "
|
|
1070
|
+
stepId: "step-offer-delay",
|
|
1071
|
+
actionType: "offer_delay",
|
|
1072
1072
|
actionConfig: {
|
|
1073
|
-
headline: "
|
|
1074
|
-
description: "You can
|
|
1073
|
+
headline: "Delay next delivery?",
|
|
1074
|
+
description: "You can delay your next delivery and resume later."
|
|
1075
1075
|
},
|
|
1076
1076
|
availableResponses: [
|
|
1077
|
-
{ type: "accepted", label: "
|
|
1077
|
+
{ type: "accepted", label: "Delay next delivery" },
|
|
1078
1078
|
{ type: "declined", label: "No thanks" }
|
|
1079
1079
|
]
|
|
1080
1080
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/editor/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EAGd,MAAM,YAAY,CAAC;AAWpB,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,MAAM,WAAW,UAAU,CACzB,MAAM,GAAG,OAAO,EAChB,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAElC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,QAAQ,CAAC;CACnB;AAED,MAAM,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AAC,QAAQ,GAAG,OAAO,EACpC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,CACR,MAAM,EAAE,UAAU,CAChB,kBAAkB,CAAC,QAAQ,CAAC,EAC5B,oBAAoB,CAAC,QAAQ,CAAC,CAC/B,GAAG,IAAI,KACL,IAAI,GACR;QAAE,WAAW,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAC/B,iBAAiB,EAAE,CACjB,OAAO,EAAE,YAAY,EACrB,EAAE,EAAE,MAAM,KACP,OAAO,CAAC;QAAE,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACzC,gBAAgB,EAAE,CAChB,OAAO,EAAE,YAAY,EACrB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,KAAK,EAAE,KACZ,IAAI,CAAC;IACV,2BAA2B,EAAE,CAC3B,MAAM,EAAE,MAAM,KACX,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IACpC,mBAAmB,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IACjD;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAID;;;GAGG;AACH,wBAAgB,eAAe,IAAI,YAAY,GAAG,IAAI,CAErD;AAED,wBAAgB,kBAAkB,IAAI,YAAY,CAgcjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/editor/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/editor/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAiQ9C,qBAAa,YAAa,SAAQ,WAAW;IAC3C,OAAO,CAAC,KAAK,CAA8B;IAC3C,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,uBAAuB,CAA0C;IAEzE,MAAM,KAAK,kBAAkB,aAE5B;;IASD,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,aAAa;IAiFrB,iBAAiB;IA+BjB,oBAAoB;IAUpB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,QAAQ;IAahB,OAAO,CAAC,SAAS;IAWjB,QAAQ,CAAC,KAAK,EAAE,aAAa;IAQ7B,OAAO,CAAC,iBAAiB;IASzB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,iBAAiB;CAmD1B;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,0BAA0B,EAAE,YAAY,CAAC;KAC1C;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/editor/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAGnB,MAAM,aAAa,CAAC;AAQrB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAoD7B;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE;IAAE,aAAa,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAE,GAC7D,OAAO,CAAC,MAAM,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/editor/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAGnB,MAAM,aAAa,CAAC;AAQrB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAoD7B;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE;IAAE,aAAa,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAE,GAC7D,OAAO,CAAC,MAAM,IAAI,CAAC,CA+CrB"}
|
package/dist/editor.js
CHANGED
|
@@ -1,9 +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 { a as createEditorBridge, f as createRemoveBlockMessage, g as createRegisterBlocksMessage, h as createRegisterRoutesMessage } from "./bridge-
|
|
6
|
-
import { i, b, j, k, l, m, n, c, o, p, q, r, s, e, t, u, v, w, d, x, y, z, A } from "./bridge-
|
|
4
|
+
import { onRegisterBlock, getDefinedBlocks } from "@juo/blocks";
|
|
5
|
+
import { a as createEditorBridge, f as createRemoveBlockMessage, g as createRegisterBlocksMessage, h as createRegisterRoutesMessage } from "./bridge-BbG-fSU2.js";
|
|
6
|
+
import { i, b, j, k, l, m, n, c, o, p, q, r, s, e, t, u, v, w, d, x, y, z, A } from "./bridge-BbG-fSU2.js";
|
|
7
7
|
import { g as createBlockInstanceFromObject, n as indexOverrides } from "./theme-state-D3w_B6gQ.js";
|
|
8
8
|
function createEditorHandler(options) {
|
|
9
9
|
const { themeState, onBlockSelection } = options;
|
|
@@ -296,6 +296,11 @@ const styles = `
|
|
|
296
296
|
:host {
|
|
297
297
|
display: block;
|
|
298
298
|
position: relative;
|
|
299
|
+
/* Re-enable hit-testing on every wrapper so that an inactive ancestor
|
|
300
|
+
* wrapper's slot-host (pointer-events: none) doesn't make this nested
|
|
301
|
+
* wrapper unselectable. pointer-events: auto on a descendant overrides
|
|
302
|
+
* an ancestor's pointer-events: none for that descendant. */
|
|
303
|
+
pointer-events: auto;
|
|
299
304
|
}
|
|
300
305
|
|
|
301
306
|
.block-wrapper {
|
|
@@ -367,6 +372,20 @@ const styles = `
|
|
|
367
372
|
z-index: 100;
|
|
368
373
|
}
|
|
369
374
|
|
|
375
|
+
/*
|
|
376
|
+
* Inactive blocks: disable hit-testing on the slotted block content so that
|
|
377
|
+
* 1. clicks on interactive elements inside the block don't trigger their
|
|
378
|
+
* default behavior (the click falls through to the wrapper, which the
|
|
379
|
+
* global click handler in bridge.ts uses to drive selection), and
|
|
380
|
+
* 2. the cursor / hover styles / focus rings inside the block don't
|
|
381
|
+
* advertise interactivity that isn't actually available.
|
|
382
|
+
* The wrapper itself, the chrome, and the title bar stay interactive
|
|
383
|
+
* because they're siblings of the slot-host, not descendants.
|
|
384
|
+
*/
|
|
385
|
+
:host(:not(.active)) .block-wrapper__slot-host {
|
|
386
|
+
pointer-events: none;
|
|
387
|
+
}
|
|
388
|
+
|
|
370
389
|
/*
|
|
371
390
|
* Wraps the slotted block content. Stays as a plain in-flow div when
|
|
372
391
|
* inactive (no stacking context). Only when the host is .active do we
|
|
@@ -377,6 +396,7 @@ const styles = `
|
|
|
377
396
|
:host(.active) .block-wrapper__slot-host {
|
|
378
397
|
position: relative;
|
|
379
398
|
z-index: 101;
|
|
399
|
+
pointer-events: auto;
|
|
380
400
|
}
|
|
381
401
|
|
|
382
402
|
/*
|
|
@@ -612,6 +632,21 @@ class BlockWrapper extends HTMLElement {
|
|
|
612
632
|
".block-wrapper__name"
|
|
613
633
|
);
|
|
614
634
|
if (name) name.style.visibility = "hidden";
|
|
635
|
+
const deleteBtn = this.shadowRoot.querySelector(
|
|
636
|
+
".block-wrapper__menu-item--danger"
|
|
637
|
+
);
|
|
638
|
+
if (deleteBtn) deleteBtn.style.display = "none";
|
|
639
|
+
}
|
|
640
|
+
const isWorkflowPreview = (() => {
|
|
641
|
+
try {
|
|
642
|
+
const params = new URLSearchParams(window.location.search);
|
|
643
|
+
return params.get("workflow-mode") === "true";
|
|
644
|
+
} catch {
|
|
645
|
+
return false;
|
|
646
|
+
}
|
|
647
|
+
})();
|
|
648
|
+
if (isWorkflowPreview && !isInOverlay) {
|
|
649
|
+
this.style.pointerEvents = "none";
|
|
615
650
|
}
|
|
616
651
|
}
|
|
617
652
|
disconnectedCallback() {
|
|
@@ -763,10 +798,7 @@ async function setupEditorMode(deps) {
|
|
|
763
798
|
const routes = Object.fromEntries(
|
|
764
799
|
routerService.getPages().map((p2) => [p2.path, { block: p2.block, title: p2.title }])
|
|
765
800
|
);
|
|
766
|
-
const
|
|
767
|
-
editor.sendMessage(createRegisterBlocksMessage({ blocks }));
|
|
768
|
-
editor.sendMessage(createRegisterRoutesMessage({ routes }));
|
|
769
|
-
onRegisterBlock((_, block) => {
|
|
801
|
+
const unsubscribeRegister = onRegisterBlock((_, block) => {
|
|
770
802
|
void serializeBlock(block).then(
|
|
771
803
|
(serialized) => editor.sendMessage(
|
|
772
804
|
createRegisterBlocksMessage({
|
|
@@ -775,8 +807,12 @@ async function setupEditorMode(deps) {
|
|
|
775
807
|
)
|
|
776
808
|
);
|
|
777
809
|
});
|
|
810
|
+
const blocks = await Promise.all(getDefinedBlocks().map(serializeBlock));
|
|
811
|
+
editor.sendMessage(createRegisterBlocksMessage({ blocks }));
|
|
812
|
+
editor.sendMessage(createRegisterRoutesMessage({ routes }));
|
|
778
813
|
return () => {
|
|
779
814
|
padStyle.remove();
|
|
815
|
+
unsubscribeRegister();
|
|
780
816
|
unsubscribe();
|
|
781
817
|
editor.destroy();
|
|
782
818
|
};
|
|
@@ -74,6 +74,8 @@ export interface WorkflowState {
|
|
|
74
74
|
/** Persisted completion metadata: outcome and the End node reached. */
|
|
75
75
|
completionData: WorkflowCompletionData | null;
|
|
76
76
|
dryRun: boolean | null;
|
|
77
|
+
/** Label of the first poll response submitted in this flow run. */
|
|
78
|
+
firstPollReason: string | null;
|
|
77
79
|
}
|
|
78
80
|
/** Available steps metadata (for rendering and editor) */
|
|
79
81
|
export interface WorkflowStepInfo {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowService.d.ts","sourceRoot":"","sources":["../../src/flows/WorkflowService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG7E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAS5C,eAAO,MAAM,sBAAsB;;
|
|
1
|
+
{"version":3,"file":"WorkflowService.d.ts","sourceRoot":"","sources":["../../src/flows/WorkflowService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG7E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAS5C,eAAO,MAAM,sBAAsB;;eAojBd,cAAc,CAAC,aAAa,CAAC;QAE9C;qFAC6E;;;;;;;;;4BAcjE,MAAM,WACP,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eACnB,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;8BAyDA,MAAM,iBACL,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,IAAI,CAAC;kBAgCA,OAAO,CAAC,IAAI,CAAC;iBA4CpB,IAAI;mBAqBI,OAAO,CAAC,IAAI,CAAC;;CAnuBmB,CAAC;AAMtD;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,kBAAkB,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,WAAW,EAAE,IAAI,CAAC;IAClB,wDAAwD;IACxD,SAAS,CAAC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CAC3B;AAMD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,2BAA2B;WAkVlD,cAAc,CAAC,aAAa,CAAC;IAE9C;iFAC6E;;;;;;;;;wBAcjE,MAAM,WACP,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eACnB,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;0BAyDA,MAAM,iBACL,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,IAAI,CAAC;cAgCA,OAAO,CAAC,IAAI,CAAC;aA4CpB,IAAI;eAqBI,OAAO,CAAC,IAAI,CAAC;EAsBjC;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { c as createContext, d, E, m as getDefinedBlocks, e as createBlockInstance, w, r as registerBlock, k as defineBlock, v as subscribeContext } from "./theme-state-D3w_B6gQ.js";
|
|
5
|
-
import { a as createEditorBridge, e as createSelectBlockMessage } from "./bridge-
|
|
5
|
+
import { a as createEditorBridge, e as createSelectBlockMessage } from "./bridge-BbG-fSU2.js";
|
|
6
6
|
const TranslationContext = createContext("translation");
|
|
7
7
|
function toStringRecord(input) {
|
|
8
8
|
if (input == null) return {};
|
|
@@ -131,7 +131,8 @@ function createWorkflowService(deps) {
|
|
|
131
131
|
invalidatedResources: [],
|
|
132
132
|
outcome: null,
|
|
133
133
|
completionData: null,
|
|
134
|
-
dryRun: null
|
|
134
|
+
dryRun: null,
|
|
135
|
+
firstPollReason: null
|
|
135
136
|
});
|
|
136
137
|
const _backendInteractionId = d(null);
|
|
137
138
|
const _registeredRootBlocks = /* @__PURE__ */ new Set();
|
|
@@ -239,7 +240,8 @@ function createWorkflowService(deps) {
|
|
|
239
240
|
result: null,
|
|
240
241
|
invalidatedResources: [],
|
|
241
242
|
outcome: null,
|
|
242
|
-
completionData: null
|
|
243
|
+
completionData: null,
|
|
244
|
+
firstPollReason: null
|
|
243
245
|
});
|
|
244
246
|
}
|
|
245
247
|
}
|
|
@@ -376,7 +378,8 @@ function createWorkflowService(deps) {
|
|
|
376
378
|
error: null,
|
|
377
379
|
flowParams: context,
|
|
378
380
|
flowType,
|
|
379
|
-
dryRun: isDryRun
|
|
381
|
+
dryRun: isDryRun,
|
|
382
|
+
firstPollReason: null
|
|
380
383
|
});
|
|
381
384
|
try {
|
|
382
385
|
const data = await api.start(
|
|
@@ -423,6 +426,12 @@ function createWorkflowService(deps) {
|
|
|
423
426
|
responseData,
|
|
424
427
|
runVersion ?? void 0
|
|
425
428
|
);
|
|
429
|
+
if (_state.value.firstPollReason == null && currentInteraction2.actionType === "poll") {
|
|
430
|
+
const reason = responseData == null ? void 0 : responseData.reason;
|
|
431
|
+
if (typeof reason === "string" && reason.length > 0) {
|
|
432
|
+
updateState({ firstPollReason: reason });
|
|
433
|
+
}
|
|
434
|
+
}
|
|
426
435
|
handleFlowResponse(data);
|
|
427
436
|
} catch (error) {
|
|
428
437
|
handleError(error);
|
|
@@ -474,7 +483,8 @@ function createWorkflowService(deps) {
|
|
|
474
483
|
flowParams: null,
|
|
475
484
|
invalidatedResources: [],
|
|
476
485
|
outcome: null,
|
|
477
|
-
completionData: null
|
|
486
|
+
completionData: null,
|
|
487
|
+
firstPollReason: null
|
|
478
488
|
});
|
|
479
489
|
},
|
|
480
490
|
async refresh() {
|
package/dist/preact.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useState, useRef, useEffect, useContext as useContext$1, useMemo } from
|
|
|
6
6
|
import { g as getSignalValue, s as setSignalValue, w as wrapContext, c as createSlotChildren } from "./block-VhmfGB3N.js";
|
|
7
7
|
import { t } from "./block-VhmfGB3N.js";
|
|
8
8
|
import { createContext, h, render } from "preact";
|
|
9
|
-
import { a as createEditorBridge } from "./bridge-
|
|
9
|
+
import { a as createEditorBridge } from "./bridge-BbG-fSU2.js";
|
|
10
10
|
function toState(signal) {
|
|
11
11
|
const [value, setValue] = useState(() => getSignalValue(signal));
|
|
12
12
|
const disposeRef = useRef(null);
|
package/dist/react.js
CHANGED
|
@@ -6,7 +6,7 @@ import React, { useSyncExternalStore, createContext, useState, useContext as use
|
|
|
6
6
|
import { g as getSignalValue, s as setSignalValue, w as wrapContext, c as createSlotChildren } from "./block-VhmfGB3N.js";
|
|
7
7
|
import { t } from "./block-VhmfGB3N.js";
|
|
8
8
|
import { createRoot } from "react-dom/client";
|
|
9
|
-
import { a as createEditorBridge } from "./bridge-
|
|
9
|
+
import { a as createEditorBridge } from "./bridge-BbG-fSU2.js";
|
|
10
10
|
function toState(signal) {
|
|
11
11
|
const subscribe = (callback) => {
|
|
12
12
|
const dispose = effect(() => {
|
package/dist/vue.js
CHANGED
|
@@ -1,6 +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
2
|
import { effect, signal, injectContext, provideContext, createCeRenderer } from "@juo/blocks";
|
|
3
|
-
import { c as createRegisterBlockTranslationKeysMessage, a as createEditorBridge } from "./bridge-
|
|
3
|
+
import { c as createRegisterBlockTranslationKeysMessage, a as createEditorBridge } from "./bridge-BbG-fSU2.js";
|
|
4
4
|
const signalsMap = /* @__PURE__ */ new WeakMap();
|
|
5
5
|
function toSignal(ref2) {
|
|
6
6
|
if (!signalsMap.has(ref2)) {
|
|
@@ -2,9 +2,9 @@ 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
4
|
import { o as injectContext, E, z as ContextRoot } from "./theme-state-D3w_B6gQ.js";
|
|
5
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot
|
|
6
|
-
import { a as createEditorBridge, b as createFocusInlineTextMessage, d as createUpdateBlockTranslationMessage } from "./bridge-
|
|
7
|
-
import { T as TranslationContext } from "./juo-workflow-
|
|
5
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot--ykEAINN.js";
|
|
6
|
+
import { a as createEditorBridge, b as createFocusInlineTextMessage, d as createUpdateBlockTranslationMessage } from "./bridge-BbG-fSU2.js";
|
|
7
|
+
import { T as TranslationContext } from "./juo-workflow-CEJOM_bA.js";
|
|
8
8
|
const _InlineText = class _InlineText extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
10
10
|
super();
|
|
@@ -2,8 +2,8 @@ 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
4
|
import { o as injectContext, E, z as ContextRoot } from "./theme-state-D3w_B6gQ.js";
|
|
5
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot
|
|
6
|
-
import { T as TranslationContext } from "./juo-workflow-
|
|
5
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot--ykEAINN.js";
|
|
6
|
+
import { T as TranslationContext } from "./juo-workflow-CEJOM_bA.js";
|
|
7
7
|
class InlineText extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|