@m2s2/vue-lib 2.3.1 → 2.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.
Files changed (106) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.mjs +58 -34
  3. package/dist/index16.cjs +1 -1
  4. package/dist/index16.mjs +1 -1
  5. package/dist/index26.cjs +1 -1
  6. package/dist/index26.mjs +1 -1
  7. package/dist/index34.cjs +1 -1
  8. package/dist/index34.mjs +36 -81
  9. package/dist/index35.cjs +1 -0
  10. package/dist/index35.mjs +11 -0
  11. package/dist/index36.cjs +1 -1
  12. package/dist/index36.mjs +80 -21
  13. package/dist/index38.cjs +1 -1
  14. package/dist/index38.mjs +30 -3
  15. package/dist/index39.cjs +1 -1
  16. package/dist/index39.mjs +9 -3
  17. package/dist/index40.cjs +1 -1
  18. package/dist/index40.mjs +26 -3
  19. package/dist/index42.cjs +1 -1
  20. package/dist/index42.mjs +30 -3
  21. package/dist/index43.cjs +1 -1
  22. package/dist/index43.mjs +9 -3
  23. package/dist/index44.cjs +1 -1
  24. package/dist/index44.mjs +34 -3
  25. package/dist/index45.cjs +1 -1
  26. package/dist/index45.mjs +9 -3
  27. package/dist/index46.cjs +1 -1
  28. package/dist/index46.mjs +48 -2
  29. package/dist/index48.cjs +1 -1
  30. package/dist/index48.mjs +69 -3
  31. package/dist/index50.cjs +1 -1
  32. package/dist/index50.mjs +27 -3
  33. package/dist/index51.cjs +1 -1
  34. package/dist/index51.mjs +2 -2
  35. package/dist/index52.cjs +1 -1
  36. package/dist/index52.mjs +2 -2
  37. package/dist/index53.cjs +1 -1
  38. package/dist/index53.mjs +2 -2
  39. package/dist/index54.cjs +1 -1
  40. package/dist/index54.mjs +2 -2
  41. package/dist/index55.cjs +1 -1
  42. package/dist/index55.mjs +1 -1
  43. package/dist/index56.cjs +1 -59
  44. package/dist/index56.mjs +3 -1150
  45. package/dist/index57.cjs +1 -1
  46. package/dist/index57.mjs +3 -51
  47. package/dist/index58.cjs +1 -1
  48. package/dist/index58.mjs +3 -2
  49. package/dist/index59.cjs +1 -0
  50. package/dist/index59.mjs +5 -0
  51. package/dist/index61.cjs +1 -0
  52. package/dist/index61.mjs +5 -0
  53. package/dist/index63.cjs +1 -0
  54. package/dist/index63.mjs +5 -0
  55. package/dist/index64.cjs +1 -0
  56. package/dist/index64.mjs +5 -0
  57. package/dist/index65.cjs +1 -0
  58. package/dist/index65.mjs +5 -0
  59. package/dist/index66.cjs +1 -0
  60. package/dist/index66.mjs +5 -0
  61. package/dist/index67.cjs +1 -0
  62. package/dist/index67.mjs +4 -0
  63. package/dist/index68.cjs +1 -0
  64. package/dist/index68.mjs +5 -0
  65. package/dist/index69.cjs +1 -0
  66. package/dist/index69.mjs +4 -0
  67. package/dist/index70.cjs +1 -0
  68. package/dist/index70.mjs +5 -0
  69. package/dist/index71.cjs +1 -0
  70. package/dist/index71.mjs +4 -0
  71. package/dist/index72.cjs +1 -0
  72. package/dist/index72.mjs +4 -0
  73. package/dist/index73.cjs +1 -0
  74. package/dist/index73.mjs +5 -0
  75. package/dist/index74.cjs +1 -0
  76. package/dist/index74.mjs +5 -0
  77. package/dist/index75.cjs +59 -0
  78. package/dist/index75.mjs +1152 -0
  79. package/dist/index76.cjs +1 -0
  80. package/dist/index76.mjs +53 -0
  81. package/dist/index77.cjs +1 -0
  82. package/dist/index77.mjs +4 -0
  83. package/dist/vue-lib/src/components/Auth/AuthProvider.vue.d.ts +17 -0
  84. package/dist/vue-lib/src/components/Auth/AuthProvider.vue.d.ts.map +1 -0
  85. package/dist/vue-lib/src/components/Auth/useAuth.d.ts +19 -0
  86. package/dist/vue-lib/src/components/Auth/useAuth.d.ts.map +1 -0
  87. package/dist/vue-lib/src/components/Dropdown/Dropdown.vue.d.ts +21 -0
  88. package/dist/vue-lib/src/components/Dropdown/Dropdown.vue.d.ts.map +1 -0
  89. package/dist/vue-lib/src/components/Dropdown/DropdownItem.vue.d.ts +12 -0
  90. package/dist/vue-lib/src/components/Dropdown/DropdownItem.vue.d.ts.map +1 -0
  91. package/dist/vue-lib/src/components/ThemeProvider/ThemeProvider.vue.d.ts +19 -0
  92. package/dist/vue-lib/src/components/ThemeProvider/ThemeProvider.vue.d.ts.map +1 -0
  93. package/dist/vue-lib/src/components/ThemeProvider/useTheme.d.ts +9 -0
  94. package/dist/vue-lib/src/components/ThemeProvider/useTheme.d.ts.map +1 -0
  95. package/dist/vue-lib/src/index.d.ts +14 -0
  96. package/dist/vue-lib/src/index.d.ts.map +1 -1
  97. package/dist/vue-lib/src/plugin.d.ts +9 -0
  98. package/dist/vue-lib/src/plugin.d.ts.map +1 -0
  99. package/dist/vue-lib.css +1 -1
  100. package/package.json +1 -1
  101. package/dist/index41.cjs +0 -1
  102. package/dist/index41.mjs +0 -5
  103. /package/dist/{index47.cjs → index60.cjs} +0 -0
  104. /package/dist/{index47.mjs → index60.mjs} +0 -0
  105. /package/dist/{index49.cjs → index62.cjs} +0 -0
  106. /package/dist/{index49.mjs → index62.mjs} +0 -0
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index2.cjs");;/* empty css */const r=require("./index4.cjs");;/* empty css */const t=require("./index6.cjs");;/* empty css */const _=require("./index8.cjs");;/* empty css */const u=require("./index10.cjs");;/* empty css */const i=require("./index12.cjs");;/* empty css */const s=require("./index14.cjs");;/* empty css */const a=require("./index16.cjs");;/* empty css */const p=require("./index18.cjs");;/* empty css */const n=require("./index20.cjs");;/* empty css */const o=require("./index22.cjs");;/* empty css */const c=require("./index24.cjs");;/* empty css */const v=require("./index26.cjs");;/* empty css */const q=require("./index28.cjs");;/* empty css */const g=require("./index30.cjs");;/* empty css */const l=require("./index32.cjs");;/* empty css */const y=require("./index34.cjs");;/* empty css */const d=require("./index36.cjs");;/* empty css */exports.Chat=e;exports.SectionHeader=r;exports.StatRow=t;exports.StatusBadge=_;exports.PageHeader=u;exports.CtaSection=i;exports.ProcessSteps=s;exports.Footer=a;exports.Navbar=p;exports.BaseCard=n;exports.FeatureCard=o;exports.BlogCard=c;exports.BlogEditor=v;exports.DataTable=q;exports.SubscribeForm=g;exports.Dialog=l;exports.Panel=y;exports.LoadingButton=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index2.cjs");;/* empty css */const r=require("./index4.cjs");;/* empty css */const u=require("./index6.cjs");;/* empty css */const t=require("./index8.cjs");;/* empty css */const _=require("./index10.cjs");;/* empty css */const s=require("./index12.cjs");;/* empty css */const i=require("./index14.cjs");;/* empty css */const a=require("./index16.cjs");;/* empty css */const o=require("./index18.cjs");;/* empty css */const p=require("./index20.cjs");;/* empty css */const n=require("./index22.cjs");;/* empty css */const c=require("./index24.cjs");;/* empty css */const v=require("./index26.cjs");;/* empty css */const q=require("./index28.cjs");;/* empty css */const l=require("./index30.cjs");;/* empty css */const g=require("./index32.cjs");;/* empty css */const d=require("./index34.cjs"),y=require("./index35.cjs"),P=require("./index36.cjs");;/* empty css */const S=require("./index38.cjs"),D=require("./index39.cjs"),h=require("./index40.cjs");;/* empty css */const b=require("./index42.cjs"),m=require("./index43.cjs"),B=require("./index44.cjs"),C=require("./index45.cjs"),T=require("./index46.cjs");;/* empty css */const w=require("./index48.cjs");;/* empty css */const F=require("./index50.cjs");exports.Chat=e;exports.SectionHeader=r;exports.StatRow=u;exports.StatusBadge=t;exports.PageHeader=_;exports.CtaSection=s;exports.ProcessSteps=i;exports.Footer=a;exports.Navbar=o;exports.BaseCard=p;exports.FeatureCard=n;exports.BlogCard=c;exports.BlogEditor=v;exports.DataTable=q;exports.SubscribeForm=l;exports.Dialog=g;exports.DialogProvider=d;exports.useDialog=y.useDialog;exports.Panel=P;exports.PanelProvider=S;exports.usePanel=D.usePanel;exports.LoadingButton=h;exports.ThemeProvider=b;exports.useTheme=m.useTheme;exports.AuthProvider=B;exports.useAuth=C.useAuth;exports.Dropdown=T;exports.DropdownItem=w;exports.createM2S2=F.createM2S2;
package/dist/index.mjs CHANGED
@@ -1,56 +1,80 @@
1
- import { default as c } from "./index2.mjs";
1
+ import { default as B } from "./index2.mjs";
2
2
  /* empty css */
3
- import { default as P } from "./index4.mjs";
3
+ import { default as b } from "./index4.mjs";
4
4
  /* empty css */
5
- import { default as H } from "./index6.mjs";
5
+ import { default as F } from "./index6.mjs";
6
6
  /* empty css */
7
- import { default as v } from "./index8.mjs";
7
+ import { default as A } from "./index8.mjs";
8
8
  /* empty css */
9
9
  import { default as E } from "./index10.mjs";
10
10
  /* empty css */
11
- import { default as N } from "./index12.mjs";
11
+ import { default as L } from "./index12.mjs";
12
12
  /* empty css */
13
- import { default as T } from "./index14.mjs";
13
+ import { default as N } from "./index14.mjs";
14
14
  /* empty css */
15
- import { default as k } from "./index16.mjs";
15
+ import { default as j } from "./index16.mjs";
16
16
  /* empty css */
17
- import { default as y } from "./index18.mjs";
17
+ import { default as q } from "./index18.mjs";
18
18
  /* empty css */
19
- import { default as A } from "./index20.mjs";
19
+ import { default as z } from "./index20.mjs";
20
20
  /* empty css */
21
- import { default as I } from "./index22.mjs";
21
+ import { default as J } from "./index22.mjs";
22
22
  /* empty css */
23
- import { default as K } from "./index24.mjs";
23
+ import { default as O } from "./index24.mjs";
24
24
  /* empty css */
25
- import { default as O } from "./index26.mjs";
25
+ import { default as U } from "./index26.mjs";
26
26
  /* empty css */
27
- import { default as U } from "./index28.mjs";
27
+ import { default as W } from "./index28.mjs";
28
28
  /* empty css */
29
- import { default as W } from "./index30.mjs";
29
+ import { default as Y } from "./index30.mjs";
30
30
  /* empty css */
31
- import { default as Y } from "./index32.mjs";
31
+ import { default as _ } from "./index32.mjs";
32
32
  /* empty css */
33
- import { default as _ } from "./index34.mjs";
33
+ import { default as oo } from "./index34.mjs";
34
+ import { useDialog as to } from "./index35.mjs";
35
+ import { default as ao } from "./index36.mjs";
34
36
  /* empty css */
35
- import { default as tt } from "./index36.mjs";
37
+ import { default as mo } from "./index38.mjs";
38
+ import { usePanel as so } from "./index39.mjs";
39
+ import { default as lo } from "./index40.mjs";
36
40
  /* empty css */
41
+ import { default as xo } from "./index42.mjs";
42
+ import { useTheme as Po } from "./index43.mjs";
43
+ import { default as So } from "./index44.mjs";
44
+ import { useAuth as co } from "./index45.mjs";
45
+ import { default as vo } from "./index46.mjs";
46
+ /* empty css */
47
+ import { default as Co } from "./index48.mjs";
48
+ /* empty css */
49
+ import { createM2S2 as wo } from "./index50.mjs";
37
50
  export {
38
- A as BaseCard,
39
- K as BlogCard,
40
- O as BlogEditor,
41
- c as Chat,
42
- N as CtaSection,
43
- U as DataTable,
44
- Y as Dialog,
45
- I as FeatureCard,
46
- k as Footer,
47
- tt as LoadingButton,
48
- y as Navbar,
51
+ So as AuthProvider,
52
+ z as BaseCard,
53
+ O as BlogCard,
54
+ U as BlogEditor,
55
+ B as Chat,
56
+ L as CtaSection,
57
+ W as DataTable,
58
+ _ as Dialog,
59
+ oo as DialogProvider,
60
+ vo as Dropdown,
61
+ Co as DropdownItem,
62
+ J as FeatureCard,
63
+ j as Footer,
64
+ lo as LoadingButton,
65
+ q as Navbar,
49
66
  E as PageHeader,
50
- _ as Panel,
51
- T as ProcessSteps,
52
- P as SectionHeader,
53
- H as StatRow,
54
- v as StatusBadge,
55
- W as SubscribeForm
67
+ ao as Panel,
68
+ mo as PanelProvider,
69
+ N as ProcessSteps,
70
+ b as SectionHeader,
71
+ F as StatRow,
72
+ A as StatusBadge,
73
+ Y as SubscribeForm,
74
+ xo as ThemeProvider,
75
+ wo as createM2S2,
76
+ co as useAuth,
77
+ to as useDialog,
78
+ so as usePanel,
79
+ Po as useTheme
56
80
  };
package/dist/index16.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),a=require("./index57.cjs"),n={class:"m2s2-footer"},l={class:"footer-inner"},s={class:"footer-copy"},c={class:"footer-social","aria-label":"Social links"},i=["href","title","aria-label"],_=e.defineComponent({__name:"Footer",props:{config:{}},setup(o){const r=new Date().getFullYear();return(p,u)=>(e.openBlock(),e.createElementBlock("footer",n,[e.createElementVNode("div",l,[e.createElementVNode("span",s," © "+e.toDisplayString(e.unref(r))+" "+e.toDisplayString(o.config.brandName)+" — All Rights Reserved ",1),e.createElementVNode("nav",c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.config.links,t=>(e.openBlock(),e.createElementBlock("a",e.mergeProps({key:t.type,href:t.href,class:"social-link",title:t.label??t.type,"aria-label":t.label??t.type},{ref_for:!0},t.type!=="email"?{target:"_blank",rel:"noopener noreferrer"}:{}),[e.createVNode(a,{type:t.type},null,8,["type"])],16,i))),128))])])]))}});module.exports=_;
1
+ "use strict";const e=require("vue"),a=require("./index76.cjs"),n={class:"m2s2-footer"},l={class:"footer-inner"},s={class:"footer-copy"},c={class:"footer-social","aria-label":"Social links"},i=["href","title","aria-label"],_=e.defineComponent({__name:"Footer",props:{config:{}},setup(o){const r=new Date().getFullYear();return(p,u)=>(e.openBlock(),e.createElementBlock("footer",n,[e.createElementVNode("div",l,[e.createElementVNode("span",s," © "+e.toDisplayString(e.unref(r))+" "+e.toDisplayString(o.config.brandName)+" — All Rights Reserved ",1),e.createElementVNode("nav",c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.config.links,t=>(e.openBlock(),e.createElementBlock("a",e.mergeProps({key:t.type,href:t.href,class:"social-link",title:t.label??t.type,"aria-label":t.label??t.type},{ref_for:!0},t.type!=="email"?{target:"_blank",rel:"noopener noreferrer"}:{}),[e.createVNode(a,{type:t.type},null,8,["type"])],16,i))),128))])])]))}});module.exports=_;
package/dist/index16.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as l, openBlock as t, createElementBlock as o, createElementVNode as r, toDisplayString as s, unref as c, Fragment as i, renderList as f, mergeProps as p, createVNode as _ } from "vue";
2
- import m from "./index57.mjs";
2
+ import m from "./index76.mjs";
3
3
  const d = { class: "m2s2-footer" }, u = { class: "footer-inner" }, y = { class: "footer-copy" }, h = {
4
4
  class: "footer-social",
5
5
  "aria-label": "Social links"
package/dist/index26.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("vue"),Q=require("./index56.cjs"),X={class:"be-root"},Y={class:"be-meta"},Z={class:"be-field be-field--full"},ee=["value"],te={class:"be-field"},le={class:"be-field"},ae={class:"be-field be-field--full"},ne={class:"be-field be-field--full"},oe={class:"be-field"},ie={class:"be-tags"},se=["onClick","aria-label"],re={class:"be-field"},ce={class:"be-field be-field--cover"},ue={class:"be-cover"},de=["src"],ve={class:"be-cover__pick"},be={class:"be-editor"},me={class:"be-toolbar",role:"toolbar","aria-label":"Formatting"},pe=["title","onClick"],ge={class:"be-panes"},fe={class:"be-pane be-pane--write"},Ee=["value"],Ve={class:"be-pane be-pane--preview"},Ne=["innerHTML"],_e={class:"be-footer"},xe={class:"be-footer__meta"},ke=["disabled"],we=e.defineComponent({__name:"BlogEditor",props:{initialPost:{},coverImageUrl:{}},emits:["publish","coverImageSelected"],setup(R,{emit:q}){var T,C,I,P,B,D,S,M,U;const n=R,x=q,F=[{label:"Heading 2",icon:"H2",prefix:"## "},{label:"Heading 3",icon:"H3",prefix:"### "},{label:"Bold",icon:"B",wrap:["**","**"]},{label:"Italic",icon:"I",wrap:["*","*"]},{label:"Inline code",icon:"`",wrap:["`","`"]},{label:"Code block",icon:"{ }",block:"\n```\n\n```\n"},{label:"Blockquote",icon:"❝",prefix:"> "},{label:"Link",icon:"⇗",wrap:["[","](url)"]},{label:"Image",icon:"⬚",block:`![alt text](image-url)
1
+ "use strict";const e=require("vue"),Q=require("./index75.cjs"),X={class:"be-root"},Y={class:"be-meta"},Z={class:"be-field be-field--full"},ee=["value"],te={class:"be-field"},le={class:"be-field"},ae={class:"be-field be-field--full"},ne={class:"be-field be-field--full"},oe={class:"be-field"},ie={class:"be-tags"},se=["onClick","aria-label"],re={class:"be-field"},ce={class:"be-field be-field--cover"},ue={class:"be-cover"},de=["src"],ve={class:"be-cover__pick"},be={class:"be-editor"},me={class:"be-toolbar",role:"toolbar","aria-label":"Formatting"},pe=["title","onClick"],ge={class:"be-panes"},fe={class:"be-pane be-pane--write"},Ee=["value"],Ve={class:"be-pane be-pane--preview"},Ne=["innerHTML"],_e={class:"be-footer"},xe={class:"be-footer__meta"},ke=["disabled"],we=e.defineComponent({__name:"BlogEditor",props:{initialPost:{},coverImageUrl:{}},emits:["publish","coverImageSelected"],setup(R,{emit:q}){var T,C,I,P,B,D,S,M,U;const n=R,x=q,F=[{label:"Heading 2",icon:"H2",prefix:"## "},{label:"Heading 3",icon:"H3",prefix:"### "},{label:"Bold",icon:"B",wrap:["**","**"]},{label:"Italic",icon:"I",wrap:["*","*"]},{label:"Inline code",icon:"`",wrap:["`","`"]},{label:"Code block",icon:"{ }",block:"\n```\n\n```\n"},{label:"Blockquote",icon:"❝",prefix:"> "},{label:"Link",icon:"⇗",wrap:["[","](url)"]},{label:"Image",icon:"⬚",block:`![alt text](image-url)
2
2
  `},{label:"Bullet list",icon:"•–",prefix:"- "},{label:"Numbered list",icon:"1.",prefix:"1. "},{label:"Divider",icon:"—",block:`
3
3
  ---
4
4
 
package/dist/index26.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as oe, ref as s, watch as ie, computed as E, openBlock as _, createElementBlock as w, createElementVNode as l, createTextVNode as x, withDirectives as v, vModelText as b, Fragment as W, renderList as j, toDisplayString as P, createCommentVNode as re } from "vue";
2
- import { marked as ue } from "./index56.mjs";
2
+ import { marked as ue } from "./index75.mjs";
3
3
  const ce = { class: "be-root" }, de = { class: "be-meta" }, ve = { class: "be-field be-field--full" }, be = ["value"], pe = { class: "be-field" }, ge = { class: "be-field" }, fe = { class: "be-field be-field--full" }, me = { class: "be-field be-field--full" }, _e = { class: "be-field" }, we = { class: "be-tags" }, xe = ["onClick", "aria-label"], he = { class: "be-field" }, ke = { class: "be-field be-field--cover" }, ye = { class: "be-cover" }, Ce = ["src"], Ie = { class: "be-cover__pick" }, Pe = { class: "be-editor" }, Te = {
4
4
  class: "be-toolbar",
5
5
  role: "toolbar",
package/dist/index34.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),k={class:"panel-header"},u={class:"panel-header-text"},p={id:"panel-title",class:"panel-title"},y={key:0,class:"panel-subtitle"},B={class:"panel-body"},h={key:0,class:"panel-message"},C={key:0,class:"panel-footer"},b=["onClick"],f=e.defineComponent({__name:"Panel",props:{data:{},open:{type:Boolean}},emits:["action","close"],setup(t,{emit:d}){const o=t,n=d,s=()=>o.data.side??"right";function r(l){n("action",l.value)}function m(){o.data.modal||n("close")}return(l,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"panel-overlay-fade"},{default:e.withCtx(()=>[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m2s2-panel-overlay",onClick:e.withModifiers(m,["self"])})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:`panel-slide-${s()}`},{default:e.withCtx(()=>{var i;return[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["m2s2-panel-content",`m2s2-panel-content--${s()}`]),style:e.normalizeStyle(t.data.width?{"--panel-width":t.data.width}:{}),role:"dialog","aria-modal":!0,"aria-labelledby":"panel-title"},[e.createElementVNode("div",k,[e.createElementVNode("div",u,[e.createElementVNode("h2",p,e.toDisplayString(t.data.title),1),t.data.subtitle?(e.openBlock(),e.createElementBlock("p",y,e.toDisplayString(t.data.subtitle),1)):e.createCommentVNode("",!0)]),t.data.modal?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"panel-close","aria-label":"Close",onClick:c[0]||(c[0]=a=>n("close"))},"✕"))]),e.createElementVNode("div",B,[t.data.message&&!l.$slots.default?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(t.data.message),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")]),(i=t.data.actions)!=null&&i.length?(e.openBlock(),e.createElementBlock("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.actions,a=>(e.openBlock(),e.createElementBlock("button",{key:a.label,class:e.normalizeClass(["panel-btn",`panel-btn--${a.variant??"secondary"}`]),onClick:v=>r(a)},e.toDisplayString(a.label),11,b))),128))])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)]}),_:3},8,["name"])]))}});module.exports=f;
1
+ "use strict";const e=require("vue"),u=require("./index32.cjs");;/* empty css */const i=require("./index35.cjs"),c=e.defineComponent({__name:"DialogProvider",setup(s){const t=e.ref(null);function o(r){return new Promise(n=>{t.value={data:r,resolve:n}})}function a(r,n){return o({title:r,message:n,actions:[{label:"Cancel",value:!1,variant:"secondary"},{label:"Confirm",value:!0,variant:"primary"}]})}function l(r){var n;(n=t.value)==null||n.resolve(r),t.value=null}return e.provide(i.DIALOG_KEY,{dialog:o,confirm:a}),(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(r.$slots,"default"),t.value?(e.openBlock(),e.createBlock(u,{key:0,data:t.value.data,open:!0,onAction:l,onClose:n[0]||(n[0]=v=>l(null))},null,8,["data"])):e.createCommentVNode("",!0)],64))}});module.exports=c;
package/dist/index34.mjs CHANGED
@@ -1,87 +1,42 @@
1
- import { defineComponent as C, openBlock as t, createBlock as g, Teleport as $, createVNode as h, Transition as y, withCtx as k, createElementBlock as a, withModifiers as w, createCommentVNode as l, normalizeStyle as B, normalizeClass as f, createElementVNode as o, toDisplayString as i, renderSlot as N, Fragment as S, renderList as V } from "vue";
2
- const x = { class: "panel-header" }, z = { class: "panel-header-text" }, E = {
3
- id: "panel-title",
4
- class: "panel-title"
5
- }, T = {
6
- key: 0,
7
- class: "panel-subtitle"
8
- }, A = { class: "panel-body" }, D = {
9
- key: 0,
10
- class: "panel-message"
11
- }, F = {
12
- key: 0,
13
- class: "panel-footer"
14
- }, L = ["onClick"], j = /* @__PURE__ */ C({
15
- __name: "Panel",
16
- props: {
17
- data: {},
18
- open: { type: Boolean }
19
- },
20
- emits: ["action", "close"],
21
- setup(e, { emit: b }) {
22
- const c = e, d = b, r = () => c.data.side ?? "right";
23
- function p(s) {
24
- d("action", s.value);
1
+ import { defineComponent as u, ref as i, provide as m, openBlock as a, createElementBlock as c, Fragment as s, renderSlot as f, createBlock as v, createCommentVNode as p } from "vue";
2
+ import d from "./index32.mjs";
3
+ /* empty css */
4
+ import { DIALOG_KEY as _ } from "./index35.mjs";
5
+ const b = /* @__PURE__ */ u({
6
+ __name: "DialogProvider",
7
+ setup(C) {
8
+ const o = i(null);
9
+ function r(n) {
10
+ return new Promise((e) => {
11
+ o.value = { data: n, resolve: e };
12
+ });
25
13
  }
26
- function v() {
27
- c.data.modal || d("close");
14
+ function l(n, e) {
15
+ return r({
16
+ title: n,
17
+ message: e,
18
+ actions: [
19
+ { label: "Cancel", value: !1, variant: "secondary" },
20
+ { label: "Confirm", value: !0, variant: "primary" }
21
+ ]
22
+ });
28
23
  }
29
- return (s, m) => (t(), g($, { to: "body" }, [
30
- h(y, { name: "panel-overlay-fade" }, {
31
- default: k(() => [
32
- e.open ? (t(), a("div", {
33
- key: 0,
34
- class: "m2s2-panel-overlay",
35
- onClick: w(v, ["self"])
36
- })) : l("", !0)
37
- ]),
38
- _: 1
39
- }),
40
- h(y, {
41
- name: `panel-slide-${r()}`
42
- }, {
43
- default: k(() => {
44
- var u;
45
- return [
46
- e.open ? (t(), a("div", {
47
- key: 0,
48
- class: f(["m2s2-panel-content", `m2s2-panel-content--${r()}`]),
49
- style: B(e.data.width ? { "--panel-width": e.data.width } : {}),
50
- role: "dialog",
51
- "aria-modal": !0,
52
- "aria-labelledby": "panel-title"
53
- }, [
54
- o("div", x, [
55
- o("div", z, [
56
- o("h2", E, i(e.data.title), 1),
57
- e.data.subtitle ? (t(), a("p", T, i(e.data.subtitle), 1)) : l("", !0)
58
- ]),
59
- e.data.modal ? l("", !0) : (t(), a("button", {
60
- key: 0,
61
- class: "panel-close",
62
- "aria-label": "Close",
63
- onClick: m[0] || (m[0] = (n) => d("close"))
64
- }, "✕"))
65
- ]),
66
- o("div", A, [
67
- e.data.message && !s.$slots.default ? (t(), a("p", D, i(e.data.message), 1)) : l("", !0),
68
- N(s.$slots, "default")
69
- ]),
70
- (u = e.data.actions) != null && u.length ? (t(), a("div", F, [
71
- (t(!0), a(S, null, V(e.data.actions, (n) => (t(), a("button", {
72
- key: n.label,
73
- class: f(["panel-btn", `panel-btn--${n.variant ?? "secondary"}`]),
74
- onClick: (M) => p(n)
75
- }, i(n.label), 11, L))), 128))
76
- ])) : l("", !0)
77
- ], 6)) : l("", !0)
78
- ];
79
- }),
80
- _: 3
81
- }, 8, ["name"])
82
- ]));
24
+ function t(n) {
25
+ var e;
26
+ (e = o.value) == null || e.resolve(n), o.value = null;
27
+ }
28
+ return m(_, { dialog: r, confirm: l }), (n, e) => (a(), c(s, null, [
29
+ f(n.$slots, "default"),
30
+ o.value ? (a(), v(d, {
31
+ key: 0,
32
+ data: o.value.data,
33
+ open: !0,
34
+ onAction: t,
35
+ onClose: e[0] || (e[0] = (k) => t(null))
36
+ }, null, 8, ["data"])) : p("", !0)
37
+ ], 64));
83
38
  }
84
39
  });
85
40
  export {
86
- j as default
41
+ b as default
87
42
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=Symbol("dialog");function i(){const e=t.inject(o);if(!e)throw new Error("useDialog must be used within a <DialogProvider>");return e}exports.DIALOG_KEY=o;exports.useDialog=i;
@@ -0,0 +1,11 @@
1
+ import { inject as i } from "vue";
2
+ const r = Symbol("dialog");
3
+ function e() {
4
+ const o = i(r);
5
+ if (!o) throw new Error("useDialog must be used within a <DialogProvider>");
6
+ return o;
7
+ }
8
+ export {
9
+ r as DIALOG_KEY,
10
+ e as useDialog
11
+ };
package/dist/index36.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),o=["disabled","aria-busy"],l={key:0,class:"m2s2-btn-spinner","aria-hidden":"true"},s=e.defineComponent({inheritAttrs:!1,__name:"LoadingButton",props:{loading:{type:Boolean,default:!1},loadingText:{}},setup(t){const n=e.useAttrs();return(a,i)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps(e.unref(n),{disabled:t.loading||e.unref(n).disabled,"aria-busy":t.loading}),[t.loading?(e.openBlock(),e.createElementBlock("span",l)):e.createCommentVNode("",!0),!t.loading||!t.loadingText?e.renderSlot(a.$slots,"default",{key:1}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(t.loadingText),1)],64))],16,o))}});module.exports=s;
1
+ "use strict";const e=require("vue"),k={class:"panel-header"},u={class:"panel-header-text"},p={id:"panel-title",class:"panel-title"},y={key:0,class:"panel-subtitle"},B={class:"panel-body"},h={key:0,class:"panel-message"},C={key:0,class:"panel-footer"},b=["onClick"],f=e.defineComponent({__name:"Panel",props:{data:{},open:{type:Boolean}},emits:["action","close"],setup(t,{emit:d}){const o=t,n=d,s=()=>o.data.side??"right";function r(l){n("action",l.value)}function m(){o.data.modal||n("close")}return(l,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"panel-overlay-fade"},{default:e.withCtx(()=>[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m2s2-panel-overlay",onClick:e.withModifiers(m,["self"])})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:`panel-slide-${s()}`},{default:e.withCtx(()=>{var i;return[t.open?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["m2s2-panel-content",`m2s2-panel-content--${s()}`]),style:e.normalizeStyle(t.data.width?{"--panel-width":t.data.width}:{}),role:"dialog","aria-modal":!0,"aria-labelledby":"panel-title"},[e.createElementVNode("div",k,[e.createElementVNode("div",u,[e.createElementVNode("h2",p,e.toDisplayString(t.data.title),1),t.data.subtitle?(e.openBlock(),e.createElementBlock("p",y,e.toDisplayString(t.data.subtitle),1)):e.createCommentVNode("",!0)]),t.data.modal?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"panel-close","aria-label":"Close",onClick:c[0]||(c[0]=a=>n("close"))},"✕"))]),e.createElementVNode("div",B,[t.data.message&&!l.$slots.default?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(t.data.message),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")]),(i=t.data.actions)!=null&&i.length?(e.openBlock(),e.createElementBlock("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data.actions,a=>(e.openBlock(),e.createElementBlock("button",{key:a.label,class:e.normalizeClass(["panel-btn",`panel-btn--${a.variant??"secondary"}`]),onClick:v=>r(a)},e.toDisplayString(a.label),11,b))),128))])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)]}),_:3},8,["name"])]))}});module.exports=f;
package/dist/index36.mjs CHANGED
@@ -1,28 +1,87 @@
1
- import { defineComponent as i, useAttrs as s, openBlock as t, createElementBlock as a, mergeProps as l, unref as o, createCommentVNode as r, renderSlot as u, Fragment as c, createTextVNode as g, toDisplayString as m } from "vue";
2
- const f = ["disabled", "aria-busy"], b = {
1
+ import { defineComponent as C, openBlock as t, createBlock as g, Teleport as $, createVNode as h, Transition as y, withCtx as k, createElementBlock as a, withModifiers as w, createCommentVNode as l, normalizeStyle as B, normalizeClass as f, createElementVNode as o, toDisplayString as i, renderSlot as N, Fragment as S, renderList as V } from "vue";
2
+ const x = { class: "panel-header" }, z = { class: "panel-header-text" }, E = {
3
+ id: "panel-title",
4
+ class: "panel-title"
5
+ }, T = {
3
6
  key: 0,
4
- class: "m2s2-btn-spinner",
5
- "aria-hidden": "true"
6
- }, k = /* @__PURE__ */ i({
7
- inheritAttrs: !1,
8
- __name: "LoadingButton",
7
+ class: "panel-subtitle"
8
+ }, A = { class: "panel-body" }, D = {
9
+ key: 0,
10
+ class: "panel-message"
11
+ }, F = {
12
+ key: 0,
13
+ class: "panel-footer"
14
+ }, L = ["onClick"], j = /* @__PURE__ */ C({
15
+ __name: "Panel",
9
16
  props: {
10
- loading: { type: Boolean, default: !1 },
11
- loadingText: {}
17
+ data: {},
18
+ open: { type: Boolean }
12
19
  },
13
- setup(e) {
14
- const n = s();
15
- return (d, y) => (t(), a("button", l(o(n), {
16
- disabled: e.loading || o(n).disabled,
17
- "aria-busy": e.loading
18
- }), [
19
- e.loading ? (t(), a("span", b)) : r("", !0),
20
- !e.loading || !e.loadingText ? u(d.$slots, "default", { key: 1 }) : (t(), a(c, { key: 2 }, [
21
- g(m(e.loadingText), 1)
22
- ], 64))
23
- ], 16, f));
20
+ emits: ["action", "close"],
21
+ setup(e, { emit: b }) {
22
+ const c = e, d = b, r = () => c.data.side ?? "right";
23
+ function p(s) {
24
+ d("action", s.value);
25
+ }
26
+ function v() {
27
+ c.data.modal || d("close");
28
+ }
29
+ return (s, m) => (t(), g($, { to: "body" }, [
30
+ h(y, { name: "panel-overlay-fade" }, {
31
+ default: k(() => [
32
+ e.open ? (t(), a("div", {
33
+ key: 0,
34
+ class: "m2s2-panel-overlay",
35
+ onClick: w(v, ["self"])
36
+ })) : l("", !0)
37
+ ]),
38
+ _: 1
39
+ }),
40
+ h(y, {
41
+ name: `panel-slide-${r()}`
42
+ }, {
43
+ default: k(() => {
44
+ var u;
45
+ return [
46
+ e.open ? (t(), a("div", {
47
+ key: 0,
48
+ class: f(["m2s2-panel-content", `m2s2-panel-content--${r()}`]),
49
+ style: B(e.data.width ? { "--panel-width": e.data.width } : {}),
50
+ role: "dialog",
51
+ "aria-modal": !0,
52
+ "aria-labelledby": "panel-title"
53
+ }, [
54
+ o("div", x, [
55
+ o("div", z, [
56
+ o("h2", E, i(e.data.title), 1),
57
+ e.data.subtitle ? (t(), a("p", T, i(e.data.subtitle), 1)) : l("", !0)
58
+ ]),
59
+ e.data.modal ? l("", !0) : (t(), a("button", {
60
+ key: 0,
61
+ class: "panel-close",
62
+ "aria-label": "Close",
63
+ onClick: m[0] || (m[0] = (n) => d("close"))
64
+ }, "✕"))
65
+ ]),
66
+ o("div", A, [
67
+ e.data.message && !s.$slots.default ? (t(), a("p", D, i(e.data.message), 1)) : l("", !0),
68
+ N(s.$slots, "default")
69
+ ]),
70
+ (u = e.data.actions) != null && u.length ? (t(), a("div", F, [
71
+ (t(!0), a(S, null, V(e.data.actions, (n) => (t(), a("button", {
72
+ key: n.label,
73
+ class: f(["panel-btn", `panel-btn--${n.variant ?? "secondary"}`]),
74
+ onClick: (M) => p(n)
75
+ }, i(n.label), 11, L))), 128))
76
+ ])) : l("", !0)
77
+ ], 6)) : l("", !0)
78
+ ];
79
+ }),
80
+ _: 3
81
+ }, 8, ["name"])
82
+ ]));
24
83
  }
25
84
  });
26
85
  export {
27
- k as default
86
+ j as default
28
87
  };
package/dist/index38.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index2.cjs");;/* empty css */module.exports=e;
1
+ "use strict";const e=require("vue"),u=require("./index36.cjs");;/* empty css */const a=require("./index39.cjs"),s=e.defineComponent({__name:"PanelProvider",setup(c){const t=e.ref(null);function o(r){return new Promise(n=>{t.value={data:r,resolve:n}})}function l(r){var n;(n=t.value)==null||n.resolve(r),t.value=null}return e.provide(a.PANEL_KEY,{panel:o}),(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(r.$slots,"default"),t.value?(e.openBlock(),e.createBlock(u,{key:0,data:t.value.data,open:!0,onAction:l,onClose:n[0]||(n[0]=i=>l(null))},null,8,["data"])):e.createCommentVNode("",!0)],64))}});module.exports=s;
package/dist/index38.mjs CHANGED
@@ -1,5 +1,32 @@
1
- import o from "./index2.mjs";
2
- /* empty css */
1
+ import { defineComponent as a, ref as u, provide as m, openBlock as r, createElementBlock as i, Fragment as c, renderSlot as p, createBlock as s, createCommentVNode as f } from "vue";
2
+ import d from "./index36.mjs";
3
+ /* empty css */
4
+ import { PANEL_KEY as v } from "./index39.mjs";
5
+ const $ = /* @__PURE__ */ a({
6
+ __name: "PanelProvider",
7
+ setup(_) {
8
+ const n = u(null);
9
+ function l(o) {
10
+ return new Promise((e) => {
11
+ n.value = { data: o, resolve: e };
12
+ });
13
+ }
14
+ function t(o) {
15
+ var e;
16
+ (e = n.value) == null || e.resolve(o), n.value = null;
17
+ }
18
+ return m(v, { panel: l }), (o, e) => (r(), i(c, null, [
19
+ p(o.$slots, "default"),
20
+ n.value ? (r(), s(d, {
21
+ key: 0,
22
+ data: n.value.data,
23
+ open: !0,
24
+ onAction: t,
25
+ onClose: e[0] || (e[0] = (k) => t(null))
26
+ }, null, 8, ["data"])) : f("", !0)
27
+ ], 64));
28
+ }
29
+ });
3
30
  export {
4
- o as default
31
+ $ as default
5
32
  };
package/dist/index39.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index4.cjs");;/* empty css */module.exports=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=Symbol("panel");function r(){const e=t.inject(n);if(!e)throw new Error("usePanel must be used within a <PanelProvider>");return e}exports.PANEL_KEY=n;exports.usePanel=r;
package/dist/index39.mjs CHANGED
@@ -1,5 +1,11 @@
1
- import o from "./index4.mjs";
2
- /* empty css */
1
+ import { inject as n } from "vue";
2
+ const r = Symbol("panel");
3
+ function o() {
4
+ const e = n(r);
5
+ if (!e) throw new Error("usePanel must be used within a <PanelProvider>");
6
+ return e;
7
+ }
3
8
  export {
4
- o as default
9
+ r as PANEL_KEY,
10
+ o as usePanel
5
11
  };
package/dist/index40.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index6.cjs");;/* empty css */module.exports=e;
1
+ "use strict";const e=require("vue"),o=["disabled","aria-busy"],l={key:0,class:"m2s2-btn-spinner","aria-hidden":"true"},s=e.defineComponent({inheritAttrs:!1,__name:"LoadingButton",props:{loading:{type:Boolean,default:!1},loadingText:{}},setup(t){const n=e.useAttrs();return(a,i)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps(e.unref(n),{disabled:t.loading||e.unref(n).disabled,"aria-busy":t.loading}),[t.loading?(e.openBlock(),e.createElementBlock("span",l)):e.createCommentVNode("",!0),!t.loading||!t.loadingText?e.renderSlot(a.$slots,"default",{key:1}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(t.loadingText),1)],64))],16,o))}});module.exports=s;
package/dist/index40.mjs CHANGED
@@ -1,5 +1,28 @@
1
- import o from "./index6.mjs";
2
- /* empty css */
1
+ import { defineComponent as i, useAttrs as s, openBlock as t, createElementBlock as a, mergeProps as l, unref as o, createCommentVNode as r, renderSlot as u, Fragment as c, createTextVNode as g, toDisplayString as m } from "vue";
2
+ const f = ["disabled", "aria-busy"], b = {
3
+ key: 0,
4
+ class: "m2s2-btn-spinner",
5
+ "aria-hidden": "true"
6
+ }, k = /* @__PURE__ */ i({
7
+ inheritAttrs: !1,
8
+ __name: "LoadingButton",
9
+ props: {
10
+ loading: { type: Boolean, default: !1 },
11
+ loadingText: {}
12
+ },
13
+ setup(e) {
14
+ const n = s();
15
+ return (d, y) => (t(), a("button", l(o(n), {
16
+ disabled: e.loading || o(n).disabled,
17
+ "aria-busy": e.loading
18
+ }), [
19
+ e.loading ? (t(), a("span", b)) : r("", !0),
20
+ !e.loading || !e.loadingText ? u(d.$slots, "default", { key: 1 }) : (t(), a(c, { key: 2 }, [
21
+ g(m(e.loadingText), 1)
22
+ ], 64))
23
+ ], 16, f));
24
+ }
25
+ });
3
26
  export {
4
- o as default
27
+ k as default
5
28
  };
package/dist/index42.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index10.cjs");;/* empty css */module.exports=e;
1
+ "use strict";const t=require("vue"),c=require("./index43.cjs"),u="m2s2-theme",d=t.defineComponent({__name:"ThemeProvider",props:{defaultTheme:{default:"auto"}},setup(r){const n=r;function m(){return localStorage.getItem(u)??n.defaultTheme}function a(e){e==="auto"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}const o=t.ref(n.defaultTheme);t.onMounted(()=>{o.value=m()}),t.watch(o,e=>{localStorage.setItem(u,e),a(e)},{immediate:!1});function s(e){o.value=e}return t.provide(c.THEME_KEY,{get theme(){return o.value},setTheme:s}),(e,l)=>t.renderSlot(e.$slots,"default")}});module.exports=d;
package/dist/index42.mjs CHANGED
@@ -1,5 +1,32 @@
1
- import o from "./index10.mjs";
2
- /* empty css */
1
+ import { defineComponent as d, ref as l, onMounted as c, watch as s, provide as f, renderSlot as i } from "vue";
2
+ import { THEME_KEY as h } from "./index43.mjs";
3
+ const m = "m2s2-theme", _ = /* @__PURE__ */ d({
4
+ __name: "ThemeProvider",
5
+ props: {
6
+ defaultTheme: { default: "auto" }
7
+ },
8
+ setup(a) {
9
+ const o = a;
10
+ function n() {
11
+ return localStorage.getItem(m) ?? o.defaultTheme;
12
+ }
13
+ function r(e) {
14
+ e === "auto" ? document.documentElement.removeAttribute("data-theme") : document.documentElement.setAttribute("data-theme", e);
15
+ }
16
+ const t = l(o.defaultTheme);
17
+ c(() => {
18
+ t.value = n();
19
+ }), s(t, (e) => {
20
+ localStorage.setItem(m, e), r(e);
21
+ }, { immediate: !1 });
22
+ function u(e) {
23
+ t.value = e;
24
+ }
25
+ return f(h, { get theme() {
26
+ return t.value;
27
+ }, setTheme: u }), (e, p) => i(e.$slots, "default");
28
+ }
29
+ });
3
30
  export {
4
- o as default
31
+ _ as default
5
32
  };
package/dist/index43.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index12.cjs");;/* empty css */module.exports=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),t=Symbol("theme");function o(){const e=r.inject(t);if(!e)throw new Error("useTheme must be used within a <ThemeProvider>");return e}exports.THEME_KEY=t;exports.useTheme=o;
package/dist/index43.mjs CHANGED
@@ -1,5 +1,11 @@
1
- import o from "./index12.mjs";
2
- /* empty css */
1
+ import { inject as t } from "vue";
2
+ const r = Symbol("theme");
3
+ function m() {
4
+ const e = t(r);
5
+ if (!e) throw new Error("useTheme must be used within a <ThemeProvider>");
6
+ return e;
7
+ }
3
8
  export {
4
- o as default
9
+ r as THEME_KEY,
10
+ m as useTheme
5
11
  };
package/dist/index44.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("./index14.cjs");;/* empty css */module.exports=e;
1
+ "use strict";const e=require("vue"),v=require("./index45.cjs"),d=e.defineComponent({__name:"AuthProvider",props:{provider:{}},setup(i){const u=i,r=e.ref(void 0),t=e.ref(!1),a=e.ref(!0);let o;e.onMounted(async()=>{const n=await u.provider.getCurrentUser();r.value=n,t.value=!!n,a.value=!1,o=u.provider.subscribeToAuthState(s=>{t.value=s,s||(r.value=void 0)})}),e.onUnmounted(()=>o==null?void 0:o());async function l(){await u.provider.signOut(),r.value=void 0,t.value=!1}return e.provide(v.AUTH_KEY,{get user(){return r.value},get loggedIn(){return t.value},get loading(){return a.value},signOut:l}),(n,s)=>e.renderSlot(n.$slots,"default")}});module.exports=d;