@webx-ui/module-blocks 0.8.6 → 0.8.7

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/index.js CHANGED
@@ -516,7 +516,7 @@ function ln(e) {
516
516
  tt(t) && He(t, () => l++);
517
517
  return l;
518
518
  }
519
- function fo(e) {
519
+ function mo(e) {
520
520
  const l = [];
521
521
  return He(e, (t) => {
522
522
  l.includes(t.type) || l.push(t.type);
@@ -2559,10 +2559,10 @@ const ts = ["srcdoc"], ls = {
2559
2559
  };
2560
2560
  }
2561
2561
  }), Es = /* @__PURE__ */ ie(Ss, [["__scopeId", "data-v-590fa1d6"]]), vt = /* @__PURE__ */ Symbol("wx-blocks-preview");
2562
- function mo(e) {
2562
+ function vo(e) {
2563
2563
  Bt(vt, e);
2564
2564
  }
2565
- function vo() {
2565
+ function ho() {
2566
2566
  return De(vt, null);
2567
2567
  }
2568
2568
  const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
@@ -2571,16 +2571,16 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2571
2571
  }, Cs = {
2572
2572
  key: 0,
2573
2573
  class: "wx-blocks__tree"
2574
- }, Ls = { class: "wx-blocks__panel-head" }, As = { class: "wx-blocks__panel-title" }, Vs = { class: "wx-blocks__tools" }, Bs = {
2574
+ }, Ls = { class: "wx-blocks__panel-head" }, As = { class: "wx-blocks__panel-title" }, Vs = { class: "wx-blocks__list" }, Bs = { class: "wx-blocks__tools" }, Ws = {
2575
2575
  key: 1,
2576
2576
  class: "wx-blocks__fields"
2577
- }, Ws = { class: "wx-blocks__panel-head" }, Ms = { class: "wx-blocks__panel-title" }, Ns = {
2577
+ }, Ms = { class: "wx-blocks__panel-head" }, Ns = { class: "wx-blocks__panel-title" }, zs = {
2578
2578
  key: 0,
2579
2579
  class: "wx-blocks__trail"
2580
- }, zs = ["onClick"], Ds = { class: "wx-blocks__panel-name" }, Is = { class: "wx-blocks__panel-extra" }, Os = { key: 0 }, Ps = { class: "wx-blocks__form" }, Us = {
2580
+ }, Ds = ["onClick"], Is = { class: "wx-blocks__panel-name" }, Os = { class: "wx-blocks__panel-extra" }, Ps = { key: 0 }, Us = { class: "wx-blocks__form" }, Rs = {
2581
2581
  key: 0,
2582
2582
  class: "wx-blocks__preview"
2583
- }, Rs = /* @__PURE__ */ ae({
2583
+ }, js = /* @__PURE__ */ ae({
2584
2584
  name: "WxBlocks",
2585
2585
  inheritAttrs: !1,
2586
2586
  __name: "BlocksField",
@@ -2788,19 +2788,21 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2788
2788
  _: 1
2789
2789
  })
2790
2790
  ]),
2791
- m(Es, {
2792
- nodes: p.value,
2793
- catalog: u.value,
2794
- selected: f.value,
2795
- disabled: e.disabled,
2796
- onSelect: G,
2797
- onAdd: ke,
2798
- onRemove: ge,
2799
- onDuplicate: W,
2800
- onVisibility: P,
2801
- onReorder: j
2802
- }, null, 8, ["nodes", "catalog", "selected", "disabled"]),
2803
2791
  A("div", Vs, [
2792
+ m(Es, {
2793
+ nodes: p.value,
2794
+ catalog: u.value,
2795
+ selected: f.value,
2796
+ disabled: e.disabled,
2797
+ onSelect: G,
2798
+ onAdd: ke,
2799
+ onRemove: ge,
2800
+ onDuplicate: W,
2801
+ onVisibility: P,
2802
+ onReorder: j
2803
+ }, null, 8, ["nodes", "catalog", "selected", "disabled"])
2804
+ ]),
2805
+ A("div", Bs, [
2804
2806
  !e.disabled && (e.max === null || p.value.length < e.max) ? (c(), z(n(ce), {
2805
2807
  key: 0,
2806
2808
  variant: "outline",
@@ -2827,10 +2829,10 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2827
2829
  })) : D("", !0)
2828
2830
  ])
2829
2831
  ])),
2830
- v.value ? (c(), C("div", Bs, [
2831
- A("div", Ws, [
2832
- A("span", Ms, [
2833
- y.value.length ? (c(), C("span", Ns, [
2832
+ v.value ? (c(), C("div", Ws, [
2833
+ A("div", Ms, [
2834
+ A("span", Ns, [
2835
+ y.value.length ? (c(), C("span", zs, [
2834
2836
  (c(!0), C(F, null, le(y.value, (U) => (c(), C(F, {
2835
2837
  key: U.key
2836
2838
  }, [
@@ -2838,14 +2840,14 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2838
2840
  type: "button",
2839
2841
  class: "wx-blocks__trail-step",
2840
2842
  onClick: (H) => G(U.key)
2841
- }, S(U.title), 9, zs),
2843
+ }, S(U.title), 9, Ds),
2842
2844
  m(n(he), { name: "chevron-right" })
2843
2845
  ], 64))), 128))
2844
2846
  ])) : D("", !0),
2845
- A("span", Ds, S(g.value?.title ?? v.value.node.type), 1)
2847
+ A("span", Is, S(g.value?.title ?? v.value.node.type), 1)
2846
2848
  ]),
2847
- A("span", Is, [
2848
- h.value ? D("", !0) : (c(), C("code", Os, S(v.value.node.type), 1)),
2849
+ A("span", Os, [
2850
+ h.value ? D("", !0) : (c(), C("code", Ps, S(v.value.node.type), 1)),
2849
2851
  m(n(Ie), {
2850
2852
  size: "sm",
2851
2853
  tone: "neutral",
@@ -2883,7 +2885,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2883
2885
  })
2884
2886
  ])
2885
2887
  ]),
2886
- A("div", Ps, [
2888
+ A("div", Us, [
2887
2889
  g.value?.content ? (c(), z(n(Rt), {
2888
2890
  key: v.value.node.key,
2889
2891
  "model-value": v.value.node.values,
@@ -2908,7 +2910,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2908
2910
  ]),
2909
2911
  _: 1
2910
2912
  }, 16)),
2911
- n(_) && n(_).url.value ? (c(), C("div", Us, [
2913
+ n(_) && n(_).url.value ? (c(), C("div", Rs, [
2912
2914
  m(vs, {
2913
2915
  ref_key: "previewEl",
2914
2916
  ref: R,
@@ -2923,7 +2925,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2923
2925
  ], 2)
2924
2926
  ], 2));
2925
2927
  }
2926
- }), js = /* @__PURE__ */ ie(Rs, [["__scopeId", "data-v-1c5bc971"]]), Fs = { class: "wx-block-card__body" }, Hs = { class: "wx-block-card__title" }, Ks = { class: "wx-block-card__chips" }, Ys = /* @__PURE__ */ ae({
2928
+ }), Fs = /* @__PURE__ */ ie(js, [["__scopeId", "data-v-3952ee19"]]), Hs = { class: "wx-block-card__body" }, Ks = { class: "wx-block-card__title" }, Ys = { class: "wx-block-card__chips" }, qs = /* @__PURE__ */ ae({
2927
2929
  __name: "BlockCard",
2928
2930
  props: {
2929
2931
  block: {}
@@ -2940,8 +2942,8 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2940
2942
  thumbnail: e.block.thumbnail,
2941
2943
  height: 120
2942
2944
  }, null, 8, ["thumbnail"]),
2943
- A("div", Fs, [
2944
- A("div", Hs, S(e.block.title), 1),
2945
+ A("div", Hs, [
2946
+ A("div", Ks, S(e.block.title), 1),
2945
2947
  m(n(K), {
2946
2948
  size: "sm",
2947
2949
  tone: "muted"
@@ -2952,7 +2954,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2952
2954
  ]),
2953
2955
  _: 1
2954
2956
  }),
2955
- A("div", Ks, [
2957
+ A("div", Ys, [
2956
2958
  e.block.draft ? (c(), z(n(ue), {
2957
2959
  key: 0,
2958
2960
  type: "warning",
@@ -2995,7 +2997,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
2995
2997
  ])
2996
2998
  ]));
2997
2999
  }
2998
- }), qs = /* @__PURE__ */ ie(Ys, [["__scopeId", "data-v-3d94f339"]]), Js = { class: "wx-block-create" }, Gs = /* @__PURE__ */ ae({
3000
+ }), Js = /* @__PURE__ */ ie(qs, [["__scopeId", "data-v-3d94f339"]]), Gs = { class: "wx-block-create" }, Zs = /* @__PURE__ */ ae({
2999
3001
  __name: "BlockCreateDialog",
3000
3002
  setup(e) {
3001
3003
  const { resolve: l, dismiss: t, open: s } = It(), a = je(), i = Me(a);
@@ -3059,7 +3061,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
3059
3061
  })
3060
3062
  ]),
3061
3063
  default: b(() => [
3062
- A("div", Js, [
3064
+ A("div", Gs, [
3063
3065
  m(n(oe), {
3064
3066
  label: n(o)("page.title"),
3065
3067
  error: T("title")
@@ -3107,13 +3109,13 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
3107
3109
  _: 1
3108
3110
  }, 8, ["open", "title"]));
3109
3111
  }
3110
- }), Zs = /* @__PURE__ */ ie(Gs, [["__scopeId", "data-v-a4c0d44c"]]), Qs = {
3112
+ }), Qs = /* @__PURE__ */ ie(Zs, [["__scopeId", "data-v-a4c0d44c"]]), Xs = {
3111
3113
  key: 1,
3112
3114
  class: "wx-blocks-page__toolbar"
3113
- }, Xs = { class: "wx-blocks-page__cards" }, eo = { class: "wx-blocks-page__ghost-body" }, to = {
3115
+ }, eo = { class: "wx-blocks-page__cards" }, to = { class: "wx-blocks-page__ghost-body" }, lo = {
3114
3116
  key: 0,
3115
3117
  class: "wx-blocks-page__group-title"
3116
- }, lo = { class: "wx-blocks-page__cards" }, no = /* @__PURE__ */ ae({
3118
+ }, no = { class: "wx-blocks-page__cards" }, so = /* @__PURE__ */ ae({
3117
3119
  __name: "BlocksPage",
3118
3120
  props: {
3119
3121
  base: { default: "/blocks" }
@@ -3121,7 +3123,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
3121
3123
  setup(e) {
3122
3124
  const l = e, t = je(), s = Me(t), a = Wt();
3123
3125
  Ke();
3124
- const i = de("webx-blocks"), o = Fe(), r = I([]), d = I(!0), u = I(""), p = I(""), f = Ut(Zs), v = L(() => {
3126
+ const i = de("webx-blocks"), o = Fe(), r = I([]), d = I(!0), u = I(""), p = I(""), f = Ut(Qs), v = L(() => {
3125
3127
  const h = t.state.manifest?.modules.find((V) => V.id === "blocks")?.meta;
3126
3128
  return {
3127
3129
  groups: h?.groups ?? [],
@@ -3191,7 +3193,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
3191
3193
  variant: "soft",
3192
3194
  description: n(i)("page.editing-off")
3193
3195
  }, null, 8, ["description"])),
3194
- d.value || r.value.length > 0 ? (c(), C("div", Qs, [
3196
+ d.value || r.value.length > 0 ? (c(), C("div", Xs, [
3195
3197
  m(n(Ue), {
3196
3198
  modelValue: u.value,
3197
3199
  "onUpdate:modelValue": V[0] || (V[0] = (O) => u.value = O),
@@ -3202,7 +3204,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
3202
3204
  ])) : D("", !0),
3203
3205
  d.value ? (c(), z(n(Be), { key: 2 }, {
3204
3206
  template: b(() => [
3205
- A("div", Xs, [
3207
+ A("div", eo, [
3206
3208
  (c(), C(F, null, le(4, (O) => A("div", {
3207
3209
  key: O,
3208
3210
  class: "wx-blocks-page__ghost"
@@ -3212,7 +3214,7 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
3212
3214
  height: 120,
3213
3215
  class: "wx-blocks-page__ghost-thumb"
3214
3216
  }),
3215
- A("div", eo, [
3217
+ A("div", to, [
3216
3218
  m(n(qe), {
3217
3219
  variant: "title",
3218
3220
  width: "45%"
@@ -3240,9 +3242,9 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
3240
3242
  key: O.id,
3241
3243
  class: "wx-blocks-page__group"
3242
3244
  }, [
3243
- O.label ? (c(), C("div", to, S(O.label), 1)) : D("", !0),
3244
- A("div", lo, [
3245
- (c(!0), C(F, null, le(O.blocks, (J) => (c(), z(qs, {
3245
+ O.label ? (c(), C("div", lo, S(O.label), 1)) : D("", !0),
3246
+ A("div", no, [
3247
+ (c(!0), C(F, null, le(O.blocks, (J) => (c(), z(Js, {
3246
3248
  key: J.id,
3247
3249
  block: J,
3248
3250
  onOpen: Y
@@ -3253,14 +3255,14 @@ const Lt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ts = {
3253
3255
  _: 1
3254
3256
  }, 8, ["view", "title", "views", "actions"]));
3255
3257
  }
3256
- }), so = /* @__PURE__ */ ie(no, [["__scopeId", "data-v-553b680f"]]);
3257
- function ho(e = {}) {
3258
+ }), oo = /* @__PURE__ */ ie(so, [["__scopeId", "data-v-553b680f"]]);
3259
+ function bo(e = {}) {
3258
3260
  const l = e.path ?? "/blocks";
3259
3261
  return {
3260
3262
  id: "blocks",
3261
3263
  path: l,
3262
3264
  routes: [
3263
- { path: l, name: "webx.blocks", component: so, props: { base: l } },
3265
+ { path: l, name: "webx.blocks", component: oo, props: { base: l } },
3264
3266
  {
3265
3267
  path: `${l}/:id(\\d+)`,
3266
3268
  name: "webx.blocks.edit",
@@ -3273,7 +3275,7 @@ function ho(e = {}) {
3273
3275
  // draws its children through the renderer; it needs the node for `props.allow` alone.
3274
3276
  types: {
3275
3277
  "wx-blocks": {
3276
- component: js,
3278
+ component: Fs,
3277
3279
  kind: "field",
3278
3280
  nested: !0,
3279
3281
  wide: !0,
@@ -3287,9 +3289,9 @@ export {
3287
3289
  ds as WxBlockPicker,
3288
3290
  Xl as WxBlockStage,
3289
3291
  sl as WxBlockThumb,
3290
- js as WxBlocks,
3291
- so as WxBlocksPage,
3292
- ho as blocks,
3292
+ Fs as WxBlocks,
3293
+ oo as WxBlocksPage,
3294
+ bo as blocks,
3293
3295
  un as blocksMessages,
3294
3296
  vt as blocksPreviewKey,
3295
3297
  Gt as cloneNode,
@@ -3305,15 +3307,15 @@ export {
3305
3307
  re as locate,
3306
3308
  en as makeNode,
3307
3309
  ut as newKey,
3308
- mo as provideBlocksPreview,
3310
+ vo as provideBlocksPreview,
3309
3311
  on as removeNode,
3310
3312
  Ft as replaceBlock,
3311
3313
  rn as replaceList,
3312
3314
  Ht as stageDocument,
3313
- fo as typesIn,
3315
+ mo as typesIn,
3314
3316
  Mn as undeclared,
3315
3317
  an as updateValues,
3316
- vo as useBlocksPreview,
3318
+ ho as useBlocksPreview,
3317
3319
  He as walk
3318
3320
  };
3319
3321
  //# sourceMappingURL=index.js.map