@vizejs/fresco 0.715.0 → 0.717.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.
Files changed (37) hide show
  1. package/dist/accessibility-DY_alnTr.d.mts +123 -0
  2. package/dist/accessibility-DY_alnTr.d.mts.map +1 -0
  3. package/dist/{app-DoXcF_Dn.mjs → app-B9yJzz5S.mjs} +284 -88
  4. package/dist/app-B9yJzz5S.mjs.map +1 -0
  5. package/dist/{app-adHHi99c.d.mts → app-CKsTWQuP.d.mts} +38 -19
  6. package/dist/app-CKsTWQuP.d.mts.map +1 -0
  7. package/dist/components/index.d.mts +2 -2
  8. package/dist/components/index.mjs +2 -2
  9. package/dist/{components-DWIDBGTL.mjs → components-C57eT1BL.mjs} +646 -434
  10. package/dist/components-C57eT1BL.mjs.map +1 -0
  11. package/dist/composables/index.d.mts +1 -1
  12. package/dist/composables/index.mjs +3 -3
  13. package/dist/{composables-b_R5s4QQ.mjs → composables-uj7hkBfP.mjs} +3 -3
  14. package/dist/{composables-b_R5s4QQ.mjs.map → composables-uj7hkBfP.mjs.map} +1 -1
  15. package/dist/{index-8MIK02ET.d.mts → index-BjK3JSNo.d.mts} +338 -770
  16. package/dist/index-BjK3JSNo.d.mts.map +1 -0
  17. package/dist/{index-B-asCcvK.d.mts → index-Dikou9bu.d.mts} +4 -2
  18. package/dist/{index-B-asCcvK.d.mts.map → index-Dikou9bu.d.mts.map} +1 -1
  19. package/dist/index.d.mts +6 -6
  20. package/dist/index.mjs +8 -5
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/{protocol--xy80nuC.d.mts → protocol-D8xt3DG7.d.mts} +31 -1
  23. package/dist/protocol-D8xt3DG7.d.mts.map +1 -0
  24. package/dist/testing/index.d.mts +8 -2
  25. package/dist/testing/index.d.mts.map +1 -1
  26. package/dist/testing/index.mjs +10 -7
  27. package/dist/testing/index.mjs.map +1 -1
  28. package/dist/{useVirtualViewport-CcJuIc7U.mjs → useVirtualViewport-DYuUlTxU.mjs} +2 -2
  29. package/dist/{useVirtualViewport-CcJuIc7U.mjs.map → useVirtualViewport-DYuUlTxU.mjs.map} +1 -1
  30. package/package.json +2 -2
  31. package/dist/accessibility-D1R9HiTE.d.mts +0 -40
  32. package/dist/accessibility-D1R9HiTE.d.mts.map +0 -1
  33. package/dist/app-DoXcF_Dn.mjs.map +0 -1
  34. package/dist/app-adHHi99c.d.mts.map +0 -1
  35. package/dist/components-DWIDBGTL.mjs.map +0 -1
  36. package/dist/index-8MIK02ET.d.mts.map +0 -1
  37. package/dist/protocol--xy80nuC.d.mts.map +0 -1
@@ -1,5 +1,5 @@
1
- import { i as useInput, r as useMouse, s as useIsScreenReaderEnabled, t as createVirtualViewport } from "./useVirtualViewport-CcJuIc7U.mjs";
2
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, h, mergeProps, onMounted, onUnmounted, openBlock, ref, renderList, renderSlot, unref, watch, withCtx } from "vue";
1
+ import { i as useInput, r as useMouse, s as useIsScreenReaderEnabled, t as createVirtualViewport } from "./useVirtualViewport-DYuUlTxU.mjs";
2
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, h, mergeProps, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useSlots, watch, withCtx } from "vue";
3
3
  //#region src/components/Box.ts
4
4
  /**
5
5
  * Box Component - Container with flexbox layout
@@ -150,70 +150,92 @@ const Box = defineComponent({
150
150
  }
151
151
  });
152
152
  //#endregion
153
- //#region src/components/Spacer.ts
154
- /**
155
- * Spacer Component - flexible empty space along the parent main axis.
156
- */
157
- const Spacer = defineComponent({
153
+ //#region src/components/FrescoSpacer.vue
154
+ var FrescoSpacer_default = /* @__PURE__ */ defineComponent({
158
155
  name: "Spacer",
159
- setup() {
160
- return () => h("box", { style: {
161
- flexGrow: 1,
162
- flexShrink: 1
163
- } });
156
+ __name: "FrescoSpacer",
157
+ setup(__props) {
158
+ return (_ctx, _cache) => {
159
+ return openBlock(), createBlock(unref(Box), {
160
+ "flex-grow": 1,
161
+ "flex-shrink": 1
162
+ });
163
+ };
164
164
  }
165
165
  });
166
166
  //#endregion
167
- //#region src/components/Divider.ts
168
- /**
169
- * Divider Component - Horizontal or vertical divider line
170
- */
171
- const Divider = defineComponent({
172
- name: "Divider",
167
+ //#region src/components/FrescoDivider.vue?vue&type=script&setup=true&lang.ts
168
+ const _hoisted_1$10 = ["fg"];
169
+ const _hoisted_2$8 = ["fg"];
170
+ const _hoisted_3$7 = ["fg"];
171
+ const _hoisted_4$3 = ["fg"];
172
+ const _hoisted_5$2 = ["fg"];
173
+ //#endregion
174
+ //#region src/components/FrescoDivider.vue
175
+ var FrescoDivider_default = /* @__PURE__ */ defineComponent({
176
+ name: "FrescoDivider",
177
+ __name: "FrescoDivider",
173
178
  props: {
174
179
  direction: {
175
180
  type: String,
181
+ required: false,
176
182
  default: "horizontal"
177
183
  },
178
- char: String,
179
- title: String,
184
+ char: {
185
+ type: String,
186
+ required: false
187
+ },
188
+ title: {
189
+ type: String,
190
+ required: false
191
+ },
180
192
  fg: {
181
193
  type: String,
194
+ required: false,
182
195
  default: "gray"
183
196
  },
184
- titleFg: String
197
+ titleFg: {
198
+ type: String,
199
+ required: false
200
+ }
185
201
  },
186
- setup(props) {
187
- return () => {
188
- const dividerChar = props.char ?? (props.direction === "horizontal" ? "─" : "│");
189
- if (props.direction === "vertical") return h("text", { fg: props.fg }, dividerChar);
190
- if (props.title) return h("box", { style: {
191
- flex_direction: "row",
192
- align_items: "center"
193
- } }, [
194
- h("text", { fg: props.fg }, dividerChar.repeat(3)),
195
- h("text", {
196
- fg: props.titleFg ?? props.fg,
202
+ setup(__props) {
203
+ const dividerChar = computed(() => __props.char ?? (__props.direction === "horizontal" ? "─" : "│"));
204
+ const titleLabel = computed(() => ` ${__props.title} `);
205
+ const titleRowStyle = {
206
+ flexDirection: "row",
207
+ alignItems: "center"
208
+ };
209
+ return (_ctx, _cache) => {
210
+ return __props.direction === "vertical" ? (openBlock(), createElementBlock("text", {
211
+ key: 0,
212
+ fg: __props.fg
213
+ }, toDisplayString(dividerChar.value), 9, _hoisted_1$10)) : __props.title ? (openBlock(), createElementBlock("div", {
214
+ key: 1,
215
+ style: titleRowStyle
216
+ }, [
217
+ createElementVNode("text", { fg: __props.fg }, toDisplayString(dividerChar.value.repeat(3)), 9, _hoisted_2$8),
218
+ createElementVNode("text", {
219
+ fg: __props.titleFg ?? __props.fg,
197
220
  bold: true
198
- }, ` ${props.title} `),
199
- h("text", { fg: props.fg }, dividerChar.repeat(3))
200
- ]);
201
- return h("text", { fg: props.fg }, dividerChar.repeat(40));
221
+ }, toDisplayString(titleLabel.value), 9, _hoisted_3$7),
222
+ createElementVNode("text", { fg: __props.fg }, toDisplayString(dividerChar.value.repeat(3)), 9, _hoisted_4$3)
223
+ ])) : (openBlock(), createElementBlock("text", {
224
+ key: 2,
225
+ fg: __props.fg
226
+ }, toDisplayString(dividerChar.value.repeat(40)), 9, _hoisted_5$2));
202
227
  };
203
228
  }
204
229
  });
205
230
  //#endregion
206
- //#region src/components/Stack.ts
207
- /**
208
- * Stack Component - Horizontal/Vertical stack layout helper
209
- */
210
- const ALIGN_MAP = {
231
+ //#region src/components/layout-primitive-types.ts
232
+ const stackAlignValues = {
211
233
  start: "flex-start",
212
234
  center: "center",
213
235
  end: "flex-end",
214
236
  stretch: "stretch"
215
237
  };
216
- const JUSTIFY_MAP = {
238
+ const stackJustifyValues = {
217
239
  start: "flex-start",
218
240
  center: "center",
219
241
  end: "flex-end",
@@ -221,74 +243,125 @@ const JUSTIFY_MAP = {
221
243
  around: "space-around",
222
244
  evenly: "space-evenly"
223
245
  };
224
- const Stack = defineComponent({
225
- name: "Stack",
246
+ //#endregion
247
+ //#region src/components/FrescoStack.vue
248
+ var FrescoStack_default = /* @__PURE__ */ defineComponent({
249
+ name: "FrescoStack",
250
+ __name: "FrescoStack",
226
251
  props: {
227
252
  direction: {
228
253
  type: String,
254
+ required: false,
229
255
  default: "vertical"
230
256
  },
231
257
  gap: {
232
258
  type: Number,
259
+ required: false,
233
260
  default: 0
234
261
  },
235
262
  align: {
236
263
  type: String,
264
+ required: false,
237
265
  default: "stretch"
238
266
  },
239
267
  justify: {
240
268
  type: String,
269
+ required: false,
241
270
  default: "start"
242
271
  },
243
272
  wrap: {
244
273
  type: Boolean,
274
+ required: false,
245
275
  default: false
246
276
  }
247
277
  },
248
- setup(props, { slots }) {
249
- return () => {
250
- return h("box", { style: {
251
- flex_direction: props.direction === "horizontal" ? "row" : "column",
252
- gap: props.gap,
253
- align_items: ALIGN_MAP[props.align ?? "stretch"],
254
- justify_content: JUSTIFY_MAP[props.justify ?? "start"],
255
- flex_wrap: props.wrap ? "wrap" : "nowrap"
256
- } }, slots.default?.());
278
+ setup(__props) {
279
+ const stackStyle = computed(() => ({
280
+ flexDirection: __props.direction === "horizontal" ? "row" : "column",
281
+ gap: __props.gap,
282
+ alignItems: stackAlignValues[__props.align],
283
+ justifyContent: stackJustifyValues[__props.justify],
284
+ flexWrap: __props.wrap ? "wrap" : "nowrap"
285
+ }));
286
+ return (_ctx, _cache) => {
287
+ return openBlock(), createElementBlock("div", { style: normalizeStyle(stackStyle.value) }, [renderSlot(_ctx.$slots, "default")], 4);
257
288
  };
258
289
  }
259
290
  });
260
- const HStack = defineComponent({
261
- name: "HStack",
291
+ //#endregion
292
+ //#region src/components/FrescoHStack.vue
293
+ var FrescoHStack_default = /* @__PURE__ */ defineComponent({
294
+ name: "FrescoHStack",
295
+ __name: "FrescoHStack",
262
296
  props: {
263
297
  gap: {
264
298
  type: Number,
299
+ required: false,
265
300
  default: 1
266
301
  },
267
- align: String,
268
- justify: String
302
+ align: {
303
+ type: String,
304
+ required: false
305
+ },
306
+ justify: {
307
+ type: String,
308
+ required: false
309
+ }
269
310
  },
270
- setup(props, { slots }) {
271
- return () => h(Stack, {
272
- direction: "horizontal",
273
- ...props
274
- }, slots.default);
311
+ setup(__props) {
312
+ return (_ctx, _cache) => {
313
+ return openBlock(), createBlock(FrescoStack_default, {
314
+ direction: "horizontal",
315
+ gap: __props.gap,
316
+ align: __props.align,
317
+ justify: __props.justify
318
+ }, {
319
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
320
+ _: 3
321
+ }, 8, [
322
+ "gap",
323
+ "align",
324
+ "justify"
325
+ ]);
326
+ };
275
327
  }
276
328
  });
277
- const VStack = defineComponent({
278
- name: "VStack",
329
+ //#endregion
330
+ //#region src/components/FrescoVStack.vue
331
+ var FrescoVStack_default = /* @__PURE__ */ defineComponent({
332
+ name: "FrescoVStack",
333
+ __name: "FrescoVStack",
279
334
  props: {
280
335
  gap: {
281
336
  type: Number,
337
+ required: false,
282
338
  default: 0
283
339
  },
284
- align: String,
285
- justify: String
340
+ align: {
341
+ type: String,
342
+ required: false
343
+ },
344
+ justify: {
345
+ type: String,
346
+ required: false
347
+ }
286
348
  },
287
- setup(props, { slots }) {
288
- return () => h(Stack, {
289
- direction: "vertical",
290
- ...props
291
- }, slots.default);
349
+ setup(__props) {
350
+ return (_ctx, _cache) => {
351
+ return openBlock(), createBlock(FrescoStack_default, {
352
+ direction: "vertical",
353
+ gap: __props.gap,
354
+ align: __props.align,
355
+ justify: __props.justify
356
+ }, {
357
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
358
+ _: 3
359
+ }, 8, [
360
+ "gap",
361
+ "align",
362
+ "justify"
363
+ ]);
364
+ };
292
365
  }
293
366
  });
294
367
  //#endregion
@@ -342,66 +415,96 @@ const Grid = defineComponent({
342
415
  }
343
416
  });
344
417
  //#endregion
345
- //#region src/components/Card.ts
346
- /**
347
- * Card Component - Container card with optional header and footer
348
- */
349
- const Card = defineComponent({
350
- name: "Card",
418
+ //#region src/components/FrescoCard.vue?vue&type=script&setup=true&lang.ts
419
+ const _hoisted_1$9 = [
420
+ "border",
421
+ "fg",
422
+ "bg"
423
+ ];
424
+ const _hoisted_2$7 = ["fg"];
425
+ const _hoisted_3$6 = {
426
+ key: 1,
427
+ dim: true
428
+ };
429
+ const _hoisted_4$2 = { dim: true };
430
+ //#endregion
431
+ //#region src/components/FrescoCard.vue
432
+ var FrescoCard_default = /* @__PURE__ */ defineComponent({
433
+ name: "FrescoCard",
434
+ __name: "FrescoCard",
351
435
  props: {
352
- title: String,
353
- subtitle: String,
354
- footer: String,
436
+ title: {
437
+ type: String,
438
+ required: false
439
+ },
440
+ subtitle: {
441
+ type: String,
442
+ required: false
443
+ },
444
+ footer: {
445
+ type: String,
446
+ required: false
447
+ },
355
448
  border: {
356
449
  type: String,
450
+ required: false,
357
451
  default: "rounded"
358
452
  },
359
453
  padding: {
360
454
  type: Number,
455
+ required: false,
361
456
  default: 1
362
457
  },
363
458
  titleFg: {
364
459
  type: String,
460
+ required: false,
365
461
  default: "white"
366
462
  },
367
- borderFg: String,
368
- bg: String
463
+ borderFg: {
464
+ type: String,
465
+ required: false
466
+ },
467
+ bg: {
468
+ type: String,
469
+ required: false
470
+ }
369
471
  },
370
- setup(props, { slots }) {
371
- return () => {
372
- const children = [];
373
- if (props.title || props.subtitle) {
374
- const headerContent = [];
375
- if (props.title) headerContent.push(h("text", {
376
- fg: props.titleFg,
472
+ setup(__props) {
473
+ const slots = useSlots();
474
+ const hasHeader = computed(() => Boolean(__props.title || __props.subtitle));
475
+ const hasFooter = computed(() => Boolean(__props.footer || slots.footer));
476
+ const containerStyle = computed(() => ({
477
+ flexDirection: "column",
478
+ padding: __props.padding
479
+ }));
480
+ const headerStyle = {
481
+ flexDirection: "row",
482
+ marginBottom: 1
483
+ };
484
+ const contentStyle = { flexGrow: 1 };
485
+ const footerStyle = { marginTop: 1 };
486
+ const subtitleLabel = computed(() => __props.subtitle ? __props.title ? ` - ${__props.subtitle}` : __props.subtitle : "");
487
+ return (_ctx, _cache) => {
488
+ return openBlock(), createElementBlock("div", {
489
+ border: __props.border === "none" ? void 0 : __props.border,
490
+ fg: __props.borderFg,
491
+ bg: __props.bg,
492
+ style: normalizeStyle(containerStyle.value)
493
+ }, [
494
+ hasHeader.value ? (openBlock(), createElementBlock("div", {
495
+ key: 0,
496
+ style: headerStyle
497
+ }, [__props.title ? (openBlock(), createElementBlock("text", {
498
+ key: 0,
499
+ fg: __props.titleFg,
377
500
  bold: true
378
- }, props.title));
379
- if (props.subtitle) headerContent.push(h("text", { dim: true }, props.title ? ` - ${props.subtitle}` : props.subtitle));
380
- children.push(h("box", {
381
- key: "header",
382
- style: {
383
- flex_direction: "row",
384
- margin_bottom: 1
385
- }
386
- }, headerContent));
387
- }
388
- children.push(h("box", {
389
- key: "content",
390
- style: { flex_grow: 1 }
391
- }, slots.default?.()));
392
- if (props.footer || slots.footer) children.push(h("box", {
393
- key: "footer",
394
- style: { margin_top: 1 }
395
- }, slots.footer?.() ?? [h("text", { dim: true }, props.footer)]));
396
- return h("box", {
397
- border: props.border === "none" ? void 0 : props.border,
398
- fg: props.borderFg,
399
- bg: props.bg,
400
- style: {
401
- flex_direction: "column",
402
- padding: props.padding
403
- }
404
- }, children);
501
+ }, toDisplayString(__props.title), 9, _hoisted_2$7)) : createCommentVNode("v-if", true), __props.subtitle ? (openBlock(), createElementBlock("text", _hoisted_3$6, toDisplayString(subtitleLabel.value), 1)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true),
502
+ createElementVNode("div", { style: contentStyle }, [renderSlot(_ctx.$slots, "default")]),
503
+ hasFooter.value ? (openBlock(), createElementBlock("div", {
504
+ key: 1,
505
+ style: footerStyle
506
+ }, [renderSlot(_ctx.$slots, "footer", {}, () => [createElementVNode("text", _hoisted_4$2, toDisplayString(__props.footer), 1)])])) : createCommentVNode("v-if", true)
507
+ ], 12, _hoisted_1$9);
405
508
  };
406
509
  }
407
510
  });
@@ -845,80 +948,101 @@ var ScrollBox_default = /* @__PURE__ */ defineComponent({
845
948
  }
846
949
  });
847
950
  //#endregion
848
- //#region src/components/Newline.ts
849
- /**
850
- * Newline Component - inserts one or more newline characters inside Text.
851
- */
852
- const Newline = defineComponent({
951
+ //#region src/components/FrescoNewline.vue?vue&type=script&setup=true&lang.ts
952
+ const _hoisted_1$8 = ["text"];
953
+ //#endregion
954
+ //#region src/components/FrescoNewline.vue
955
+ var FrescoNewline_default = /* @__PURE__ */ defineComponent({
853
956
  name: "Newline",
957
+ __name: "FrescoNewline",
854
958
  props: { count: {
855
959
  type: Number,
960
+ required: false,
856
961
  default: 1
857
962
  } },
858
- setup(props) {
859
- return () => h("text", { text: "\n".repeat(Math.max(0, props.count)) });
963
+ setup(__props) {
964
+ const content = computed(() => "\n".repeat(Math.max(0, __props.count)));
965
+ return (_ctx, _cache) => {
966
+ return openBlock(), createElementBlock("text", { text: content.value }, null, 8, _hoisted_1$8);
967
+ };
860
968
  }
861
969
  });
862
970
  //#endregion
863
- //#region src/components/Static.ts
864
- /**
865
- * Static Component - renders stable items above the live area.
866
- *
867
- * The app renderer treats this component specially: newly added items are
868
- * promoted into a persistent output region above the live frame.
869
- */
870
- const Static = defineComponent({
971
+ //#region src/components/FrescoStatic.vue
972
+ var FrescoStatic_default = /* @__PURE__ */ defineComponent({
871
973
  name: "Static",
974
+ __name: "FrescoStatic",
872
975
  props: {
873
976
  items: {
874
977
  type: Array,
978
+ required: false,
875
979
  default: () => []
876
980
  },
877
- style: Object
981
+ style: {
982
+ type: null,
983
+ required: false
984
+ }
878
985
  },
879
- setup(props, { slots }) {
880
- return () => {
881
- const renderItem = slots.default;
882
- return h("box", {
986
+ setup(__props) {
987
+ const containerStyle = computed(() => ({
988
+ position: "absolute",
989
+ flexDirection: "column",
990
+ ...__props.style
991
+ }));
992
+ const itemStyle = { flexDirection: "column" };
993
+ const renderedItems = computed(() => __props.items.map((item, index) => ({
994
+ item,
995
+ index,
996
+ key: `static-${index}`
997
+ })));
998
+ return (_ctx, _cache) => {
999
+ return openBlock(), createElementBlock("div", {
883
1000
  internal_static: true,
884
- style: {
885
- position: "absolute",
886
- flexDirection: "column",
887
- ...props.style
888
- }
889
- }, props.items.map((item, index) => h("box", {
890
- key: index,
891
- internal_static_item: true,
892
- style: { flexDirection: "column" }
893
- }, renderItem?.({
894
- item,
895
- index
896
- }) ?? [])));
1001
+ style: normalizeStyle(containerStyle.value)
1002
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(renderedItems.value, (entry) => {
1003
+ return openBlock(), createElementBlock("div", {
1004
+ key: entry.key,
1005
+ internal_static_item: true,
1006
+ style: itemStyle
1007
+ }, [renderSlot(_ctx.$slots, "default", {
1008
+ item: entry.item,
1009
+ index: entry.index
1010
+ })]);
1011
+ }), 128))], 4);
897
1012
  };
898
1013
  }
899
1014
  });
900
1015
  //#endregion
901
- //#region src/components/Transform.ts
902
- /**
903
- * Transform Component - transforms stringified child output before rendering.
904
- */
905
- const Transform = defineComponent({
1016
+ //#region src/components/FrescoTransform.vue?vue&type=script&setup=true&lang.ts
1017
+ const _hoisted_1$7 = ["text", "aria-label"];
1018
+ //#endregion
1019
+ //#region src/components/FrescoTransform.vue
1020
+ var FrescoTransform_default = /* @__PURE__ */ defineComponent({
906
1021
  name: "Transform",
1022
+ __name: "FrescoTransform",
907
1023
  props: {
908
- accessibilityLabel: String,
1024
+ accessibilityLabel: {
1025
+ type: String,
1026
+ required: false
1027
+ },
909
1028
  transform: {
910
1029
  type: Function,
911
1030
  required: true
912
1031
  }
913
1032
  },
914
- setup(props, { slots }) {
1033
+ setup(__props) {
1034
+ const props = __props;
1035
+ const slots = useSlots();
915
1036
  const isScreenReaderEnabled = useIsScreenReaderEnabled();
916
- return () => {
1037
+ const content = computed(() => {
917
1038
  const text = stringifyChildren(slots.default?.());
918
- return h("text", {
919
- text: isScreenReaderEnabled && props.accessibilityLabel ? props.accessibilityLabel : text.split("\n").map((line, index) => props.transform(line, index)).join("\n"),
920
- "aria-label": props.accessibilityLabel
921
- });
1039
+ return isScreenReaderEnabled && props.accessibilityLabel ? props.accessibilityLabel : text.split("\n").map((line, index) => props.transform(line, index)).join("\n");
1040
+ });
1041
+ return (_ctx, _cache) => {
1042
+ return openBlock(), createElementBlock("text", {
1043
+ text: content.value,
1044
+ "aria-label": __props.accessibilityLabel
1045
+ }, null, 8, _hoisted_1$7);
922
1046
  };
923
1047
  }
924
1048
  });
@@ -1003,40 +1127,49 @@ const Code = defineComponent({
1003
1127
  }
1004
1128
  });
1005
1129
  //#endregion
1006
- //#region src/components/Link.ts
1007
- /**
1008
- * Link Component - Clickable/styled link
1009
- */
1010
- const Link = defineComponent({
1011
- name: "Link",
1130
+ //#region src/components/FrescoLink.vue?vue&type=script&setup=true&lang.ts
1131
+ const _hoisted_1$6 = ["fg", "underline"];
1132
+ const _hoisted_2$6 = {
1133
+ key: 0,
1134
+ dim: true
1135
+ };
1136
+ //#endregion
1137
+ //#region src/components/FrescoLink.vue
1138
+ var FrescoLink_default = /* @__PURE__ */ defineComponent({
1139
+ name: "FrescoLink",
1140
+ __name: "FrescoLink",
1012
1141
  props: {
1013
1142
  text: {
1014
1143
  type: String,
1015
1144
  required: true
1016
1145
  },
1017
- url: String,
1146
+ url: {
1147
+ type: String,
1148
+ required: false
1149
+ },
1018
1150
  fg: {
1019
1151
  type: String,
1152
+ required: false,
1020
1153
  default: "blue"
1021
1154
  },
1022
1155
  underline: {
1023
1156
  type: Boolean,
1157
+ required: false,
1024
1158
  default: true
1025
1159
  },
1026
1160
  showUrl: {
1027
1161
  type: Boolean,
1162
+ required: false,
1028
1163
  default: false
1029
1164
  }
1030
1165
  },
1031
- emits: ["click"],
1032
- setup(props, { emit: _emit }) {
1033
- return () => {
1034
- const parts = [h("text", {
1035
- fg: props.fg,
1036
- underline: props.underline
1037
- }, props.text)];
1038
- if (props.showUrl && props.url) parts.push(h("text", { dim: true }, ` (${props.url})`));
1039
- return h("box", { style: { flex_direction: "row" } }, parts);
1166
+ setup(__props) {
1167
+ const rowStyle = { flexDirection: "row" };
1168
+ return (_ctx, _cache) => {
1169
+ return openBlock(), createElementBlock("div", { style: rowStyle }, [createElementVNode("text", {
1170
+ fg: __props.fg,
1171
+ underline: __props.underline
1172
+ }, toDisplayString(__props.text), 9, _hoisted_1$6), __props.showUrl && __props.url ? (openBlock(), createElementBlock("text", _hoisted_2$6, " (" + toDisplayString(__props.url) + ")", 1)) : createCommentVNode("v-if", true)]);
1040
1173
  };
1041
1174
  }
1042
1175
  });
@@ -1707,13 +1840,16 @@ const Form = defineComponent({
1707
1840
  }
1708
1841
  });
1709
1842
  //#endregion
1710
- //#region src/components/Spinner.ts
1711
- /**
1712
- * Spinner Component - Loading indicator
1713
- */
1714
- /**
1715
- * Spinner frame sets
1716
- */
1843
+ //#region src/components/display-primitive-types.ts
1844
+ /** Default foreground and background colors for each Badge variant. */
1845
+ const badgeVariantColors = {
1846
+ default: { fg: "white" },
1847
+ success: { fg: "green" },
1848
+ warning: { fg: "yellow" },
1849
+ error: { fg: "red" },
1850
+ info: { fg: "cyan" }
1851
+ };
1852
+ /** Built-in animation frame sets for Spinner. */
1717
1853
  const spinnerTypes = {
1718
1854
  dots: [
1719
1855
  "⠋",
@@ -1813,37 +1949,59 @@ const spinnerTypes = {
1813
1949
  "🌏"
1814
1950
  ]
1815
1951
  };
1816
- const Spinner = defineComponent({
1952
+ //#endregion
1953
+ //#region src/components/FrescoSpinner.vue
1954
+ var FrescoSpinner_default = /* @__PURE__ */ defineComponent({
1817
1955
  name: "Spinner",
1956
+ __name: "FrescoSpinner",
1818
1957
  props: {
1819
1958
  type: {
1820
- type: String,
1959
+ type: null,
1960
+ required: false,
1821
1961
  default: "dots"
1822
1962
  },
1823
- frames: Array,
1963
+ frames: {
1964
+ type: Array,
1965
+ required: false
1966
+ },
1824
1967
  interval: {
1825
1968
  type: Number,
1969
+ required: false,
1826
1970
  default: 80
1827
1971
  },
1828
- label: String,
1829
- fg: String
1972
+ label: {
1973
+ type: String,
1974
+ required: false
1975
+ },
1976
+ fg: {
1977
+ type: String,
1978
+ required: false
1979
+ }
1830
1980
  },
1831
- setup(props) {
1981
+ setup(__props) {
1832
1982
  const frameIndex = ref(0);
1983
+ const frames = computed(() => {
1984
+ const selectedFrames = __props.frames ?? spinnerTypes[__props.type] ?? spinnerTypes.dots;
1985
+ return selectedFrames.length > 0 ? selectedFrames : spinnerTypes.dots;
1986
+ });
1987
+ const content = computed(() => {
1988
+ const frame = frames.value[frameIndex.value % frames.value.length];
1989
+ return __props.label ? `${frame} ${__props.label}` : frame;
1990
+ });
1833
1991
  let timer = null;
1834
- const frames = props.frames ?? spinnerTypes[props.type] ?? spinnerTypes.dots;
1835
1992
  onMounted(() => {
1836
1993
  timer = setInterval(() => {
1837
- frameIndex.value = (frameIndex.value + 1) % frames.length;
1838
- }, props.interval);
1994
+ frameIndex.value = (frameIndex.value + 1) % frames.value.length;
1995
+ }, __props.interval);
1839
1996
  });
1840
1997
  onUnmounted(() => {
1841
1998
  if (timer) clearInterval(timer);
1842
1999
  });
1843
- return () => {
1844
- const frame = frames[frameIndex.value];
1845
- const content = props.label ? `${frame} ${props.label}` : frame;
1846
- return h(Text, { fg: props.fg }, () => content);
2000
+ return (_ctx, _cache) => {
2001
+ return openBlock(), createBlock(unref(Text), {
2002
+ content: content.value,
2003
+ fg: __props.fg
2004
+ }, null, 8, ["content", "fg"]);
1847
2005
  };
1848
2006
  }
1849
2007
  });
@@ -1950,11 +2108,9 @@ defineComponent({
1950
2108
  }
1951
2109
  });
1952
2110
  //#endregion
1953
- //#region src/components/Alert.ts
1954
- /**
1955
- * Alert Component - Alert/notification box
1956
- */
1957
- const ALERT_CONFIG = {
2111
+ //#region src/components/presentational-primitive-types.ts
2112
+ /** Visual defaults for each alert type. */
2113
+ const alertConfigs = {
1958
2114
  info: {
1959
2115
  icon: "ℹ",
1960
2116
  fg: "cyan",
@@ -1976,8 +2132,30 @@ const ALERT_CONFIG = {
1976
2132
  title: "Error"
1977
2133
  }
1978
2134
  };
1979
- const Alert = defineComponent({
1980
- name: "Alert",
2135
+ /** Foreground colors for avatar statuses. */
2136
+ const avatarStatusColors = {
2137
+ online: "green",
2138
+ offline: "gray",
2139
+ away: "yellow",
2140
+ busy: "red"
2141
+ };
2142
+ /** Glyphs for avatar statuses. */
2143
+ const avatarStatusIcons = {
2144
+ online: "●",
2145
+ offline: "○",
2146
+ away: "◐",
2147
+ busy: "⊘"
2148
+ };
2149
+ //#endregion
2150
+ //#region src/components/FrescoAlert.vue?vue&type=script&setup=true&lang.ts
2151
+ const _hoisted_1$5 = ["border", "fg"];
2152
+ const _hoisted_2$5 = ["fg"];
2153
+ const _hoisted_3$5 = ["fg"];
2154
+ //#endregion
2155
+ //#region src/components/FrescoAlert.vue
2156
+ var FrescoAlert_default = /* @__PURE__ */ defineComponent({
2157
+ name: "FrescoAlert",
2158
+ __name: "FrescoAlert",
1981
2159
  props: {
1982
2160
  message: {
1983
2161
  type: String,
@@ -1985,62 +2163,59 @@ const Alert = defineComponent({
1985
2163
  },
1986
2164
  type: {
1987
2165
  type: String,
2166
+ required: false,
1988
2167
  default: "info"
1989
2168
  },
1990
- title: String,
2169
+ title: {
2170
+ type: String,
2171
+ required: false
2172
+ },
1991
2173
  showIcon: {
1992
2174
  type: Boolean,
2175
+ required: false,
1993
2176
  default: true
1994
2177
  },
1995
2178
  border: {
1996
2179
  type: String,
2180
+ required: false,
1997
2181
  default: "rounded"
1998
2182
  }
1999
2183
  },
2000
- setup(props) {
2001
- return () => {
2002
- const config = ALERT_CONFIG[props.type];
2003
- const title = props.title ?? config.title;
2004
- const children = [];
2005
- const headerParts = [];
2006
- if (props.showIcon) headerParts.push(h("text", { fg: config.fg }, `${config.icon} `));
2007
- headerParts.push(h("text", {
2008
- fg: config.fg,
2184
+ setup(__props) {
2185
+ const config = computed(() => alertConfigs[__props.type]);
2186
+ const heading = computed(() => __props.title ?? config.value.title);
2187
+ const iconLabel = computed(() => `${config.value.icon} `);
2188
+ const containerStyle = {
2189
+ flexDirection: "column",
2190
+ padding: 1
2191
+ };
2192
+ const headerStyle = { flexDirection: "row" };
2193
+ const messageStyle = { marginTop: 1 };
2194
+ return (_ctx, _cache) => {
2195
+ return openBlock(), createElementBlock("div", {
2196
+ border: __props.border === "none" ? void 0 : __props.border,
2197
+ fg: config.value.fg,
2198
+ style: containerStyle
2199
+ }, [createElementVNode("div", { style: headerStyle }, [__props.showIcon ? (openBlock(), createElementBlock("text", {
2200
+ key: 0,
2201
+ fg: config.value.fg
2202
+ }, toDisplayString(iconLabel.value), 9, _hoisted_2$5)) : createCommentVNode("v-if", true), createElementVNode("text", {
2203
+ fg: config.value.fg,
2009
2204
  bold: true
2010
- }, title));
2011
- children.push(h("box", {
2012
- key: "header",
2013
- style: { flex_direction: "row" }
2014
- }, headerParts));
2015
- children.push(h("text", {
2016
- key: "message",
2017
- style: { margin_top: 1 }
2018
- }, props.message));
2019
- return h("box", {
2020
- border: props.border === "none" ? void 0 : props.border,
2021
- fg: config.fg,
2022
- style: {
2023
- flex_direction: "column",
2024
- padding: 1
2025
- }
2026
- }, children);
2205
+ }, toDisplayString(heading.value), 9, _hoisted_3$5)]), createElementVNode("text", { style: messageStyle }, toDisplayString(__props.message), 1)], 8, _hoisted_1$5);
2027
2206
  };
2028
2207
  }
2029
2208
  });
2030
2209
  //#endregion
2031
- //#region src/components/Badge.ts
2032
- /**
2033
- * Badge Component - Status badge/tag
2034
- */
2035
- const VARIANT_COLORS = {
2036
- default: { fg: "white" },
2037
- success: { fg: "green" },
2038
- warning: { fg: "yellow" },
2039
- error: { fg: "red" },
2040
- info: { fg: "cyan" }
2041
- };
2042
- const Badge = defineComponent({
2210
+ //#region src/components/FrescoBadge.vue?vue&type=script&setup=true&lang.ts
2211
+ const _hoisted_1$4 = ["fg", "bg"];
2212
+ const _hoisted_2$4 = ["fg", "bg"];
2213
+ const _hoisted_3$4 = ["fg", "bg"];
2214
+ //#endregion
2215
+ //#region src/components/FrescoBadge.vue
2216
+ var FrescoBadge_default = /* @__PURE__ */ defineComponent({
2043
2217
  name: "Badge",
2218
+ __name: "FrescoBadge",
2044
2219
  props: {
2045
2220
  label: {
2046
2221
  type: String,
@@ -2048,37 +2223,47 @@ const Badge = defineComponent({
2048
2223
  },
2049
2224
  variant: {
2050
2225
  type: String,
2226
+ required: false,
2051
2227
  default: "default"
2052
2228
  },
2053
- fg: String,
2054
- bg: String,
2229
+ fg: {
2230
+ type: String,
2231
+ required: false
2232
+ },
2233
+ bg: {
2234
+ type: String,
2235
+ required: false
2236
+ },
2055
2237
  border: {
2056
2238
  type: Boolean,
2239
+ required: false,
2057
2240
  default: false
2058
2241
  }
2059
2242
  },
2060
- setup(props) {
2061
- return () => {
2062
- const colors = VARIANT_COLORS[props.variant];
2063
- const fg = props.fg ?? colors.fg;
2064
- const bg = props.bg ?? colors.bg;
2065
- if (props.border) return h("box", {
2243
+ setup(__props) {
2244
+ const colors = computed(() => badgeVariantColors[__props.variant]);
2245
+ const foreground = computed(() => __props.fg ?? colors.value.fg);
2246
+ const background = computed(() => __props.bg ?? colors.value.bg);
2247
+ const borderStyle = {
2248
+ paddingLeft: 1,
2249
+ paddingRight: 1
2250
+ };
2251
+ return (_ctx, _cache) => {
2252
+ return __props.border ? (openBlock(), createElementBlock("div", {
2253
+ key: 0,
2066
2254
  border: "single",
2067
- fg,
2068
- bg,
2069
- style: {
2070
- padding_left: 1,
2071
- padding_right: 1
2072
- }
2073
- }, [h("text", {
2074
- fg,
2075
- bg
2076
- }, props.label)]);
2077
- return h("text", {
2078
- fg,
2079
- bg,
2255
+ fg: foreground.value,
2256
+ bg: background.value,
2257
+ style: borderStyle
2258
+ }, [createElementVNode("text", {
2259
+ fg: foreground.value,
2260
+ bg: background.value
2261
+ }, toDisplayString(__props.label), 9, _hoisted_2$4)], 8, _hoisted_1$4)) : (openBlock(), createElementBlock("text", {
2262
+ key: 1,
2263
+ fg: foreground.value,
2264
+ bg: background.value,
2080
2265
  bold: true
2081
- }, `[${props.label}]`);
2266
+ }, "[" + toDisplayString(__props.label) + "]", 9, _hoisted_3$4));
2082
2267
  };
2083
2268
  }
2084
2269
  });
@@ -2201,12 +2386,21 @@ const Timer = defineComponent({
2201
2386
  }
2202
2387
  });
2203
2388
  //#endregion
2204
- //#region src/components/Tooltip.ts
2205
- /**
2206
- * Tooltip Component - Tooltip overlay
2207
- */
2208
- const Tooltip = defineComponent({
2209
- name: "Tooltip",
2389
+ //#region src/components/FrescoTooltip.vue?vue&type=script&setup=true&lang.ts
2390
+ const _hoisted_1$3 = { key: 0 };
2391
+ const _hoisted_2$3 = [
2392
+ "border",
2393
+ "bg",
2394
+ "fg"
2395
+ ];
2396
+ const _hoisted_3$3 = ["fg", "bg"];
2397
+ const _hoisted_4$1 = { key: 1 };
2398
+ const _hoisted_5$1 = { key: 1 };
2399
+ //#endregion
2400
+ //#region src/components/FrescoTooltip.vue
2401
+ var FrescoTooltip_default = /* @__PURE__ */ defineComponent({
2402
+ name: "FrescoTooltip",
2403
+ __name: "FrescoTooltip",
2210
2404
  props: {
2211
2405
  text: {
2212
2406
  type: String,
@@ -2214,56 +2408,54 @@ const Tooltip = defineComponent({
2214
2408
  },
2215
2409
  visible: {
2216
2410
  type: Boolean,
2411
+ required: false,
2217
2412
  default: true
2218
2413
  },
2219
2414
  position: {
2220
2415
  type: String,
2416
+ required: false,
2221
2417
  default: "top"
2222
2418
  },
2223
2419
  border: {
2224
2420
  type: String,
2421
+ required: false,
2225
2422
  default: "rounded"
2226
2423
  },
2227
2424
  bg: {
2228
2425
  type: String,
2426
+ required: false,
2229
2427
  default: "white"
2230
2428
  },
2231
2429
  fg: {
2232
2430
  type: String,
2431
+ required: false,
2233
2432
  default: "black"
2234
2433
  }
2235
2434
  },
2236
- setup(props, { slots }) {
2237
- return () => {
2238
- const content = slots.default?.();
2239
- if (!props.visible) return h("box", {}, content);
2240
- const tooltip = h("box", {
2241
- key: "tooltip",
2242
- border: props.border === "none" ? void 0 : props.border,
2243
- bg: props.bg,
2244
- fg: props.fg,
2245
- style: {
2246
- padding_left: 1,
2247
- padding_right: 1
2248
- }
2249
- }, [h("text", {
2250
- fg: props.fg,
2251
- bg: props.bg
2252
- }, props.text)]);
2253
- const children = [];
2254
- switch (props.position) {
2255
- case "top":
2256
- children.push(tooltip);
2257
- children.push(h("box", { key: "content" }, content));
2258
- break;
2259
- case "bottom":
2260
- children.push(h("box", { key: "content" }, content));
2261
- children.push(tooltip);
2262
- break;
2263
- case "left": return h("box", { style: { flex_direction: "row" } }, [tooltip, h("box", { key: "content" }, content)]);
2264
- case "right": return h("box", { style: { flex_direction: "row" } }, [h("box", { key: "content" }, content), tooltip]);
2265
- }
2266
- return h("box", { style: { flex_direction: "column" } }, children);
2435
+ setup(__props) {
2436
+ const containerStyle = computed(() => ({ flexDirection: __props.position === "left" || __props.position === "right" ? "row" : "column" }));
2437
+ const tooltipStyle = {
2438
+ paddingLeft: 1,
2439
+ paddingRight: 1
2440
+ };
2441
+ const contentComesFirst = computed(() => __props.position === "bottom" || __props.position === "right");
2442
+ return (_ctx, _cache) => {
2443
+ return __props.visible ? (openBlock(), createElementBlock("div", {
2444
+ key: 0,
2445
+ style: normalizeStyle(containerStyle.value)
2446
+ }, [
2447
+ contentComesFirst.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("v-if", true),
2448
+ createElementVNode("div", {
2449
+ border: __props.border === "none" ? void 0 : __props.border,
2450
+ bg: __props.bg,
2451
+ fg: __props.fg,
2452
+ style: tooltipStyle
2453
+ }, [createElementVNode("text", {
2454
+ fg: __props.fg,
2455
+ bg: __props.bg
2456
+ }, toDisplayString(__props.text), 9, _hoisted_3$3)], 8, _hoisted_2$3),
2457
+ !contentComesFirst.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("v-if", true)
2458
+ ], 4)) : (openBlock(), createElementBlock("div", _hoisted_5$1, [renderSlot(_ctx.$slots, "default")]));
2267
2459
  };
2268
2460
  }
2269
2461
  });
@@ -2672,12 +2864,19 @@ const Tabs = defineComponent({
2672
2864
  }
2673
2865
  });
2674
2866
  //#endregion
2675
- //#region src/components/Breadcrumb.ts
2676
- /**
2677
- * Breadcrumb Component - Navigation breadcrumb
2678
- */
2679
- const Breadcrumb = defineComponent({
2680
- name: "Breadcrumb",
2867
+ //#region src/components/FrescoBreadcrumb.vue?vue&type=script&setup=true&lang.ts
2868
+ const _hoisted_1$2 = ["fg"];
2869
+ const _hoisted_2$2 = [
2870
+ "fg",
2871
+ "bold",
2872
+ "underline"
2873
+ ];
2874
+ const _hoisted_3$2 = ["fg"];
2875
+ //#endregion
2876
+ //#region src/components/FrescoBreadcrumb.vue
2877
+ var FrescoBreadcrumb_default = /* @__PURE__ */ defineComponent({
2878
+ name: "FrescoBreadcrumb",
2879
+ __name: "FrescoBreadcrumb",
2681
2880
  props: {
2682
2881
  items: {
2683
2882
  type: Array,
@@ -2685,43 +2884,47 @@ const Breadcrumb = defineComponent({
2685
2884
  },
2686
2885
  separator: {
2687
2886
  type: String,
2887
+ required: false,
2688
2888
  default: " > "
2689
2889
  },
2690
2890
  fg: {
2691
2891
  type: String,
2892
+ required: false,
2692
2893
  default: "gray"
2693
2894
  },
2694
2895
  activeFg: {
2695
2896
  type: String,
2897
+ required: false,
2696
2898
  default: "white"
2697
2899
  },
2698
2900
  separatorFg: {
2699
2901
  type: String,
2902
+ required: false,
2700
2903
  default: "gray"
2701
2904
  }
2702
2905
  },
2703
2906
  emits: ["select"],
2704
- setup(props, { emit: _emit }) {
2705
- return () => {
2706
- return h("box", { style: { flex_direction: "row" } }, props.items.flatMap((item, index) => {
2707
- const isLast = index === props.items.length - 1;
2708
- const result = [];
2709
- if (item.icon) result.push(h("text", {
2710
- key: `icon-${item.key}`,
2711
- fg: isLast ? props.activeFg : props.fg
2712
- }, `${item.icon} `));
2713
- result.push(h("text", {
2714
- key: item.key,
2715
- fg: isLast ? props.activeFg : props.fg,
2716
- bold: isLast,
2717
- underline: !isLast
2718
- }, item.label));
2719
- if (!isLast) result.push(h("text", {
2720
- key: `sep-${item.key}`,
2721
- fg: props.separatorFg
2722
- }, props.separator));
2723
- return result;
2724
- }));
2907
+ setup(__props) {
2908
+ const rowStyle = { flexDirection: "row" };
2909
+ const iconLabel = (item) => item.icon ? `${item.icon} ` : "";
2910
+ return (_ctx, _cache) => {
2911
+ return openBlock(), createElementBlock("div", { style: rowStyle }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
2912
+ return openBlock(), createElementBlock(Fragment, { key: item.key }, [
2913
+ item.icon ? (openBlock(), createElementBlock("text", {
2914
+ key: 0,
2915
+ fg: index === __props.items.length - 1 ? __props.activeFg : __props.fg
2916
+ }, toDisplayString(iconLabel(item)), 9, _hoisted_1$2)) : createCommentVNode("v-if", true),
2917
+ createElementVNode("text", {
2918
+ fg: index === __props.items.length - 1 ? __props.activeFg : __props.fg,
2919
+ bold: index === __props.items.length - 1,
2920
+ underline: index !== __props.items.length - 1
2921
+ }, toDisplayString(item.label), 9, _hoisted_2$2),
2922
+ index !== __props.items.length - 1 ? (openBlock(), createElementBlock("text", {
2923
+ key: 1,
2924
+ fg: __props.separatorFg
2925
+ }, toDisplayString(__props.separator), 9, _hoisted_3$2)) : createCommentVNode("v-if", true)
2926
+ ], 64);
2927
+ }), 128))]);
2725
2928
  };
2726
2929
  }
2727
2930
  });
@@ -2979,75 +3182,85 @@ const StatusBar = defineComponent({
2979
3182
  }
2980
3183
  });
2981
3184
  //#endregion
2982
- //#region src/components/Header.ts
2983
- /**
2984
- * Header Component - Application header
2985
- */
2986
- const Header = defineComponent({
2987
- name: "Header",
3185
+ //#region src/components/FrescoHeader.vue?vue&type=script&setup=true&lang.ts
3186
+ const _hoisted_1$1 = ["bg"];
3187
+ const _hoisted_2$1 = { key: 0 };
3188
+ const _hoisted_3$1 = ["fg"];
3189
+ const _hoisted_4 = ["fg"];
3190
+ const _hoisted_5 = { key: 0 };
3191
+ const _hoisted_6 = {
3192
+ key: 0,
3193
+ dim: true
3194
+ };
3195
+ //#endregion
3196
+ //#region src/components/FrescoHeader.vue
3197
+ var FrescoHeader_default = /* @__PURE__ */ defineComponent({
3198
+ name: "FrescoHeader",
3199
+ __name: "FrescoHeader",
2988
3200
  props: {
2989
3201
  title: {
2990
3202
  type: String,
2991
3203
  required: true
2992
3204
  },
2993
- subtitle: String,
2994
- left: String,
2995
- right: String,
2996
- bg: String,
3205
+ subtitle: {
3206
+ type: String,
3207
+ required: false
3208
+ },
3209
+ left: {
3210
+ type: String,
3211
+ required: false
3212
+ },
3213
+ right: {
3214
+ type: String,
3215
+ required: false
3216
+ },
3217
+ bg: {
3218
+ type: String,
3219
+ required: false
3220
+ },
2997
3221
  titleFg: {
2998
3222
  type: String,
3223
+ required: false,
2999
3224
  default: "white"
3000
3225
  },
3001
3226
  subtitleFg: {
3002
3227
  type: String,
3228
+ required: false,
3003
3229
  default: "gray"
3004
3230
  },
3005
3231
  borderBottom: {
3006
3232
  type: Boolean,
3233
+ required: false,
3007
3234
  default: false
3008
3235
  }
3009
3236
  },
3010
- setup(props, { slots }) {
3011
- return () => {
3012
- const leftContent = slots.left?.() ?? (props.left ? [h("text", {}, props.left)] : []);
3013
- const rightContent = slots.right?.() ?? (props.right ? [h("text", {}, props.right)] : []);
3014
- const centerContent = [h("text", {
3015
- fg: props.titleFg,
3016
- bold: true
3017
- }, props.title)];
3018
- if (props.subtitle) centerContent.push(h("text", {
3019
- fg: props.subtitleFg,
3020
- dim: true
3021
- }, ` - ${props.subtitle}`));
3022
- const children = [h("box", {
3023
- key: "header-content",
3024
- bg: props.bg,
3025
- style: {
3026
- flex_direction: "row",
3027
- justify_content: "space-between",
3028
- align_items: "center",
3029
- width: "100%",
3030
- padding: 1
3031
- }
3237
+ setup(__props) {
3238
+ const rootStyle = { flexDirection: "column" };
3239
+ const contentStyle = {
3240
+ flexDirection: "row",
3241
+ justifyContent: "space-between",
3242
+ alignItems: "center",
3243
+ width: "100%",
3244
+ padding: 1
3245
+ };
3246
+ const rowStyle = { flexDirection: "row" };
3247
+ const borderLabel = "─".repeat(80);
3248
+ return (_ctx, _cache) => {
3249
+ return openBlock(), createElementBlock("div", { style: rootStyle }, [createElementVNode("div", {
3250
+ bg: __props.bg,
3251
+ style: contentStyle
3032
3252
  }, [
3033
- h("box", {
3034
- key: "left",
3035
- style: { flex_direction: "row" }
3036
- }, leftContent),
3037
- h("box", {
3038
- key: "center",
3039
- style: { flex_direction: "row" }
3040
- }, centerContent),
3041
- h("box", {
3042
- key: "right",
3043
- style: { flex_direction: "row" }
3044
- }, rightContent)
3045
- ])];
3046
- if (props.borderBottom) children.push(h("text", {
3047
- key: "border",
3048
- dim: true
3049
- }, "─".repeat(80)));
3050
- return h("box", { style: { flex_direction: "column" } }, children);
3253
+ createElementVNode("div", { style: rowStyle }, [renderSlot(_ctx.$slots, "left", {}, () => [__props.left ? (openBlock(), createElementBlock("text", _hoisted_2$1, toDisplayString(__props.left), 1)) : createCommentVNode("v-if", true)])]),
3254
+ createElementVNode("div", { style: rowStyle }, [createElementVNode("text", {
3255
+ fg: __props.titleFg,
3256
+ bold: true
3257
+ }, toDisplayString(__props.title), 9, _hoisted_3$1), __props.subtitle ? (openBlock(), createElementBlock("text", {
3258
+ key: 0,
3259
+ fg: __props.subtitleFg,
3260
+ dim: true
3261
+ }, " - " + toDisplayString(__props.subtitle), 9, _hoisted_4)) : createCommentVNode("v-if", true)]),
3262
+ createElementVNode("div", { style: rowStyle }, [renderSlot(_ctx.$slots, "right", {}, () => [__props.right ? (openBlock(), createElementBlock("text", _hoisted_5, toDisplayString(__props.right), 1)) : createCommentVNode("v-if", true)])])
3263
+ ], 8, _hoisted_1$1), __props.borderBottom ? (openBlock(), createElementBlock("text", _hoisted_6, toDisplayString(unref(borderLabel)), 1)) : createCommentVNode("v-if", true)]);
3051
3264
  };
3052
3265
  }
3053
3266
  });
@@ -3113,82 +3326,81 @@ const KeyHint = defineComponent({
3113
3326
  }
3114
3327
  });
3115
3328
  //#endregion
3116
- //#region src/components/Avatar.ts
3117
- /**
3118
- * Avatar Component - User avatar display
3119
- */
3120
- const STATUS_COLORS = {
3121
- online: "green",
3122
- offline: "gray",
3123
- away: "yellow",
3124
- busy: "red"
3125
- };
3126
- const STATUS_ICONS = {
3127
- online: "●",
3128
- offline: "○",
3129
- away: "◐",
3130
- busy: "⊘"
3131
- };
3132
- const Avatar = defineComponent({
3133
- name: "Avatar",
3329
+ //#region src/components/FrescoAvatar.vue?vue&type=script&setup=true&lang.ts
3330
+ const _hoisted_1 = ["border", "bg"];
3331
+ const _hoisted_2 = ["fg", "bg"];
3332
+ const _hoisted_3 = ["fg"];
3333
+ //#endregion
3334
+ //#region src/components/FrescoAvatar.vue
3335
+ var FrescoAvatar_default = /* @__PURE__ */ defineComponent({
3336
+ name: "FrescoAvatar",
3337
+ __name: "FrescoAvatar",
3134
3338
  props: {
3135
- name: String,
3136
- initials: String,
3339
+ name: {
3340
+ type: String,
3341
+ required: false
3342
+ },
3343
+ initials: {
3344
+ type: String,
3345
+ required: false
3346
+ },
3137
3347
  size: {
3138
3348
  type: String,
3349
+ required: false,
3139
3350
  default: "md"
3140
3351
  },
3141
3352
  bg: {
3142
3353
  type: String,
3354
+ required: false,
3143
3355
  default: "blue"
3144
3356
  },
3145
3357
  fg: {
3146
3358
  type: String,
3359
+ required: false,
3147
3360
  default: "white"
3148
3361
  },
3149
3362
  border: {
3150
3363
  type: Boolean,
3364
+ required: false,
3151
3365
  default: true
3152
3366
  },
3153
- status: { type: String }
3367
+ status: {
3368
+ type: String,
3369
+ required: false
3370
+ }
3154
3371
  },
3155
- setup(props) {
3156
- return () => {
3157
- let displayInitials = props.initials;
3158
- if (!displayInitials && props.name) {
3159
- const parts = props.name.split(" ").filter(Boolean);
3160
- if (parts.length >= 2) displayInitials = `${parts[0][0]}${parts[1][0]}`.toUpperCase();
3161
- else if (parts.length === 1) displayInitials = parts[0].slice(0, 2).toUpperCase();
3162
- }
3163
- displayInitials = displayInitials || "??";
3164
- const padding = props.size === "sm" ? 0 : props.size === "lg" ? 1 : 0;
3165
- const children = [h("text", {
3166
- fg: props.fg,
3167
- bg: props.bg,
3372
+ setup(__props) {
3373
+ const takeCodePoints = (value, count) => Array.from(value).slice(0, count).join("");
3374
+ const displayInitials = computed(() => {
3375
+ if (__props.initials) return __props.initials;
3376
+ const parts = __props.name?.split(" ").filter(Boolean) ?? [];
3377
+ if (parts.length >= 2) return `${takeCodePoints(parts[0], 1)}${takeCodePoints(parts[1], 1)}`.toUpperCase();
3378
+ if (parts.length === 1) return takeCodePoints(parts[0], 2).toUpperCase();
3379
+ return "??";
3380
+ });
3381
+ const padding = computed(() => __props.size === "lg" ? 1 : 0);
3382
+ const containerStyle = computed(() => ({
3383
+ flexDirection: "row",
3384
+ paddingLeft: padding.value,
3385
+ paddingRight: padding.value
3386
+ }));
3387
+ return (_ctx, _cache) => {
3388
+ return openBlock(), createElementBlock("div", {
3389
+ border: __props.border ? "rounded" : void 0,
3390
+ bg: __props.bg,
3391
+ style: normalizeStyle(containerStyle.value)
3392
+ }, [createElementVNode("text", {
3393
+ fg: __props.fg,
3394
+ bg: __props.bg,
3168
3395
  bold: true
3169
- }, displayInitials)];
3170
- if (props.status) children.push(h("text", { fg: STATUS_COLORS[props.status] }, STATUS_ICONS[props.status]));
3171
- if (props.border) return h("box", {
3172
- border: "rounded",
3173
- bg: props.bg,
3174
- style: {
3175
- flex_direction: "row",
3176
- padding_left: padding,
3177
- padding_right: padding
3178
- }
3179
- }, children);
3180
- return h("box", {
3181
- bg: props.bg,
3182
- style: {
3183
- flex_direction: "row",
3184
- padding_left: padding,
3185
- padding_right: padding
3186
- }
3187
- }, children);
3396
+ }, toDisplayString(displayInitials.value), 9, _hoisted_2), __props.status ? (openBlock(), createElementBlock("text", {
3397
+ key: 0,
3398
+ fg: unref(avatarStatusColors)[__props.status]
3399
+ }, toDisplayString(unref(avatarStatusIcons)[__props.status]), 9, _hoisted_3)) : createCommentVNode("v-if", true)], 12, _hoisted_1);
3188
3400
  };
3189
3401
  }
3190
3402
  });
3191
3403
  //#endregion
3192
- export { Newline as A, Spacer as B, Select as C, Code as D, Link as E, Grid as F, HStack as I, Stack as L, ScrollBar_default as M, Text as N, Transform as O, Card as P, VStack as R, Checkbox as S, TextInput as T, Box as V, ProgressBar as _, Modal as a, Confirm as b, Tabs as c, Table as d, List as f, Alert as g, Badge as h, StatusBar as i, ScrollBox_default as j, Static as k, Menu as l, Timer as m, KeyHint as n, Stepper as o, Tooltip as p, Header as r, Breadcrumb as s, Avatar as t, Tree as u, Spinner as v, TextArea as w, RadioGroup as x, Form as y, Divider as z };
3404
+ export { FrescoNewline_default as A, FrescoSpacer_default as B, Select as C, Code as D, FrescoLink_default as E, Grid as F, FrescoVStack_default as I, FrescoHStack_default as L, ScrollBar_default as M, Text as N, FrescoTransform_default as O, FrescoCard_default as P, FrescoStack_default as R, Checkbox as S, TextInput as T, Box as V, ProgressBar as _, Modal as a, Confirm as b, Tabs as c, Table as d, List as f, FrescoAlert_default as g, FrescoBadge_default as h, StatusBar as i, ScrollBox_default as j, FrescoStatic_default as k, Menu as l, Timer as m, KeyHint as n, Stepper as o, FrescoTooltip_default as p, FrescoHeader_default as r, FrescoBreadcrumb_default as s, FrescoAvatar_default as t, Tree as u, FrescoSpinner_default as v, TextArea as w, RadioGroup as x, Form as y, FrescoDivider_default as z };
3193
3405
 
3194
- //# sourceMappingURL=components-DWIDBGTL.mjs.map
3406
+ //# sourceMappingURL=components-C57eT1BL.mjs.map