@soubiran/ui 0.2.1 → 0.4.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/index.js CHANGED
@@ -15,13 +15,12 @@ import { RadioGroupIndicator, RadioGroupItem, RadioGroupRoot } from "reka-ui";
15
15
  import USeparator from "@nuxt/ui/components/Separator.vue";
16
16
  import { createSharedComposable } from "@vueuse/core";
17
17
  import PartySocket from "partysocket";
18
-
19
18
  //#region src/components/Container.vue
20
19
  const container = tv({ slots: {
21
20
  base: "px-4 sm:px-6 lg:px-8",
22
21
  inner: "w-full max-w-7xl mx-auto"
23
22
  } });
24
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
23
+ const _sfc_main = /* @__PURE__ */ defineComponent({
25
24
  __name: "Container",
26
25
  props: {
27
26
  class: {},
@@ -35,8 +34,6 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
35
34
  };
36
35
  }
37
36
  });
38
- var Container_default = _sfc_main$10;
39
-
40
37
  //#endregion
41
38
  //#region ~icons/ph/thumbs-up
42
39
  const _hoisted_1$11 = {
@@ -54,7 +51,6 @@ var thumbs_up_default = markRaw({
54
51
  name: "ph-thumbs-up",
55
52
  render: render$7
56
53
  });
57
-
58
54
  //#endregion
59
55
  //#region src/composables/useUmami.ts
60
56
  function useUmami() {
@@ -67,7 +63,6 @@ function useUmami() {
67
63
  }
68
64
  return { track };
69
65
  }
70
-
71
66
  //#endregion
72
67
  //#region ~icons/ph/check-circle
73
68
  const _hoisted_1$10 = {
@@ -85,7 +80,6 @@ var check_circle_default = markRaw({
85
80
  name: "ph-check-circle",
86
81
  render: render$6
87
82
  });
88
-
89
83
  //#endregion
90
84
  //#region src/components/FeedbackCard.vue
91
85
  const _hoisted_1$9 = ["for"];
@@ -99,7 +93,7 @@ const feedbackCard = tv({ slots: {
99
93
  radioGroupItem: "peer",
100
94
  radioGroupLabel: "grayscale-100 hover:grayscale-0 peer-data-[state=checked]:grayscale-0"
101
95
  } });
102
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
96
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
103
97
  __name: "FeedbackCard",
104
98
  props: /* @__PURE__ */ mergeModels({
105
99
  id: {},
@@ -138,11 +132,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
138
132
  const successfullySent = ref(false);
139
133
  const { track } = useUmami();
140
134
  const { mutate, isLoading, error } = useMutation({
141
- mutation: ({ rating: rating$1, content: content$1 }) => ofetch(`/api/posts/${props.id}/feedback`, {
135
+ mutation: ({ rating, content }) => ofetch(`/api/posts/${props.id}/feedback`, {
142
136
  method: "POST",
143
137
  body: {
144
- rating: rating$1,
145
- content: content$1
138
+ rating,
139
+ content
146
140
  },
147
141
  baseURL: import.meta.env.VITE_API_BASE_URL
148
142
  }),
@@ -294,12 +288,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
294
288
  };
295
289
  }
296
290
  });
297
- var FeedbackCard_default = _sfc_main$9;
298
-
299
291
  //#endregion
300
292
  //#region src/components/Feedback.vue
301
293
  const feedback = tv({ slots: { base: "px-0 py-1 text-dimmed text-sm" } });
302
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
294
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
303
295
  __name: "Feedback",
304
296
  props: {
305
297
  id: {},
@@ -321,7 +313,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
321
313
  const ui = computed(() => feedback());
322
314
  return (_ctx, _cache) => {
323
315
  return openBlock(), createBlock(UPopover, { ui: { content: "ring-0 data-[state=open]:animate-[scale-up_100ms_ease-out]" } }, {
324
- content: withCtx(() => [createVNode(FeedbackCard_default, {
316
+ content: withCtx(() => [createVNode(_sfc_main$2, {
325
317
  id: props.id,
326
318
  rating: rating.value,
327
319
  "onUpdate:rating": _cache[0] || (_cache[0] = ($event) => rating.value = $event),
@@ -347,8 +339,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
347
339
  };
348
340
  }
349
341
  });
350
- var Feedback_default = _sfc_main$8;
351
-
352
342
  //#endregion
353
343
  //#region ~icons/simple-icons/discord
354
344
  const _hoisted_1$8 = {
@@ -366,7 +356,6 @@ var discord_default = markRaw({
366
356
  name: "simple-icons-discord",
367
357
  render: render$5
368
358
  });
369
-
370
359
  //#endregion
371
360
  //#region ~icons/simple-icons/github
372
361
  const _hoisted_1$7 = {
@@ -384,7 +373,6 @@ var github_default = markRaw({
384
373
  name: "simple-icons-github",
385
374
  render: render$4
386
375
  });
387
-
388
376
  //#endregion
389
377
  //#region ~icons/simple-icons/linkedin
390
378
  const _hoisted_1$6 = {
@@ -402,7 +390,6 @@ var linkedin_default = markRaw({
402
390
  name: "simple-icons-linkedin",
403
391
  render: render$3
404
392
  });
405
-
406
393
  //#endregion
407
394
  //#region ~icons/simple-icons/twitch
408
395
  const _hoisted_1$5 = {
@@ -420,7 +407,6 @@ var twitch_default = markRaw({
420
407
  name: "simple-icons-twitch",
421
408
  render: render$2
422
409
  });
423
-
424
410
  //#endregion
425
411
  //#region ~icons/simple-icons/x
426
412
  const _hoisted_1$4 = {
@@ -438,14 +424,13 @@ var x_default = markRaw({
438
424
  name: "simple-icons-x",
439
425
  render: render$1
440
426
  });
441
-
442
427
  //#endregion
443
428
  //#region src/components/Header.vue
444
429
  const header = tv({ slots: {
445
430
  base: "h-(--ui-header-height) flex flex-row gap-4 items-center justify-end",
446
431
  link: "p-0 text-dimmed"
447
432
  } });
448
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
433
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
449
434
  __name: "Header",
450
435
  props: {
451
436
  links: {},
@@ -460,7 +445,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
460
445
  }
461
446
  const ui = computed(() => header());
462
447
  return (_ctx, _cache) => {
463
- return openBlock(), createBlock(Container_default, { ui: { inner: "max-w-5xl" } }, {
448
+ return openBlock(), createBlock(_sfc_main, { ui: { inner: "max-w-5xl" } }, {
464
449
  default: withCtx(() => [createElementVNode("header", { class: normalizeClass(ui.value.base({ class: [props.ui?.base, props.class] })) }, [
465
450
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.links, (link) => {
466
451
  return openBlock(), createBlock(UTooltip, {
@@ -565,8 +550,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
565
550
  };
566
551
  }
567
552
  });
568
- var Header_default = _sfc_main$7;
569
-
570
553
  //#endregion
571
554
  //#region src/components/Page.vue
572
555
  const page = tv({ slots: {
@@ -578,7 +561,7 @@ const page = tv({ slots: {
578
561
  right: "hidden xl:block xl:col-start-3 xl:pl-8 xl:h-full",
579
562
  rightInner: "sticky top-4"
580
563
  } });
581
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
564
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
582
565
  __name: "Page",
583
566
  props: {
584
567
  class: {},
@@ -588,19 +571,17 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
588
571
  const props = __props;
589
572
  const ui = computed(() => page());
590
573
  return (_ctx, _cache) => {
591
- return openBlock(), createElementBlock("div", { class: normalizeClass(ui.value.base({ class: [props.ui?.base, props.class] })) }, [createVNode(Container_default, null, {
574
+ return openBlock(), createElementBlock("div", { class: normalizeClass(ui.value.base({ class: [props.ui?.base, props.class] })) }, [createVNode(_sfc_main, null, {
592
575
  default: withCtx(() => [createElementVNode("div", { class: normalizeClass(ui.value.header({ class: props.ui?.header })) }, [createElementVNode("div", { class: normalizeClass(ui.value.headerInner({ class: props.ui?.headerInner })) }, [renderSlot(_ctx.$slots, "header")], 2)], 2), createElementVNode("div", { class: normalizeClass(ui.value.content({ class: props.ui?.content })) }, [createElementVNode("div", { class: normalizeClass(ui.value.contentInner({ class: props.ui?.contentInner })) }, [renderSlot(_ctx.$slots, "default")], 2), createElementVNode("div", { class: normalizeClass(ui.value.right({ class: props.ui?.right })) }, [createElementVNode("div", { class: normalizeClass(ui.value.rightInner({ class: props.ui?.rightInner })) }, [renderSlot(_ctx.$slots, "right")], 2)], 2)], 2)]),
593
576
  _: 3
594
577
  }), renderSlot(_ctx.$slots, "bottom")], 2);
595
578
  };
596
579
  }
597
580
  });
598
- var Page_default = _sfc_main$6;
599
-
600
581
  //#endregion
601
582
  //#region src/components/PageTitle.vue
602
583
  const pageTitle = tv({ slots: { base: "text-xl font-bold text-highlighted" } });
603
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
584
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
604
585
  __name: "PageTitle",
605
586
  props: {
606
587
  title: {},
@@ -615,12 +596,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
615
596
  };
616
597
  }
617
598
  });
618
- var PageTitle_default = _sfc_main$5;
619
-
620
599
  //#endregion
621
600
  //#region src/components/PageHeader.vue
622
601
  const pageHeader = tv({ slots: { base: "" } });
623
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
602
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
624
603
  __name: "PageHeader",
625
604
  props: {
626
605
  title: {},
@@ -631,12 +610,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
631
610
  const props = __props;
632
611
  const ui = computed(() => pageHeader());
633
612
  return (_ctx, _cache) => {
634
- return openBlock(), createElementBlock("div", { class: normalizeClass(ui.value.base({ class: [props.ui?.base, props.class] })) }, [createVNode(PageTitle_default, { title: props.title }, null, 8, ["title"]), renderSlot(_ctx.$slots, "after")], 2);
613
+ return openBlock(), createElementBlock("div", { class: normalizeClass(ui.value.base({ class: [props.ui?.base, props.class] })) }, [createVNode(_sfc_main$6, { title: props.title }, null, 8, ["title"]), renderSlot(_ctx.$slots, "after")], 2);
635
614
  };
636
615
  }
637
616
  });
638
- var PageHeader_default = _sfc_main$4;
639
-
640
617
  //#endregion
641
618
  //#region ~icons/simple-icons/youtube
642
619
  const _hoisted_1$3 = {
@@ -654,7 +631,6 @@ var youtube_default = markRaw({
654
631
  name: "simple-icons-youtube",
655
632
  render
656
633
  });
657
-
658
634
  //#endregion
659
635
  //#region src/components/Socials.vue
660
636
  const socials = tv({ slots: {
@@ -662,7 +638,7 @@ const socials = tv({ slots: {
662
638
  link: "flex items-center gap-1",
663
639
  icon: "size-4"
664
640
  } });
665
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
641
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
666
642
  __name: "Socials",
667
643
  props: {
668
644
  class: {},
@@ -722,8 +698,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
722
698
  };
723
699
  }
724
700
  });
725
- var Socials_default = _sfc_main$3;
726
-
727
701
  //#endregion
728
702
  //#region src/components/Sponsors.vue
729
703
  const _hoisted_1$2 = {
@@ -734,7 +708,7 @@ const sponsors = tv({ slots: {
734
708
  base: "not-prose",
735
709
  img: "border-0"
736
710
  } });
737
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
711
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
738
712
  __name: "Sponsors",
739
713
  props: {
740
714
  class: {},
@@ -752,8 +726,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
752
726
  };
753
727
  }
754
728
  });
755
- var Sponsors_default = _sfc_main$2;
756
-
757
729
  //#endregion
758
730
  //#region src/composables/useTableOfContents.ts
759
731
  function _useTableOfContents() {
@@ -771,7 +743,6 @@ function _useTableOfContents() {
771
743
  };
772
744
  }
773
745
  var useTableOfContents_default = createSharedComposable(_useTableOfContents);
774
-
775
746
  //#endregion
776
747
  //#region src/components/TableOfContents.vue
777
748
  const _hoisted_1$1 = [
@@ -785,7 +756,7 @@ const tableOfContents = tv({ slots: {
785
756
  list: "font-sofia",
786
757
  link: "flex gap-1 px-0 py-1 text-dimmed hover:text-default active:text-default transition-colors focus:outline-none focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-inverted data-active:text-default rounded-md"
787
758
  } });
788
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
759
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
789
760
  __name: "TableOfContents",
790
761
  props: {
791
762
  toc: {},
@@ -819,8 +790,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
819
790
  };
820
791
  }
821
792
  });
822
- var TableOfContents_default = _sfc_main$1;
823
-
824
793
  //#endregion
825
794
  //#region src/components/ViewersCounter.vue
826
795
  const _hoisted_1 = ["title"];
@@ -828,7 +797,7 @@ const viewersCounter = tv({ slots: {
828
797
  base: "flex items-center justify-center gap-[0.375rem] border border-green-400 rounded-full px-[0.375rem] py-[0.125rem] text-xs text-muted font-light leading-3 dark:border-green-700",
829
798
  dot: "inline-block h-[0.375rem] w-[0.375rem] animate-[pulse_4s_cubic-bezier(0.4,_0,_0.6,_1)_infinite] rounded-full bg-green-400 ring ring-2 ring-green-200 dark:bg-green-700 dark:ring-green-500"
830
799
  } });
831
- const _sfc_main = /* @__PURE__ */ defineComponent({
800
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
832
801
  __name: "ViewersCounter",
833
802
  props: {
834
803
  class: {},
@@ -870,7 +839,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
870
839
  };
871
840
  }
872
841
  });
873
- var ViewersCounter_default = _sfc_main;
874
-
875
842
  //#endregion
876
- export { Container_default as Container, Feedback_default as Feedback, FeedbackCard_default as FeedbackCard, Header_default as Header, Page_default as Page, PageHeader_default as PageHeader, PageTitle_default as PageTitle, Socials_default as Socials, Sponsors_default as Sponsors, TableOfContents_default as TableOfContents, ViewersCounter_default as ViewersCounter, useTableOfContents_default as useTableOfContents, useUmami };
843
+ export { _sfc_main as Container, _sfc_main$1 as Feedback, _sfc_main$2 as FeedbackCard, _sfc_main$3 as Header, _sfc_main$4 as Page, _sfc_main$5 as PageHeader, _sfc_main$6 as PageTitle, _sfc_main$7 as Socials, _sfc_main$8 as Sponsors, _sfc_main$9 as TableOfContents, _sfc_main$10 as ViewersCounter, useTableOfContents_default as useTableOfContents, useUmami };