@juo/blocks 1.23.0 → 1.24.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-DfpvN94s.js → ExtensionRoot-Bn5jOdWZ.js} +1 -1
- package/dist/block.d.ts +2 -0
- package/dist/block.d.ts.map +1 -1
- package/dist/core.js +310 -73
- package/dist/{css-runtime-DTiXcYSs.js → css-runtime-BRJXhRDp.js} +42 -37
- package/dist/custom/json.d.ts +4 -0
- package/dist/custom/json.d.ts.map +1 -0
- package/dist/custom/locales.d.ts +7 -0
- package/dist/custom/locales.d.ts.map +1 -0
- package/dist/custom/renderer.d.ts +7 -0
- package/dist/custom/renderer.d.ts.map +1 -0
- package/dist/custom/runtime.d.ts +7 -0
- package/dist/custom/runtime.d.ts.map +1 -0
- package/dist/custom/runtime.test.d.ts +2 -0
- package/dist/custom/runtime.test.d.ts.map +1 -0
- package/dist/custom/types.d.ts +4 -0
- package/dist/custom/types.d.ts.map +1 -1
- package/dist/editor/main.d.ts.map +1 -1
- package/dist/editor.js +10 -5
- package/dist/{gridstack-adapter-BZWybRw1.js → gridstack-adapter-ByNMo9k7.js} +2 -2
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/observability.d.ts +2 -0
- package/dist/observability.d.ts.map +1 -1
- package/dist/observability.js +5 -0
- package/dist/{project-gridstack-C2cSYRMx.js → project-gridstack-4jezmlDO.js} +1 -1
- package/dist/registry.d.ts +7 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/theme-state.d.ts +1 -0
- package/dist/theme-state.d.ts.map +1 -1
- package/dist/web-components-editor.js +3 -3
- package/dist/web-components-runtime.js +2 -2
- package/package.json +1 -1
|
@@ -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 { signal, effect, createBlockInstance, layoutSystemEnabled, untracked } from "@juo/blocks";
|
|
5
5
|
import { reportBlockWarning, reportBlockError } from "./observability.js";
|
|
6
|
-
import { L as LAYOUT_SCOPE_ATTR, b as buildGridLayout, a as isStubDefinition, w as withWrapper, s as subscribeContext, c as ThemeStateContext, d as backfillInstanceDefaults, o as onRegisterBlock } from "./css-runtime-
|
|
6
|
+
import { L as LAYOUT_SCOPE_ATTR, b as buildGridLayout, a as isStubDefinition, w as withWrapper, s as subscribeContext, c as ThemeStateContext, d as backfillInstanceDefaults, o as onRegisterBlock } from "./css-runtime-BRJXhRDp.js";
|
|
7
7
|
import { g as getInstrumentation } from "./index-JSv6UH_o.js";
|
|
8
8
|
class Block extends HTMLElement {
|
|
9
9
|
constructor() {
|
package/dist/block.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ export type BlockDefinition<T = unknown> = {
|
|
|
72
72
|
initialValue: T | (() => T);
|
|
73
73
|
render: BlockRenderer;
|
|
74
74
|
__stub?: boolean;
|
|
75
|
+
/** Content hash of a custom block's built file, set by the custom block runtime from the manifest entry and read by the manifest loader. */
|
|
76
|
+
hash?: string;
|
|
75
77
|
presets?: BlockPresets;
|
|
76
78
|
locales?: {
|
|
77
79
|
/** Locale codes supported by this block (e.g. ["en", "de", "nl"]). */
|
package/dist/block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../src/block.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAUpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAkB7D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,EACjB,KAAK,CAAC,EAAE,UAAU,GACjB,MAAM,IAAI,CAmBZ;AAED,KAAK,MAA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EAAE,MAAM,EACZ,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/C,aAAa,CA2Cf;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAczE;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAUxE"}
|
package/dist/core.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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 { f as createContext, g as d, h as w, j as registerBlock, E,
|
|
5
|
-
import { B,
|
|
4
|
+
import { f as createContext, g as d, h as w, j as registerBlock, n as normalizeLocale, k as attachEmptyTracking, E, T as TranslationContext, i as injectContext, l as defineBlock, u, m as getDefinedBlocks, p as createBlockInstance, s as subscribeContext, G as GRID_V1_ENGINE_ID, q as clampRect, t as applyFillExpansion, v as compactItems, x as findFreeRect, D as DEFAULT_GRID } from "./css-runtime-BRJXhRDp.js";
|
|
5
|
+
import { B, y, z, A, F, L, P, S, c, d as d2, b, H, I, J, K, N, O, Q, R, U, V, W, X, Y, Z, _, $, a, a0, a1, o, a2, a3, a4, e, a5, r, a6, a7, a8, w as w2 } from "./css-runtime-BRJXhRDp.js";
|
|
6
6
|
import { reportBlockWarning, reportBlockError } from "./observability.js";
|
|
7
7
|
import { a as createEditorBridge, D as createSelectBlockMessage } from "./bridge-4Eq-G73Z.js";
|
|
8
|
-
import { p } from "./project-gridstack-
|
|
8
|
+
import { p } from "./project-gridstack-4jezmlDO.js";
|
|
9
9
|
import { clearLayoutModeAdapter, getLayoutModeAdapter, registerLayoutModeAdapter } from "./layout-mode-adapter-BBd4JRQd.js";
|
|
10
10
|
const SUPPORTED_UI_LANGUAGES = [
|
|
11
11
|
{ code: "cs", label: "Czech" },
|
|
@@ -136,12 +136,20 @@ function waitForDevBlocksUrl(timeout = 5e3) {
|
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
async function loadBlockRegistry(options = {}) {
|
|
139
|
+
var _a;
|
|
139
140
|
const { distributedRegistryUrl } = options;
|
|
141
|
+
const after = (_a = options.after) == null ? void 0 : _a.then(
|
|
142
|
+
() => {
|
|
143
|
+
},
|
|
144
|
+
() => {
|
|
145
|
+
}
|
|
146
|
+
);
|
|
140
147
|
if (distributedRegistryUrl) {
|
|
141
148
|
await import(
|
|
142
149
|
/* @vite-ignore */
|
|
143
150
|
distributedRegistryUrl
|
|
144
|
-
).then((module) => {
|
|
151
|
+
).then(async (module) => {
|
|
152
|
+
await after;
|
|
145
153
|
if (typeof module !== "object" || module == null) {
|
|
146
154
|
reportBlockWarning("Distributed registry module is invalid", {
|
|
147
155
|
site: "registry.loadBlockRegistry",
|
|
@@ -177,6 +185,234 @@ async function loadBlockRegistry(options = {}) {
|
|
|
177
185
|
});
|
|
178
186
|
}
|
|
179
187
|
}
|
|
188
|
+
function toJson(value) {
|
|
189
|
+
const json = JSON.stringify(value);
|
|
190
|
+
return json === void 0 ? void 0 : JSON.parse(json);
|
|
191
|
+
}
|
|
192
|
+
function localeStrings(locales, locale) {
|
|
193
|
+
return locales[normalizeLocale(locale)] ?? locales.en ?? {};
|
|
194
|
+
}
|
|
195
|
+
const ELEMENT_NAME = "juo-custom-block";
|
|
196
|
+
class CustomBlockElement extends HTMLElement {
|
|
197
|
+
constructor() {
|
|
198
|
+
super(...arguments);
|
|
199
|
+
__publicField(this, "mount");
|
|
200
|
+
__publicField(this, "unmount");
|
|
201
|
+
}
|
|
202
|
+
connectedCallback() {
|
|
203
|
+
var _a;
|
|
204
|
+
if (!this.style.display) this.style.display = "block";
|
|
205
|
+
(_a = this.mount) == null ? void 0 : _a.call(this);
|
|
206
|
+
}
|
|
207
|
+
disconnectedCallback() {
|
|
208
|
+
queueMicrotask(() => {
|
|
209
|
+
var _a;
|
|
210
|
+
if (!this.isConnected) (_a = this.unmount) == null ? void 0 : _a.call(this);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function defineElement() {
|
|
215
|
+
if (customElements.get(ELEMENT_NAME) == null) {
|
|
216
|
+
customElements.define(ELEMENT_NAME, CustomBlockElement);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function errorBoundary(Component, reportError) {
|
|
220
|
+
return class ErrorBoundary extends Component {
|
|
221
|
+
constructor() {
|
|
222
|
+
super(...arguments);
|
|
223
|
+
__publicField(this, "state", { failed: false });
|
|
224
|
+
}
|
|
225
|
+
componentDidCatch(error) {
|
|
226
|
+
reportError(error);
|
|
227
|
+
this.setState({ failed: true });
|
|
228
|
+
}
|
|
229
|
+
render() {
|
|
230
|
+
return this.state.failed ? null : this.props.children;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function findTranslation(root) {
|
|
235
|
+
try {
|
|
236
|
+
return injectContext(root, TranslationContext);
|
|
237
|
+
} catch {
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function guardContext(root) {
|
|
242
|
+
root.addEventListener(
|
|
243
|
+
"context-request",
|
|
244
|
+
(event) => {
|
|
245
|
+
if (event.context !== TranslationContext) event.stopPropagation();
|
|
246
|
+
},
|
|
247
|
+
{ capture: true }
|
|
248
|
+
);
|
|
249
|
+
root.addEventListener(
|
|
250
|
+
"context-provide",
|
|
251
|
+
// A block must not replace a context the rest of the page reads.
|
|
252
|
+
(event) => event.stopPropagation(),
|
|
253
|
+
{ capture: true }
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
function createCustomBlockRenderer(entry, Block, createServices2, { h, render, Component }, report) {
|
|
257
|
+
defineElement();
|
|
258
|
+
const fallbackLocale = localeStrings(entry.locales, "en");
|
|
259
|
+
return (block) => {
|
|
260
|
+
const reportError = report("custom.render", block.id);
|
|
261
|
+
const ErrorBoundary = errorBoundary(Component, reportError);
|
|
262
|
+
const root = document.createElement(ELEMENT_NAME);
|
|
263
|
+
root.setAttribute("data-block-id", block.id);
|
|
264
|
+
root.setAttribute("data-block-type", block.type);
|
|
265
|
+
guardContext(root);
|
|
266
|
+
let disposeLocale = null;
|
|
267
|
+
let mounted = false;
|
|
268
|
+
let disposeEmptyTracking = null;
|
|
269
|
+
let subscriptions = null;
|
|
270
|
+
root.mount = () => {
|
|
271
|
+
if (mounted) return;
|
|
272
|
+
mounted = true;
|
|
273
|
+
disposeEmptyTracking = attachEmptyTracking(root);
|
|
274
|
+
const mountSubscriptions = subscriptions = /* @__PURE__ */ new Set();
|
|
275
|
+
const services = createServices2(mountSubscriptions);
|
|
276
|
+
const translation = findTranslation(root);
|
|
277
|
+
const t = (key) => translation != null ? translation.resolve(block.type, block.id, key) : fallbackLocale[key] ?? key;
|
|
278
|
+
const Host = () => Block(toJson(block.props ?? {}), { services, t });
|
|
279
|
+
const draw = () => {
|
|
280
|
+
try {
|
|
281
|
+
render(h(ErrorBoundary, { children: h(Host, null) }), root);
|
|
282
|
+
} catch (error) {
|
|
283
|
+
reportError(error);
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
if (translation == null) {
|
|
287
|
+
draw();
|
|
288
|
+
} else {
|
|
289
|
+
disposeLocale = E(() => {
|
|
290
|
+
void translation.locale.value;
|
|
291
|
+
draw();
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
root.unmount = () => {
|
|
296
|
+
if (!mounted) return;
|
|
297
|
+
mounted = false;
|
|
298
|
+
disposeLocale == null ? void 0 : disposeLocale();
|
|
299
|
+
disposeLocale = null;
|
|
300
|
+
try {
|
|
301
|
+
render(null, root);
|
|
302
|
+
} catch (error) {
|
|
303
|
+
reportError(error);
|
|
304
|
+
} finally {
|
|
305
|
+
if (subscriptions) {
|
|
306
|
+
subscriptions.disposed = true;
|
|
307
|
+
for (const unsubscribe of subscriptions) unsubscribe();
|
|
308
|
+
}
|
|
309
|
+
subscriptions = null;
|
|
310
|
+
disposeEmptyTracking == null ? void 0 : disposeEmptyTracking();
|
|
311
|
+
disposeEmptyTracking = null;
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
return root;
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
function snapshot(source, reportError, subscriptions) {
|
|
318
|
+
return Object.freeze({
|
|
319
|
+
// `peek`, so a `get()` during render does not subscribe the renderer's effect.
|
|
320
|
+
get: async () => toJson(source.peek()),
|
|
321
|
+
// A throwing callback would otherwise break the core write that triggered it.
|
|
322
|
+
subscribe: (callback) => {
|
|
323
|
+
if (subscriptions == null ? void 0 : subscriptions.disposed) return () => {
|
|
324
|
+
};
|
|
325
|
+
const unsubscribe = source.subscribe((value) => {
|
|
326
|
+
try {
|
|
327
|
+
callback(toJson(value));
|
|
328
|
+
} catch (error) {
|
|
329
|
+
reportError(error);
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
subscriptions == null ? void 0 : subscriptions.add(unsubscribe);
|
|
333
|
+
return () => {
|
|
334
|
+
subscriptions == null ? void 0 : subscriptions.delete(unsubscribe);
|
|
335
|
+
unsubscribe();
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
function createServices({ subscription, customer, router }, reportSubscribeError, subscriptions) {
|
|
341
|
+
return Object.freeze({
|
|
342
|
+
subscription: Object.freeze({
|
|
343
|
+
current: snapshot(
|
|
344
|
+
subscription.current,
|
|
345
|
+
reportSubscribeError,
|
|
346
|
+
subscriptions
|
|
347
|
+
),
|
|
348
|
+
getInstantOrderProducts: async (...args) => {
|
|
349
|
+
const result = await subscription.getInstantOrderProducts(...args);
|
|
350
|
+
if (result._tag === "Failure") return toJson(result);
|
|
351
|
+
const { paymentMethods: _paymentMethods, ...data } = result.data;
|
|
352
|
+
return toJson({ ...result, data });
|
|
353
|
+
},
|
|
354
|
+
// Only `{ variantId, quantity }` crosses, whatever else an item carries.
|
|
355
|
+
placeInstantOrder: async (subscriptionId, requestKey, items) => toJson(
|
|
356
|
+
await subscription.placeInstantOrder(
|
|
357
|
+
subscriptionId,
|
|
358
|
+
requestKey,
|
|
359
|
+
items.map(({ variantId, quantity }) => ({ variantId, quantity }))
|
|
360
|
+
)
|
|
361
|
+
),
|
|
362
|
+
addDiscount: async (subscriptionId, code) => toJson(await subscription.addDiscount(code, subscriptionId))
|
|
363
|
+
}),
|
|
364
|
+
customer: Object.freeze({
|
|
365
|
+
current: snapshot(customer.current, reportSubscribeError, subscriptions)
|
|
366
|
+
}),
|
|
367
|
+
router: Object.freeze({
|
|
368
|
+
push: async (to) => router.push(to)
|
|
369
|
+
})
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
function createLocales(entry) {
|
|
373
|
+
return {
|
|
374
|
+
supported: Object.keys(entry.locales),
|
|
375
|
+
load: async (locale) => localeStrings(entry.locales, locale)
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
const createCustomBlockRuntime = (entry, coreServices, _options) => {
|
|
379
|
+
const report = (site, blockId = "(none)") => (error) => reportBlockError(error, {
|
|
380
|
+
site,
|
|
381
|
+
block: { id: blockId, type: entry.key },
|
|
382
|
+
extra: { hash: entry.hash },
|
|
383
|
+
tags: { custom_version: entry.version }
|
|
384
|
+
});
|
|
385
|
+
const reportError = report("custom.reportError");
|
|
386
|
+
const reportSubscribeError = report("custom.subscribe");
|
|
387
|
+
const services = createServices(coreServices, reportSubscribeError);
|
|
388
|
+
return {
|
|
389
|
+
services,
|
|
390
|
+
// Key, group and metadata come from the server-built manifest entry;
|
|
391
|
+
// whatever the file passes besides its renderer is ignored.
|
|
392
|
+
defineBlock: ({ renderer }) => {
|
|
393
|
+
const definition = defineBlock(entry.key, {
|
|
394
|
+
displayName: entry.isDraft ? `${entry.displayName} · Draft` : entry.displayName,
|
|
395
|
+
group: "theme",
|
|
396
|
+
schema: entry.schema,
|
|
397
|
+
// A fresh copy per instance; `createBlockInstance` copies only the top level.
|
|
398
|
+
initialValue: () => structuredClone(entry.initialValue),
|
|
399
|
+
renderer,
|
|
400
|
+
locales: createLocales(entry)
|
|
401
|
+
});
|
|
402
|
+
definition.hash = entry.hash;
|
|
403
|
+
registerBlock(definition);
|
|
404
|
+
return definition;
|
|
405
|
+
},
|
|
406
|
+
createRenderer: (Block, preact) => createCustomBlockRenderer(
|
|
407
|
+
entry,
|
|
408
|
+
Block,
|
|
409
|
+
(subscriptions) => createServices(coreServices, reportSubscribeError, subscriptions),
|
|
410
|
+
preact,
|
|
411
|
+
report
|
|
412
|
+
),
|
|
413
|
+
reportError
|
|
414
|
+
};
|
|
415
|
+
};
|
|
180
416
|
function createCustomerService(options) {
|
|
181
417
|
const current = d(null);
|
|
182
418
|
const accountOrdersUrl = d(options.getAccountOrdersUrl());
|
|
@@ -1063,7 +1299,7 @@ function mapProduct(product, currencyCode) {
|
|
|
1063
1299
|
featuredImage: product.image == null ? null : { url: product.image.url, altText: product.image.altText ?? void 0 },
|
|
1064
1300
|
hasOnlyDefaultVariant: product.variants.length <= 1,
|
|
1065
1301
|
variants: {
|
|
1066
|
-
items: product.variants.map((
|
|
1302
|
+
items: product.variants.map((v) => mapVariant(v, currencyCode)),
|
|
1067
1303
|
pageInfo: {
|
|
1068
1304
|
hasNextPage: false,
|
|
1069
1305
|
hasPrevPage: false,
|
|
@@ -1167,14 +1403,14 @@ function createApiProductAdapter(fetcher, opts = { currencyCode: "USD" }) {
|
|
|
1167
1403
|
description: p2.description ?? "",
|
|
1168
1404
|
featuredImage: p2.featuredImage,
|
|
1169
1405
|
hasOnlyDefaultVariant: p2.hasOnlyDefaultVariant ?? (((_a = p2.variants) == null ? void 0 : _a.length) ?? 0) <= 1,
|
|
1170
|
-
variants: (p2.variants ?? []).map((
|
|
1171
|
-
id:
|
|
1172
|
-
availableForSale:
|
|
1173
|
-
title:
|
|
1174
|
-
currentPrice:
|
|
1175
|
-
basePrice:
|
|
1176
|
-
image:
|
|
1177
|
-
recurring:
|
|
1406
|
+
variants: (p2.variants ?? []).map((v) => ({
|
|
1407
|
+
id: v.id,
|
|
1408
|
+
availableForSale: v.availableForSale,
|
|
1409
|
+
title: v.title,
|
|
1410
|
+
currentPrice: v.currentPrice,
|
|
1411
|
+
basePrice: v.basePrice,
|
|
1412
|
+
image: v.image,
|
|
1413
|
+
recurring: v.recurring
|
|
1178
1414
|
}))
|
|
1179
1415
|
};
|
|
1180
1416
|
});
|
|
@@ -1199,14 +1435,14 @@ function createApiProductAdapter(fetcher, opts = { currencyCode: "USD" }) {
|
|
|
1199
1435
|
description: p2.description ?? "",
|
|
1200
1436
|
featuredImage: p2.featuredImage,
|
|
1201
1437
|
hasOnlyDefaultVariant: p2.hasOnlyDefaultVariant ?? (((_a = p2.variants) == null ? void 0 : _a.length) ?? 0) <= 1,
|
|
1202
|
-
variants: (p2.variants ?? []).map((
|
|
1203
|
-
id:
|
|
1204
|
-
availableForSale:
|
|
1205
|
-
title:
|
|
1206
|
-
currentPrice:
|
|
1207
|
-
basePrice:
|
|
1208
|
-
image:
|
|
1209
|
-
recurring:
|
|
1438
|
+
variants: (p2.variants ?? []).map((v) => ({
|
|
1439
|
+
id: v.id,
|
|
1440
|
+
availableForSale: v.availableForSale,
|
|
1441
|
+
title: v.title,
|
|
1442
|
+
currentPrice: v.currentPrice,
|
|
1443
|
+
basePrice: v.basePrice,
|
|
1444
|
+
image: v.image,
|
|
1445
|
+
recurring: v.recurring
|
|
1210
1446
|
}))
|
|
1211
1447
|
};
|
|
1212
1448
|
});
|
|
@@ -1611,7 +1847,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1611
1847
|
}
|
|
1612
1848
|
const currencyCode = ((_a = subscription.items[0]) == null ? void 0 : _a.price.currencyCode) ?? "USD";
|
|
1613
1849
|
const product = await ((_b = options.productAdapter) == null ? void 0 : _b.getByVariantId(item.variantId)) ?? await ((_c = options.productAdapter) == null ? void 0 : _c.getById(item.variantId)) ?? null;
|
|
1614
|
-
const variant = (product == null ? void 0 : product.variants.items.find((
|
|
1850
|
+
const variant = (product == null ? void 0 : product.variants.items.find((v) => v.id === item.variantId)) ?? (product == null ? void 0 : product.variants.items[0]);
|
|
1615
1851
|
const linePrice = ((_e = (_d = variant == null ? void 0 : variant.purchaseOptions) == null ? void 0 : _d[0]) == null ? void 0 : _e.price) ?? (variant == null ? void 0 : variant.price);
|
|
1616
1852
|
subscription.items.push({
|
|
1617
1853
|
id: `item_${Date.now()}_${subscription.items.length}`,
|
|
@@ -1636,7 +1872,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1636
1872
|
if (!subscription) {
|
|
1637
1873
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
1638
1874
|
}
|
|
1639
|
-
subscription.items = subscription.items.filter((
|
|
1875
|
+
subscription.items = subscription.items.filter((i) => i.id !== itemId);
|
|
1640
1876
|
subscription.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1641
1877
|
return { _tag: "Success", data: void 0 };
|
|
1642
1878
|
},
|
|
@@ -1646,7 +1882,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1646
1882
|
if (!subscription) {
|
|
1647
1883
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
1648
1884
|
}
|
|
1649
|
-
const item = subscription.items.find((
|
|
1885
|
+
const item = subscription.items.find((i) => i.id === lineId);
|
|
1650
1886
|
if (!item) {
|
|
1651
1887
|
return { _tag: "Failure", error: "Line item not found" };
|
|
1652
1888
|
}
|
|
@@ -1662,7 +1898,7 @@ function createMockSubscriptionAdapter(options = {}) {
|
|
|
1662
1898
|
if (!subscription) {
|
|
1663
1899
|
return { _tag: "Failure", error: "Subscription not found" };
|
|
1664
1900
|
}
|
|
1665
|
-
const item = subscription.items.find((
|
|
1901
|
+
const item = subscription.items.find((i) => i.id === lineId);
|
|
1666
1902
|
if (!item) {
|
|
1667
1903
|
return { _tag: "Failure", error: "Line item not found" };
|
|
1668
1904
|
}
|
|
@@ -1988,8 +2224,8 @@ function createApiSubscriptionAdapter(fetcher) {
|
|
|
1988
2224
|
try {
|
|
1989
2225
|
const params = new URLSearchParams();
|
|
1990
2226
|
if ((_a = options == null ? void 0 : options.filters) == null ? void 0 : _a.length) {
|
|
1991
|
-
const groups = options.filters.filter((f) => Object.keys(f).length > 0).map((f) => Object.entries(f).filter(([,
|
|
1992
|
-
(entries) => "(" + entries.map(([k,
|
|
2227
|
+
const groups = options.filters.filter((f) => Object.keys(f).length > 0).map((f) => Object.entries(f).filter(([, v]) => Boolean(v))).filter((entries) => entries.length > 0).map(
|
|
2228
|
+
(entries) => "(" + entries.map(([k, v]) => `${k}:'${v}'`).join(" AND ") + ")"
|
|
1993
2229
|
);
|
|
1994
2230
|
if (groups.length) params.set("query", groups.join(" OR "));
|
|
1995
2231
|
}
|
|
@@ -2646,7 +2882,7 @@ function applyAdjustments(orders, stored) {
|
|
|
2646
2882
|
);
|
|
2647
2883
|
const subtotal = items.reduce((sum, it) => sum + it.totalPrice, 0);
|
|
2648
2884
|
next = { ...next, items, subtotal };
|
|
2649
|
-
if (items.length > 0 && items.every((
|
|
2885
|
+
if (items.length > 0 && items.every((i) => i.skipped)) {
|
|
2650
2886
|
next = { ...next, skipped: true, status: "skipped", deliveryPrice: 0 };
|
|
2651
2887
|
}
|
|
2652
2888
|
}
|
|
@@ -2729,9 +2965,9 @@ function createMockSchedulesAdapter(subscriptions = createMockSubscriptionAdapte
|
|
|
2729
2965
|
// Mirror backend removeSkippedItems: the billable view also strips
|
|
2730
2966
|
// skipped lines from surviving (partially-skipped) orders. No
|
|
2731
2967
|
// recompute needed — skipped lines already carry totalPrice 0 (R4).
|
|
2732
|
-
excludeSkipped && o2.items.some((
|
|
2968
|
+
excludeSkipped && o2.items.some((i) => i.skipped) ? { ...o2, items: o2.items.filter((i) => !i.skipped) } : o2
|
|
2733
2969
|
)
|
|
2734
|
-
).sort((
|
|
2970
|
+
).sort((a9, b2) => a9.date.localeCompare(b2.date));
|
|
2735
2971
|
return { _tag: "Success", data: orders.slice(0, count) };
|
|
2736
2972
|
},
|
|
2737
2973
|
async getAdjustments() {
|
|
@@ -2855,10 +3091,10 @@ function createApiSchedulesAdapter(fetcher) {
|
|
|
2855
3091
|
if (!res.ok) return { _tag: "Failure", error: `HTTP ${res.status}` };
|
|
2856
3092
|
const body = await res.json();
|
|
2857
3093
|
all.push(
|
|
2858
|
-
...body.data.map((
|
|
2859
|
-
id:
|
|
2860
|
-
matcher:
|
|
2861
|
-
action:
|
|
3094
|
+
...body.data.map((a9) => ({
|
|
3095
|
+
id: a9.id,
|
|
3096
|
+
matcher: a9.matcher,
|
|
3097
|
+
action: a9.action
|
|
2862
3098
|
}))
|
|
2863
3099
|
);
|
|
2864
3100
|
if (!body.hasNextPage) return { _tag: "Success", data: all };
|
|
@@ -2958,8 +3194,8 @@ function createApiSchedulesAdapter(fetcher) {
|
|
|
2958
3194
|
};
|
|
2959
3195
|
}
|
|
2960
3196
|
const SchedulesServiceContext = createContext("services/schedules");
|
|
2961
|
-
function isSameCalendarDay(
|
|
2962
|
-
const da = new Date(
|
|
3197
|
+
function isSameCalendarDay(a9, b2) {
|
|
3198
|
+
const da = new Date(a9);
|
|
2963
3199
|
const db = new Date(b2);
|
|
2964
3200
|
if (Number.isNaN(da.getTime()) || Number.isNaN(db.getTime())) return false;
|
|
2965
3201
|
return da.toISOString().slice(0, 10) === db.toISOString().slice(0, 10);
|
|
@@ -3040,26 +3276,26 @@ function createSchedulesService(adapter, opts) {
|
|
|
3040
3276
|
const adjustments = await adapter.getAdjustments();
|
|
3041
3277
|
if (adjustments._tag === "Failure") return adjustments;
|
|
3042
3278
|
const covering = adjustments.data.filter(
|
|
3043
|
-
(
|
|
3279
|
+
(a9) => a9.action.type === "SKIP_ITEM" && a9.action.input.lineIds.includes(lineId) && matcherAffects(a9.matcher, { cycle, date })
|
|
3044
3280
|
);
|
|
3045
3281
|
if (covering.length === 0) {
|
|
3046
3282
|
return { _tag: "Failure", error: "No skip found for this item" };
|
|
3047
3283
|
}
|
|
3048
|
-
if (covering.some((
|
|
3284
|
+
if (covering.some((a9) => a9.action.input.lineIds.length > 1)) {
|
|
3049
3285
|
return {
|
|
3050
3286
|
_tag: "Failure",
|
|
3051
3287
|
error: "This item was skipped together with other items and can't be unskipped individually"
|
|
3052
3288
|
};
|
|
3053
3289
|
}
|
|
3054
|
-
if (covering.some((
|
|
3290
|
+
if (covering.some((a9) => !matcherExactlyTargets(a9.matcher, { cycle, date }))) {
|
|
3055
3291
|
return {
|
|
3056
3292
|
_tag: "Failure",
|
|
3057
3293
|
error: "This skip also affects another order and can't be removed from here"
|
|
3058
3294
|
};
|
|
3059
3295
|
}
|
|
3060
3296
|
let deleted = 0;
|
|
3061
|
-
for (const
|
|
3062
|
-
const result = await adapter.removeAdjustment({ adjustmentId:
|
|
3297
|
+
for (const a9 of covering) {
|
|
3298
|
+
const result = await adapter.removeAdjustment({ adjustmentId: a9.id });
|
|
3063
3299
|
if (result._tag === "Failure") {
|
|
3064
3300
|
if (deleted > 0) await notifyChanged(subscriptionId);
|
|
3065
3301
|
return result;
|
|
@@ -4280,11 +4516,11 @@ export {
|
|
|
4280
4516
|
AuthenticationError,
|
|
4281
4517
|
AuthenticationErrorReason,
|
|
4282
4518
|
B as BlockWrapperEvent,
|
|
4283
|
-
|
|
4284
|
-
|
|
4519
|
+
y as ContextProvideEvent,
|
|
4520
|
+
z as ContextRequestEvent,
|
|
4285
4521
|
CustomerServiceContext,
|
|
4286
|
-
|
|
4287
|
-
|
|
4522
|
+
A as DEFAULT_BREAKPOINTS,
|
|
4523
|
+
F as DEFAULT_GLOBAL_STYLES,
|
|
4288
4524
|
DEFAULT_GRID,
|
|
4289
4525
|
DEFAULT_NEW_BLOCK_HEIGHT,
|
|
4290
4526
|
DISCOUNT_REJECTION_REASONS,
|
|
@@ -4307,20 +4543,20 @@ export {
|
|
|
4307
4543
|
StateContext,
|
|
4308
4544
|
SubscriptionServiceContext,
|
|
4309
4545
|
c as ThemeStateContext,
|
|
4310
|
-
|
|
4546
|
+
TranslationContext,
|
|
4311
4547
|
WorkflowServiceContext,
|
|
4312
|
-
|
|
4548
|
+
attachEmptyTracking,
|
|
4313
4549
|
authenticationErrorFromBody,
|
|
4314
4550
|
d2 as backfillInstanceDefaults,
|
|
4315
4551
|
b as buildGridLayout,
|
|
4316
|
-
|
|
4552
|
+
H as buildLayoutCss,
|
|
4317
4553
|
canvasMode,
|
|
4318
4554
|
clampRect,
|
|
4319
|
-
|
|
4555
|
+
I as classifyRowDividers,
|
|
4320
4556
|
clearAllSurfaceContexts,
|
|
4321
4557
|
clearLayoutModeAdapter,
|
|
4322
4558
|
compactItems,
|
|
4323
|
-
|
|
4559
|
+
J as compactLayoutDocument,
|
|
4324
4560
|
w as computed,
|
|
4325
4561
|
createApiCustomerAdapter,
|
|
4326
4562
|
createApiLoginAdapter,
|
|
@@ -4329,12 +4565,13 @@ export {
|
|
|
4329
4565
|
createApiSchedulesAdapter,
|
|
4330
4566
|
createApiSubscriptionAdapter,
|
|
4331
4567
|
createBlockInstance,
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4568
|
+
K as createBlockInstanceFromJSON,
|
|
4569
|
+
N as createBlockInstanceFromObject,
|
|
4570
|
+
O as createCeRenderer,
|
|
4335
4571
|
createContext,
|
|
4572
|
+
createCustomBlockRuntime,
|
|
4336
4573
|
createCustomerService,
|
|
4337
|
-
|
|
4574
|
+
Q as createDefaultLayoutDocument,
|
|
4338
4575
|
createLoginService,
|
|
4339
4576
|
createMockCustomerAdapter,
|
|
4340
4577
|
createMockLoginAdapter,
|
|
@@ -4348,22 +4585,22 @@ export {
|
|
|
4348
4585
|
createProductService,
|
|
4349
4586
|
createRouterService,
|
|
4350
4587
|
createSchedulesService,
|
|
4351
|
-
|
|
4588
|
+
R as createSelectedBlock,
|
|
4352
4589
|
createSettingsService,
|
|
4353
4590
|
createShopService,
|
|
4354
4591
|
createState,
|
|
4355
4592
|
createSubscriptionService,
|
|
4356
|
-
|
|
4357
|
-
|
|
4593
|
+
U as createThemeState,
|
|
4594
|
+
V as createTranslationService,
|
|
4358
4595
|
createWorkflowApiAdapter,
|
|
4359
4596
|
createWorkflowService,
|
|
4360
4597
|
defineBlock,
|
|
4361
|
-
|
|
4362
|
-
|
|
4598
|
+
W as defineBlockRuntime,
|
|
4599
|
+
X as deriveLayout,
|
|
4363
4600
|
E as effect,
|
|
4364
4601
|
emitLayoutCommand,
|
|
4365
4602
|
emitLayoutSetRects,
|
|
4366
|
-
|
|
4603
|
+
Y as expandFillLayoutDocument,
|
|
4367
4604
|
findFreeRect,
|
|
4368
4605
|
getActiveSurfaceContext,
|
|
4369
4606
|
getDefaultBlockForAction,
|
|
@@ -4371,37 +4608,37 @@ export {
|
|
|
4371
4608
|
getLayoutModeAdapter,
|
|
4372
4609
|
gridV1Engine,
|
|
4373
4610
|
hasDefaultBlockForAction,
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4611
|
+
Z as hasRenderedContent,
|
|
4612
|
+
_ as indexOverrides,
|
|
4613
|
+
injectContext,
|
|
4377
4614
|
insertRectRelative,
|
|
4378
|
-
|
|
4615
|
+
$ as isEditorPreview,
|
|
4379
4616
|
a as isStubDefinition,
|
|
4380
|
-
|
|
4381
|
-
|
|
4617
|
+
a0 as layoutScopeSelector,
|
|
4618
|
+
a1 as layoutSystemEnabled,
|
|
4382
4619
|
loadBlockRegistry,
|
|
4383
4620
|
loginService,
|
|
4384
4621
|
o as onRegisterBlock,
|
|
4385
|
-
|
|
4622
|
+
a2 as projectToCss,
|
|
4386
4623
|
p as projectToGridStack,
|
|
4387
|
-
|
|
4624
|
+
a3 as provideContext,
|
|
4388
4625
|
rateLimitErrorFromResponse,
|
|
4389
|
-
|
|
4626
|
+
a4 as readingOrder,
|
|
4390
4627
|
e as reconcileLayout,
|
|
4391
|
-
|
|
4628
|
+
a5 as rectsOverlap,
|
|
4392
4629
|
registerBlock,
|
|
4393
4630
|
registerLayoutModeAdapter,
|
|
4394
4631
|
resetBreakpoint,
|
|
4395
4632
|
r as resolveLayout,
|
|
4396
|
-
|
|
4633
|
+
a6 as serializeBlocks,
|
|
4397
4634
|
setActiveSurfaceContext,
|
|
4398
4635
|
setLayoutCommandDispatcher,
|
|
4399
4636
|
setLayoutCommandEmitter,
|
|
4400
|
-
|
|
4637
|
+
a7 as setLayoutSystemEnabled,
|
|
4401
4638
|
d as signal,
|
|
4402
4639
|
subscribeContext,
|
|
4403
4640
|
toLanguageSelectOptions,
|
|
4404
|
-
|
|
4641
|
+
a8 as untracked,
|
|
4405
4642
|
waitForDevBlocksUrl,
|
|
4406
4643
|
w2 as withWrapper
|
|
4407
4644
|
};
|
|
@@ -1016,6 +1016,9 @@ function createThemeState(deps) {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
return { blocks: [] };
|
|
1018
1018
|
}
|
|
1019
|
+
function isCurrentDefinition(block) {
|
|
1020
|
+
return getDefinedBlocks().find((b2) => b2.name === block.name) === block;
|
|
1021
|
+
}
|
|
1019
1022
|
onRegisterBlock(async (_2, block) => {
|
|
1020
1023
|
if (block.locales == null || catalogs.value == null) return;
|
|
1021
1024
|
const localeAtLoadStart = locale.value;
|
|
@@ -1026,6 +1029,7 @@ function createThemeState(deps) {
|
|
|
1026
1029
|
file = null;
|
|
1027
1030
|
}
|
|
1028
1031
|
if (catalogs.value == null || locale.value !== localeAtLoadStart) return;
|
|
1032
|
+
if (!isCurrentDefinition(block)) return;
|
|
1029
1033
|
const parsed = parseBlockLocaleFile(file);
|
|
1030
1034
|
const current = catalogs.value;
|
|
1031
1035
|
catalogs.value = {
|
|
@@ -1511,43 +1515,44 @@ function buildGridLayout(layout, blockIds, scopeId) {
|
|
|
1511
1515
|
};
|
|
1512
1516
|
}
|
|
1513
1517
|
export {
|
|
1514
|
-
|
|
1515
|
-
|
|
1518
|
+
isEditorPreview as $,
|
|
1519
|
+
DEFAULT_BREAKPOINTS as A,
|
|
1516
1520
|
BlockWrapperEvent as B,
|
|
1517
1521
|
ContextRoot as C,
|
|
1518
1522
|
DEFAULT_GRID as D,
|
|
1519
1523
|
E,
|
|
1520
|
-
|
|
1524
|
+
DEFAULT_GLOBAL_STYLES as F,
|
|
1521
1525
|
GRID_V1_ENGINE_ID as G,
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
+
buildLayoutCss as H,
|
|
1527
|
+
classifyRowDividers as I,
|
|
1528
|
+
compactLayoutDocument as J,
|
|
1529
|
+
createBlockInstanceFromJSON as K,
|
|
1526
1530
|
LAYOUT_SCOPE_ATTR as L,
|
|
1527
1531
|
MAX_BLOCKS_PER_ROW as M,
|
|
1528
|
-
|
|
1529
|
-
|
|
1532
|
+
createBlockInstanceFromObject as N,
|
|
1533
|
+
createCeRenderer as O,
|
|
1530
1534
|
PAGE_ROOT_SLOT as P,
|
|
1531
|
-
|
|
1532
|
-
|
|
1535
|
+
createDefaultLayoutDocument as Q,
|
|
1536
|
+
createSelectedBlock as R,
|
|
1533
1537
|
SelectedBlockContext as S,
|
|
1534
1538
|
TranslationContext as T,
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1539
|
+
createThemeState as U,
|
|
1540
|
+
createTranslationService as V,
|
|
1541
|
+
defineBlockRuntime as W,
|
|
1542
|
+
deriveLayout as X,
|
|
1543
|
+
expandFillLayoutDocument as Y,
|
|
1544
|
+
hasRenderedContent as Z,
|
|
1545
|
+
indexOverrides as _,
|
|
1542
1546
|
isStubDefinition as a,
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1547
|
+
layoutScopeSelector as a0,
|
|
1548
|
+
layoutSystemEnabled as a1,
|
|
1549
|
+
projectToCss as a2,
|
|
1550
|
+
provideContext as a3,
|
|
1551
|
+
readingOrder as a4,
|
|
1552
|
+
rectsOverlap as a5,
|
|
1553
|
+
serializeBlocks as a6,
|
|
1554
|
+
setLayoutSystemEnabled as a7,
|
|
1555
|
+
n as a8,
|
|
1551
1556
|
buildGridLayout as b,
|
|
1552
1557
|
ThemeStateContext as c,
|
|
1553
1558
|
backfillInstanceDefaults as d,
|
|
@@ -1557,20 +1562,20 @@ export {
|
|
|
1557
1562
|
w as h,
|
|
1558
1563
|
injectContext as i,
|
|
1559
1564
|
registerBlock as j,
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1565
|
+
attachEmptyTracking as k,
|
|
1566
|
+
defineBlock as l,
|
|
1567
|
+
getDefinedBlocks as m,
|
|
1568
|
+
normalizeLocale as n,
|
|
1564
1569
|
onRegisterBlock as o,
|
|
1565
|
-
|
|
1566
|
-
|
|
1570
|
+
createBlockInstance as p,
|
|
1571
|
+
clampRect as q,
|
|
1567
1572
|
resolveLayout as r,
|
|
1568
1573
|
subscribeContext as s,
|
|
1569
|
-
|
|
1574
|
+
applyFillExpansion as t,
|
|
1570
1575
|
u,
|
|
1571
|
-
|
|
1576
|
+
compactItems as v,
|
|
1572
1577
|
withWrapper as w,
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1578
|
+
findFreeRect as x,
|
|
1579
|
+
ContextProvideEvent as y,
|
|
1580
|
+
ContextRequestEvent as z
|
|
1576
1581
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/custom/json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,2FAA2F;AAC3F,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAMtD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A block's strings for a locale, as the built-in blocks resolve theirs
|
|
3
|
+
* (`blocks/extensions/src/locales.ts`): the language without its region,
|
|
4
|
+
* then `en`, then none.
|
|
5
|
+
*/
|
|
6
|
+
export declare function localeStrings(locales: Record<string, Record<string, string>>, locale: string): Record<string, string>;
|
|
7
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../src/custom/locales.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC/C,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAExB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BlockRenderer } from '../block';
|
|
2
|
+
import { CustomBlockComponent, CustomBlockServices } from './facade';
|
|
3
|
+
import { CustomBlockManifestEntry, CustomBlockPreact, Subscriptions } from './types';
|
|
4
|
+
/** A reporter for errors at `site`, tagged with a placed instance's id when there is one. */
|
|
5
|
+
export type ReportAt = (site: string, blockId?: string) => (error: unknown) => void;
|
|
6
|
+
export declare function createCustomBlockRenderer(entry: CustomBlockManifestEntry, Block: CustomBlockComponent, createServices: (subscriptions: Subscriptions) => CustomBlockServices, { h, render, Component }: CustomBlockPreact, report: ReportAt): BlockRenderer;
|
|
7
|
+
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/custom/renderer.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG1E,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,6FAA6F;AAC7F,MAAM,MAAM,QAAQ,GAAG,CACrB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,KACb,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AA2F9B,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,wBAAwB,EAC/B,KAAK,EAAE,oBAAoB,EAC3B,cAAc,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,mBAAmB,EACrE,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,iBAAiB,EAC3C,MAAM,EAAE,QAAQ,GACf,aAAa,CAiFf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CreateCustomBlockRuntime } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The only API a built custom block receives. Core services and the editor
|
|
4
|
+
* flag come from the host, so another host portal passes its own.
|
|
5
|
+
*/
|
|
6
|
+
export declare const createCustomBlockRuntime: CreateCustomBlockRuntime;
|
|
7
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/custom/runtime.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,wBAAwB,EAIzB,MAAM,SAAS,CAAC;AAoFjB;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,wBAoDtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.test.d.ts","sourceRoot":"","sources":["../../src/custom/runtime.test.ts"],"names":[],"mappings":""}
|
package/dist/custom/types.d.ts
CHANGED
|
@@ -32,6 +32,10 @@ export type CustomBlockPreact = {
|
|
|
32
32
|
export type CustomBlockDefinitionInput = {
|
|
33
33
|
renderer: BlockRenderer;
|
|
34
34
|
};
|
|
35
|
+
/** Unsubscribers of one mounted instance; `disposed` once its root unmounted. */
|
|
36
|
+
export type Subscriptions = Set<() => void> & {
|
|
37
|
+
disposed?: boolean;
|
|
38
|
+
};
|
|
35
39
|
/** The only API a built block receives, through `register(runtime)`. */
|
|
36
40
|
export type CustomBlockRuntime = {
|
|
37
41
|
defineBlock(input: CustomBlockDefinitionInput): BlockDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/custom/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE1E,MAAM,MAAM,wBAAwB,GAAG;IACrC,sBAAsB;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,6GAA6G;IAC7G,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,qBAAqB,EAAE,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IA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@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/editor/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAQnB,MAAM,aAAa,CAAC;AASrB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAmD7B,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,wBAAgB,6BAA6B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAM7E;AAED;;;;;;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,EAQnB,MAAM,aAAa,CAAC;AASrB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAmD7B,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,wBAAgB,6BAA6B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAM7E;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE;IAAE,aAAa,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAE,GAC7D,OAAO,CAAC,MAAM,IAAI,CAAC,CA4FrB"}
|
package/dist/editor.js
CHANGED
|
@@ -2043,16 +2043,21 @@ async function setupEditorMode(deps) {
|
|
|
2043
2043
|
const routes = Object.fromEntries(
|
|
2044
2044
|
routerService.getPages().map((p2) => [p2.path, { block: p2.block, title: p2.title }])
|
|
2045
2045
|
);
|
|
2046
|
+
const isCurrentDefinition = (block) => getDefinedBlocks().find((b) => b.name === block.name) === block;
|
|
2046
2047
|
const unsubscribeRegister = onRegisterBlock((_, block) => {
|
|
2047
|
-
void serializeBlock(block).then(
|
|
2048
|
-
(
|
|
2048
|
+
void serializeBlock(block).then((serialized) => {
|
|
2049
|
+
if (!isCurrentDefinition(block)) return;
|
|
2050
|
+
editor.sendMessage(
|
|
2049
2051
|
createRegisterBlocksMessage({
|
|
2050
2052
|
blocks: [serialized]
|
|
2051
2053
|
})
|
|
2052
|
-
)
|
|
2053
|
-
);
|
|
2054
|
+
);
|
|
2055
|
+
});
|
|
2054
2056
|
});
|
|
2055
|
-
const
|
|
2057
|
+
const defined = getDefinedBlocks();
|
|
2058
|
+
const blocks = (await Promise.all(defined.map(serializeBlock))).filter(
|
|
2059
|
+
(_, index) => isCurrentDefinition(defined[index])
|
|
2060
|
+
);
|
|
2056
2061
|
editor.sendMessage(createRegisterBlocksMessage({ blocks }));
|
|
2057
2062
|
editor.sendMessage(createRegisterRoutesMessage({ routes }));
|
|
2058
2063
|
return () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as reconcileLayout, L as LAYOUT_SCOPE_ATTR, M as MAX_BLOCKS_PER_ROW } from "./css-runtime-
|
|
2
|
-
import { r as resolveActiveBreakpoint, p as projectToGridStack, M as MIN_BLOCK_ROWS, a as MIN_BLOCK_PX } from "./project-gridstack-
|
|
1
|
+
import { e as reconcileLayout, L as LAYOUT_SCOPE_ATTR, M as MAX_BLOCKS_PER_ROW } from "./css-runtime-BRJXhRDp.js";
|
|
2
|
+
import { r as resolveActiveBreakpoint, p as projectToGridStack, M as MIN_BLOCK_ROWS, a as MIN_BLOCK_PX } from "./project-gridstack-4jezmlDO.js";
|
|
3
3
|
import { LAYOUT_POP_CLASS, LAYOUT_INTERACTION_START, LAYOUT_INTERACTION_END } from "./layout-mode-adapter-BBd4JRQd.js";
|
|
4
4
|
function obsolete(self, f, oldName, newName, rev) {
|
|
5
5
|
const wrapper = (...args) => {
|
package/dist/main.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export { SUPPORTED_UI_LANGUAGES, SUPPORTED_UI_LANGUAGE_OPTIONS, toLanguageSelect
|
|
|
6
6
|
export { ContextRequestEvent, ContextProvideEvent, type ContextCallback, createContext, injectContext, provideContext, subscribeContext, type ContextType, type UnknownContext, } from './context';
|
|
7
7
|
export { StateContext, createState } from './state';
|
|
8
8
|
export { waitForDevBlocksUrl, loadBlockRegistry } from './registry';
|
|
9
|
+
export { createCustomBlockRuntime } from './custom/runtime';
|
|
10
|
+
export type { CustomBlockCoreServices, CustomBlockManifestEntry, CustomBlockRuntime, } from './custom/types';
|
|
9
11
|
export * from './utils';
|
|
10
12
|
export * from './services';
|
|
11
13
|
export * from './flows';
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,eAAe,EACpB,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,E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,MAAM,6BAA6B,CAAC;AACzD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,GACV,MAAM,sBAAsB,CAAC"}
|
package/dist/observability.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export interface ReportContext {
|
|
|
13
13
|
};
|
|
14
14
|
/** Free-form non-PII extras (numbers, booleans, short strings). */
|
|
15
15
|
extra?: Record<string, string | number | boolean | undefined>;
|
|
16
|
+
/** Filterable values, set as `juo.blocks.<key>` tags. */
|
|
17
|
+
tags?: Record<string, string | number>;
|
|
16
18
|
}
|
|
17
19
|
export declare function reportBlockError(error: unknown, ctx: ReportContext): void;
|
|
18
20
|
export declare function reportBlockWarning(message: string, ctx: ReportContext): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../src/observability.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI9D,KAAK,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG;IACpD,UAAU,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;CACtD,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB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EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAezE"}
|
package/dist/observability.js
CHANGED
|
@@ -1330,6 +1330,11 @@ function applyScope(scope, ctx) {
|
|
|
1330
1330
|
if ((_d = ctx.keys) == null ? void 0 : _d.slots) {
|
|
1331
1331
|
scope.setExtra("slots_keys", ctx.keys.slots);
|
|
1332
1332
|
}
|
|
1333
|
+
if (ctx.tags) {
|
|
1334
|
+
for (const [key, value] of Object.entries(ctx.tags)) {
|
|
1335
|
+
scope.setTag(`${SDK_TAG}.${key}`, value);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1333
1338
|
if (ctx.extra) {
|
|
1334
1339
|
for (const [key, value] of Object.entries(ctx.extra)) {
|
|
1335
1340
|
if (value !== void 0) {
|
package/dist/registry.d.ts
CHANGED
|
@@ -15,8 +15,15 @@ export declare function waitForDevBlocksUrl(timeout?: number): Promise<string |
|
|
|
15
15
|
* redirects the store-specific registry URL to the local dev server, so
|
|
16
16
|
* this function does not need to know about dev mode — it simply imports
|
|
17
17
|
* the URL and the browser resolves it via the import map.
|
|
18
|
+
*
|
|
19
|
+
* `after` holds the registration back (not the download) until it settles,
|
|
20
|
+
* whether it resolves or rejects. Registering a name again replaces the
|
|
21
|
+
* definition, so passing the built-in blocks' registration here makes a
|
|
22
|
+
* store's own block win over a built-in one of the same name, whichever
|
|
23
|
+
* finishes loading first.
|
|
18
24
|
*/
|
|
19
25
|
export declare function loadBlockRegistry(options?: {
|
|
20
26
|
distributedRegistryUrl?: string;
|
|
27
|
+
after?: Promise<unknown>;
|
|
21
28
|
}): Promise<void>;
|
|
22
29
|
//# sourceMappingURL=registry.d.ts.map
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AA6BA;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,SAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwB1E;AAED
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AA6BA;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,SAAO,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwB1E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,GAAE;IACP,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB,GACL,OAAO,CAAC,IAAI,CAAC,CAqDf"}
|
package/dist/theme-state.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export type ThemeState = {
|
|
|
85
85
|
export declare const ThemeStateContext: {
|
|
86
86
|
__context__: ThemeState;
|
|
87
87
|
};
|
|
88
|
+
export declare function normalizeLocale(locale: string): string;
|
|
88
89
|
/**
|
|
89
90
|
* Flatten overrides into the `(scope, key) -> value` shape the catalogs hold.
|
|
90
91
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-state.d.ts","sourceRoot":"","sources":["../src/theme-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,MAAM,EACZ,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAIL,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"theme-state.d.ts","sourceRoot":"","sources":["../src/theme-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,MAAM,EACZ,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAIL,KAAK,KAAK,EAGV,KAAK,aAAa,EAGnB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU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|
|
@@ -1,8 +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 { i as injectContext, T as TranslationContext, C as ContextRoot } from "./css-runtime-
|
|
5
|
-
import { V as ViewLayoutController, E as ExtensionRoot, B as Block } from "./ExtensionRoot-
|
|
4
|
+
import { i as injectContext, T as TranslationContext, C as ContextRoot } from "./css-runtime-BRJXhRDp.js";
|
|
5
|
+
import { V as ViewLayoutController, E as ExtensionRoot, B as Block } from "./ExtensionRoot-Bn5jOdWZ.js";
|
|
6
6
|
import { canvasMode, getActiveSurfaceContext, emitLayoutSetRects, effect } from "@juo/blocks";
|
|
7
7
|
import { getLayoutModeAdapter } from "./layout-mode-adapter-BBd4JRQd.js";
|
|
8
8
|
import { a as createEditorBridge, m as createFocusInlineTextMessage, J as createUpdateBlockTranslationMessage } from "./bridge-4Eq-G73Z.js";
|
|
@@ -440,7 +440,7 @@ initMorphController();
|
|
|
440
440
|
void (async () => {
|
|
441
441
|
try {
|
|
442
442
|
const [{ createGridStackAdapter }, { registerLayoutModeAdapter }] = await Promise.all([
|
|
443
|
-
import("./gridstack-adapter-
|
|
443
|
+
import("./gridstack-adapter-ByNMo9k7.js"),
|
|
444
444
|
import("./layout-mode-adapter-BBd4JRQd.js")
|
|
445
445
|
]);
|
|
446
446
|
registerLayoutModeAdapter(createGridStackAdapter());
|
|
@@ -1,8 +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 { i as injectContext, T as TranslationContext, C as ContextRoot } from "./css-runtime-
|
|
5
|
-
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-
|
|
4
|
+
import { i as injectContext, T as TranslationContext, C as ContextRoot } from "./css-runtime-BRJXhRDp.js";
|
|
5
|
+
import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-Bn5jOdWZ.js";
|
|
6
6
|
import { effect } from "@juo/blocks";
|
|
7
7
|
class InlineText extends HTMLElement {
|
|
8
8
|
constructor() {
|