quirk-ui 0.1.192 → 0.1.193

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index.css');require('../../../index11.css');const e=require("react/jsx-runtime"),y=require("react"),k=require("@portabletext/react"),w=require("../AnimatedSpan/index.cjs");;/* empty css */require("../../../core/components/Avatar/index.cjs");require("../../../core/context/ModalContext.cjs");require("../../../core/components/Checkbox/index.cjs");const L=require("../../../core/components/Text/index.cjs"),_=require("../../../core/components/Heading/index.cjs");require("react-dom");const B=require("../../../core/components/Table/index.cjs");require("../../../core/components/Tabs/index.cjs");require("../../../core/tokens/theme.cjs");const H=require("next/image"),S=require("../../hooks/useMediaQuery.cjs"),b="_container_1glyt_1",z="_divider_1glyt_32",F="_richTextImage_1glyt_50",I="_richTextLink_1glyt_58",W="_spacerSmall_1glyt_72",C="_spacerMedium_1glyt_77",P="_spacerLarge_1glyt_82",U="_codeBlock_1glyt_110",A="_codeBlockWrapper_1glyt_119",E="_codeFilename_1glyt_131",i={container:b,divider:z,richTextImage:F,richTextLink:I,spacerSmall:W,spacerMedium:C,spacerLarge:P,codeBlock:U,codeBlockWrapper:A,codeFilename:E};function Q(s){return{normal:({children:n})=>e.jsx(L.Text,{className:s,children:n}),h1:({children:n})=>e.jsx(_.Heading,{className:s,level:1,children:n}),h2:({children:n})=>e.jsx(_.Heading,{className:s,level:2,children:n}),h3:({children:n})=>e.jsx(_.Heading,{className:s,level:3,children:n}),h4:({children:n})=>e.jsx(_.Heading,{className:s,level:4,children:n}),h5:({children:n})=>e.jsx(_.Heading,{className:s,level:5,children:n}),h6:({children:n})=>e.jsx(_.Heading,{className:s,level:6,children:n}),quote:({children:n})=>e.jsx("blockquote",{className:s,children:n})}}const D={strong:({children:s})=>e.jsx("strong",{children:s}),em:({children:s})=>e.jsx("em",{children:s}),number:({children:s})=>e.jsx("span",{className:"inlineNumber",children:s}),left:({children:s})=>e.jsx("span",{className:"textLeft",children:s}),center:({children:s})=>e.jsx("span",{className:"textCenter",children:s}),right:({children:s})=>e.jsx("span",{className:"textRight",children:s}),inlineCode:({children:s})=>e.jsx("code",{children:s}),link:({children:s,value:n})=>{var p;const{linkType:r,internalUrl:a,externalUrl:l,blank:x}=n??{};let d="#";return r==="external"&&l?d=l:r==="internal"&&((p=a==null?void 0:a.slug)!=null&&p.current)&&(d=`/${a.slug.current}`),e.jsx("a",{href:d,target:x?"_blank":void 0,rel:r==="external"?"noopener noreferrer":void 0,className:i.richTextLink,children:s})},textSize:({children:s,value:n})=>{const r=n!=null&&n.size?`text-${n.size}`:"";return e.jsx("span",{className:r,children:s})}};function G({baseClassName:s,previousTextRef:n,textOverride:r,animateText:a,isMobile:l}){const x=({children:t,value:c})=>{if(!c)return e.jsx(e.Fragment,{children:t});const{colorClass:o}=c;return r?a?e.jsx(w.AnimatedSpan,{className:o,text:r,prevText:n.current},"animated-span"):e.jsx("span",{className:o,children:r}):e.jsx("span",{className:o,children:t})},d=({children:t=[]})=>{const c=y.Children.count(t);return e.jsx("ul",{style:{columnCount:l?1:c>7?2:1},className:s,children:t})};let p;const q=()=>p;return p={marks:{...D,coloredText:x},block:Q(s),list:{bullet:d},types:{image:({value:t})=>{var o,h,m,f,T;if(!(t!=null&&t.imageUrls))return null;const c=((o=t.asset)==null?void 0:o.altText)||"Content image";return e.jsxs("figure",{className:`${s??""} ${i.richTextImage}`,children:[e.jsx(H,{src:t.imageUrls.medium,alt:c,width:1e3,height:800,style:{maxWidth:"100%",height:"auto"}}),(((h=t.asset)==null?void 0:h.title)||((m=t.asset)==null?void 0:m.description))&&e.jsxs("figcaption",{children:[((f=t.asset)==null?void 0:f.title)&&e.jsx("strong",{children:t.asset.title}),((T=t.asset)==null?void 0:T.description)&&e.jsx("p",{children:t.asset.description})]})]})},divider:()=>e.jsx("hr",{className:i.divider}),spacer:({value:t})=>{const c=(t==null?void 0:t.style)||"medium",o={small:i.spacerSmall,medium:i.spacerMedium,large:i.spacerLarge};return e.jsx("span",{className:o[c]??i.spacerMedium})},table:({value:t})=>{var N,$;if(!((N=t==null?void 0:t.rows)!=null&&N.length))return null;const{hasHeadingRow:c}=t,o=c?t.rows[0]:null,h=c?t.rows.slice(1):t.rows,m=o||h[0];if(!(($=m==null?void 0:m.cells)!=null&&$.length))return null;const f=m.cells.map((M,u)=>{var j;return{header:o?e.jsx(k.PortableText,{value:(j=o.cells[u])==null?void 0:j.content,components:q()}):`Column ${u+1}`,accessor:`col${u}`,cellRenderer:g=>g?e.jsx(k.PortableText,{value:g,components:q()}):null}}),T=h.map(M=>{var j;const u={};return(j=M.cells)==null||j.forEach((g,R)=>{u[`col${R}`]=g==null?void 0:g.content}),u});return e.jsx(B.Table,{hasHeadingRow:c,data:T,columns:f,className:`${s??""} ${c?"hasHeadingRow":""}`})},code:({value:t})=>t!=null&&t.code?e.jsxs("div",{className:`${i.codeBlockWrapper} ${s??""}`,children:[t.filename&&e.jsx("div",{className:i.codeFilename,children:t.filename}),e.jsx("pre",{className:i.codeBlock,children:e.jsx("code",{children:t.code})})]}):null}},p}const J=({blocks:s,className:n,textOverride:r,animateText:a})=>{const l=S.useMediaQuery("(max-width: 767px)"),x=y.useRef(r);y.useEffect(()=>{x.current=r},[r]);const d=y.useMemo(()=>G({baseClassName:n,previousTextRef:x,textOverride:r,animateText:a,isMobile:l}),[n,r,a,l]);return s?typeof s=="string"?e.jsx(L.Text,{className:n,children:s}):e.jsx("div",{className:`${i.container} portableTextContainer`,children:e.jsx(k.PortableText,{value:s,components:d})}):null};exports.RichText=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index.css');require('../../../index11.css');const e=require("react/jsx-runtime"),k=require("react"),q=require("@portabletext/react"),w=require("../AnimatedSpan/index.cjs");;/* empty css */require("../../../core/components/Avatar/index.cjs");require("../../../core/context/ModalContext.cjs");require("../../../core/components/Checkbox/index.cjs");const L=require("../../../core/components/Text/index.cjs"),h=require("../../../core/components/Heading/index.cjs");require("react-dom");const B=require("../../../core/components/Table/index.cjs");require("../../../core/components/Tabs/index.cjs");require("../../../core/tokens/theme.cjs");const H=require("next/image"),S=require("../../hooks/useMediaQuery.cjs"),b="_container_1glyt_1",z="_divider_1glyt_32",F="_richTextImage_1glyt_50",I="_richTextLink_1glyt_58",W="_spacerSmall_1glyt_72",C="_spacerMedium_1glyt_77",P="_spacerLarge_1glyt_82",U="_codeBlock_1glyt_110",A="_codeBlockWrapper_1glyt_119",E="_codeFilename_1glyt_131",i={container:b,divider:z,richTextImage:F,richTextLink:I,spacerSmall:W,spacerMedium:C,spacerLarge:P,codeBlock:U,codeBlockWrapper:A,codeFilename:E};function Q(t){return{normal:({children:n})=>e.jsx(L.Text,{className:t,children:n}),h1:({children:n})=>e.jsx(h.Heading,{className:t,level:1,children:n}),h2:({children:n})=>e.jsx(h.Heading,{className:t,level:2,children:n}),h3:({children:n})=>e.jsx(h.Heading,{className:t,level:3,children:n}),h4:({children:n})=>e.jsx(h.Heading,{className:t,level:4,children:n}),h5:({children:n})=>e.jsx(h.Heading,{className:t,level:5,children:n}),h6:({children:n})=>e.jsx(h.Heading,{className:t,level:6,children:n}),quote:({children:n})=>e.jsx("blockquote",{className:t,children:n})}}const D={strong:({children:t})=>e.jsx("strong",{children:t}),em:({children:t})=>e.jsx("em",{children:t}),number:({children:t})=>e.jsx("span",{className:"inlineNumber",children:t}),left:({children:t})=>e.jsx("span",{className:"textLeft",children:t}),center:({children:t})=>e.jsx("span",{className:"textCenter",children:t}),right:({children:t})=>e.jsx("span",{className:"textRight",children:t}),inlineCode:({children:t})=>e.jsx("code",{children:t}),link:({children:t,value:n})=>{var s;const{linkType:r,internalUrl:l,externalUrl:m,email:d,phone:p,blank:_}=n??{};let a="#";return r==="external"&&m?a=m:r==="internal"&&((s=l==null?void 0:l.slug)!=null&&s.current)?a=`/${l.slug.current}`:r==="email"&&d?a=`mailto:${d}`:r==="phone"&&p&&(a=`tel:${p.replace(/\s/g,"")}`),e.jsx("a",{href:a,target:_?"_blank":void 0,rel:r==="external"?"noopener noreferrer":void 0,className:i.richTextLink,children:t})},textSize:({children:t,value:n})=>{const r=n!=null&&n.size?`text-${n.size}`:"";return e.jsx("span",{className:r,children:t})}};function G({baseClassName:t,previousTextRef:n,textOverride:r,animateText:l,isMobile:m}){const d=({children:s,value:c})=>{if(!c)return e.jsx(e.Fragment,{children:s});const{colorClass:o}=c;return r?l?e.jsx(w.AnimatedSpan,{className:o,text:r,prevText:n.current},"animated-span"):e.jsx("span",{className:o,children:r}):e.jsx("span",{className:o,children:s})},p=({children:s=[]})=>{const c=k.Children.count(s);return e.jsx("ul",{style:{columnCount:m?1:c>7?2:1},className:t,children:s})};let _;const a=()=>_;return _={marks:{...D,coloredText:d},block:Q(t),list:{bullet:p},types:{image:({value:s})=>{var o,j,x,T,y;if(!(s!=null&&s.imageUrls))return null;const c=((o=s.asset)==null?void 0:o.altText)||"Content image";return e.jsxs("figure",{className:`${t??""} ${i.richTextImage}`,children:[e.jsx(H,{src:s.imageUrls.medium,alt:c,width:1e3,height:800,style:{maxWidth:"100%",height:"auto"}}),(((j=s.asset)==null?void 0:j.title)||((x=s.asset)==null?void 0:x.description))&&e.jsxs("figcaption",{children:[((T=s.asset)==null?void 0:T.title)&&e.jsx("strong",{children:s.asset.title}),((y=s.asset)==null?void 0:y.description)&&e.jsx("p",{children:s.asset.description})]})]})},divider:()=>e.jsx("hr",{className:i.divider}),spacer:({value:s})=>{const c=(s==null?void 0:s.style)||"medium",o={small:i.spacerSmall,medium:i.spacerMedium,large:i.spacerLarge};return e.jsx("span",{className:o[c]??i.spacerMedium})},table:({value:s})=>{var $,N;if(!(($=s==null?void 0:s.rows)!=null&&$.length))return null;const{hasHeadingRow:c}=s,o=c?s.rows[0]:null,j=c?s.rows.slice(1):s.rows,x=o||j[0];if(!((N=x==null?void 0:x.cells)!=null&&N.length))return null;const T=x.cells.map((M,u)=>{var f;return{header:o?e.jsx(q.PortableText,{value:(f=o.cells[u])==null?void 0:f.content,components:a()}):`Column ${u+1}`,accessor:`col${u}`,cellRenderer:g=>g?e.jsx(q.PortableText,{value:g,components:a()}):null}}),y=j.map(M=>{var f;const u={};return(f=M.cells)==null||f.forEach((g,R)=>{u[`col${R}`]=g==null?void 0:g.content}),u});return e.jsx(B.Table,{hasHeadingRow:c,data:y,columns:T,className:`${t??""} ${c?"hasHeadingRow":""}`})},code:({value:s})=>s!=null&&s.code?e.jsxs("div",{className:`${i.codeBlockWrapper} ${t??""}`,children:[s.filename&&e.jsx("div",{className:i.codeFilename,children:s.filename}),e.jsx("pre",{className:i.codeBlock,children:e.jsx("code",{children:s.code})})]}):null}},_}const J=({blocks:t,className:n,textOverride:r,animateText:l})=>{const m=S.useMediaQuery("(max-width: 767px)"),d=k.useRef(r);k.useEffect(()=>{d.current=r},[r]);const p=k.useMemo(()=>G({baseClassName:n,previousTextRef:d,textOverride:r,animateText:l,isMobile:m}),[n,r,l,m]);return t?typeof t=="string"?e.jsx(L.Text,{className:n,children:t}):e.jsx("div",{className:`${i.container} portableTextContainer`,children:e.jsx(q.PortableText,{value:t,components:p})}):null};exports.RichText=J;
@@ -1,6 +1,6 @@
1
- import { jsx as r, jsxs as T, Fragment as S } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as N, Fragment as S } from "react/jsx-runtime";
2
2
  import z, { useRef as F, useEffect as I, useMemo as W } from "react";
3
- import { PortableText as N } from "@portabletext/react";
3
+ import { PortableText as $ } from "@portabletext/react";
4
4
  import { AnimatedSpan as C } from "../AnimatedSpan/index.mjs";
5
5
  import '../../../index.css';import '../../../index11.css';/* empty css */
6
6
  import "../../../core/components/Avatar/index.mjs";
@@ -26,197 +26,197 @@ const q = "_container_1glyt_1", E = "_divider_1glyt_32", b = "_richTextImage_1gl
26
26
  codeBlockWrapper: J,
27
27
  codeFilename: K
28
28
  };
29
- function X(e) {
29
+ function X(t) {
30
30
  return {
31
- normal: ({ children: n }) => /* @__PURE__ */ r(B, { className: e, children: n }),
32
- h1: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 1, children: n }),
33
- h2: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 2, children: n }),
34
- h3: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 3, children: n }),
35
- h4: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 4, children: n }),
36
- h5: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 5, children: n }),
37
- h6: ({ children: n }) => /* @__PURE__ */ r(_, { className: e, level: 6, children: n }),
38
- quote: ({ children: n }) => /* @__PURE__ */ r("blockquote", { className: e, children: n })
31
+ normal: ({ children: r }) => /* @__PURE__ */ n(B, { className: t, children: r }),
32
+ h1: ({ children: r }) => /* @__PURE__ */ n(_, { className: t, level: 1, children: r }),
33
+ h2: ({ children: r }) => /* @__PURE__ */ n(_, { className: t, level: 2, children: r }),
34
+ h3: ({ children: r }) => /* @__PURE__ */ n(_, { className: t, level: 3, children: r }),
35
+ h4: ({ children: r }) => /* @__PURE__ */ n(_, { className: t, level: 4, children: r }),
36
+ h5: ({ children: r }) => /* @__PURE__ */ n(_, { className: t, level: 5, children: r }),
37
+ h6: ({ children: r }) => /* @__PURE__ */ n(_, { className: t, level: 6, children: r }),
38
+ quote: ({ children: r }) => /* @__PURE__ */ n("blockquote", { className: t, children: r })
39
39
  };
40
40
  }
41
41
  const Y = {
42
- strong: ({ children: e }) => /* @__PURE__ */ r("strong", { children: e }),
43
- em: ({ children: e }) => /* @__PURE__ */ r("em", { children: e }),
44
- number: ({ children: e }) => /* @__PURE__ */ r("span", { className: "inlineNumber", children: e }),
45
- left: ({ children: e }) => /* @__PURE__ */ r("span", { className: "textLeft", children: e }),
46
- center: ({ children: e }) => /* @__PURE__ */ r("span", { className: "textCenter", children: e }),
47
- right: ({ children: e }) => /* @__PURE__ */ r("span", { className: "textRight", children: e }),
48
- inlineCode: ({ children: e }) => /* @__PURE__ */ r("code", { children: e }),
49
- link: ({ children: e, value: n }) => {
50
- var g;
51
- const { linkType: o, internalUrl: l, externalUrl: a, blank: d } = n ?? {};
52
- let m = "#";
53
- return o === "external" && a ? m = a : o === "internal" && ((g = l == null ? void 0 : l.slug) != null && g.current) && (m = `/${l.slug.current}`), /* @__PURE__ */ r(
42
+ strong: ({ children: t }) => /* @__PURE__ */ n("strong", { children: t }),
43
+ em: ({ children: t }) => /* @__PURE__ */ n("em", { children: t }),
44
+ number: ({ children: t }) => /* @__PURE__ */ n("span", { className: "inlineNumber", children: t }),
45
+ left: ({ children: t }) => /* @__PURE__ */ n("span", { className: "textLeft", children: t }),
46
+ center: ({ children: t }) => /* @__PURE__ */ n("span", { className: "textCenter", children: t }),
47
+ right: ({ children: t }) => /* @__PURE__ */ n("span", { className: "textRight", children: t }),
48
+ inlineCode: ({ children: t }) => /* @__PURE__ */ n("code", { children: t }),
49
+ link: ({ children: t, value: r }) => {
50
+ var e;
51
+ const { linkType: o, internalUrl: l, externalUrl: m, email: p, phone: g, blank: u } = r ?? {};
52
+ let a = "#";
53
+ return o === "external" && m ? a = m : o === "internal" && ((e = l == null ? void 0 : l.slug) != null && e.current) ? a = `/${l.slug.current}` : o === "email" && p ? a = `mailto:${p}` : o === "phone" && g && (a = `tel:${g.replace(/\s/g, "")}`), /* @__PURE__ */ n(
54
54
  "a",
55
55
  {
56
- href: m,
57
- target: d ? "_blank" : void 0,
56
+ href: a,
57
+ target: u ? "_blank" : void 0,
58
58
  rel: o === "external" ? "noopener noreferrer" : void 0,
59
59
  className: i.richTextLink,
60
- children: e
60
+ children: t
61
61
  }
62
62
  );
63
63
  },
64
- textSize: ({ children: e, value: n }) => {
65
- const o = n != null && n.size ? `text-${n.size}` : "";
66
- return /* @__PURE__ */ r("span", { className: o, children: e });
64
+ textSize: ({ children: t, value: r }) => {
65
+ const o = r != null && r.size ? `text-${r.size}` : "";
66
+ return /* @__PURE__ */ n("span", { className: o, children: t });
67
67
  }
68
68
  };
69
69
  function Z({
70
- baseClassName: e,
71
- previousTextRef: n,
70
+ baseClassName: t,
71
+ previousTextRef: r,
72
72
  textOverride: o,
73
73
  animateText: l,
74
- isMobile: a
74
+ isMobile: m
75
75
  }) {
76
- const d = ({
77
- children: t,
76
+ const p = ({
77
+ children: e,
78
78
  value: s
79
79
  }) => {
80
- if (!s) return /* @__PURE__ */ r(S, { children: t });
80
+ if (!s) return /* @__PURE__ */ n(S, { children: e });
81
81
  const { colorClass: c } = s;
82
- return o ? l ? /* @__PURE__ */ r(
82
+ return o ? l ? /* @__PURE__ */ n(
83
83
  C,
84
84
  {
85
85
  className: c,
86
86
  text: o,
87
- prevText: n.current
87
+ prevText: r.current
88
88
  },
89
89
  "animated-span"
90
- ) : /* @__PURE__ */ r("span", { className: c, children: o }) : /* @__PURE__ */ r("span", { className: c, children: t });
91
- }, m = ({ children: t = [] }) => {
92
- const s = z.Children.count(t);
93
- return /* @__PURE__ */ r(
90
+ ) : /* @__PURE__ */ n("span", { className: c, children: o }) : /* @__PURE__ */ n("span", { className: c, children: e });
91
+ }, g = ({ children: e = [] }) => {
92
+ const s = z.Children.count(e);
93
+ return /* @__PURE__ */ n(
94
94
  "ul",
95
95
  {
96
- style: { columnCount: a ? 1 : s > 7 ? 2 : 1 },
97
- className: e,
98
- children: t
96
+ style: { columnCount: m ? 1 : s > 7 ? 2 : 1 },
97
+ className: t,
98
+ children: e
99
99
  }
100
100
  );
101
101
  };
102
- let g;
103
- const $ = () => g;
104
- return g = {
102
+ let u;
103
+ const a = () => u;
104
+ return u = {
105
105
  marks: {
106
106
  ...Y,
107
- coloredText: d
107
+ coloredText: p
108
108
  },
109
- block: X(e),
109
+ block: X(t),
110
110
  list: {
111
- bullet: m
111
+ bullet: g
112
112
  },
113
113
  types: {
114
114
  // ── Inline image ────────────────────────────────────────────────────
115
- image: ({ value: t }) => {
116
- var c, u, p, k, y;
117
- if (!(t != null && t.imageUrls)) return null;
118
- const s = ((c = t.asset) == null ? void 0 : c.altText) || "Content image";
119
- return /* @__PURE__ */ T("figure", { className: `${e ?? ""} ${i.richTextImage}`, children: [
120
- /* @__PURE__ */ r(
115
+ image: ({ value: e }) => {
116
+ var c, x, d, y, T;
117
+ if (!(e != null && e.imageUrls)) return null;
118
+ const s = ((c = e.asset) == null ? void 0 : c.altText) || "Content image";
119
+ return /* @__PURE__ */ N("figure", { className: `${t ?? ""} ${i.richTextImage}`, children: [
120
+ /* @__PURE__ */ n(
121
121
  H,
122
122
  {
123
- src: t.imageUrls.medium,
123
+ src: e.imageUrls.medium,
124
124
  alt: s,
125
125
  width: 1e3,
126
126
  height: 800,
127
127
  style: { maxWidth: "100%", height: "auto" }
128
128
  }
129
129
  ),
130
- (((u = t.asset) == null ? void 0 : u.title) || ((p = t.asset) == null ? void 0 : p.description)) && /* @__PURE__ */ T("figcaption", { children: [
131
- ((k = t.asset) == null ? void 0 : k.title) && /* @__PURE__ */ r("strong", { children: t.asset.title }),
132
- ((y = t.asset) == null ? void 0 : y.description) && /* @__PURE__ */ r("p", { children: t.asset.description })
130
+ (((x = e.asset) == null ? void 0 : x.title) || ((d = e.asset) == null ? void 0 : d.description)) && /* @__PURE__ */ N("figcaption", { children: [
131
+ ((y = e.asset) == null ? void 0 : y.title) && /* @__PURE__ */ n("strong", { children: e.asset.title }),
132
+ ((T = e.asset) == null ? void 0 : T.description) && /* @__PURE__ */ n("p", { children: e.asset.description })
133
133
  ] })
134
134
  ] });
135
135
  },
136
136
  // ── Divider ─────────────────────────────────────────────────────────
137
- divider: () => /* @__PURE__ */ r("hr", { className: i.divider }),
137
+ divider: () => /* @__PURE__ */ n("hr", { className: i.divider }),
138
138
  // ── Spacer ──────────────────────────────────────────────────────────
139
- spacer: ({ value: t }) => {
140
- const s = (t == null ? void 0 : t.style) || "medium", c = {
139
+ spacer: ({ value: e }) => {
140
+ const s = (e == null ? void 0 : e.style) || "medium", c = {
141
141
  small: i.spacerSmall,
142
142
  medium: i.spacerMedium,
143
143
  large: i.spacerLarge
144
144
  };
145
- return /* @__PURE__ */ r("span", { className: c[s] ?? i.spacerMedium });
145
+ return /* @__PURE__ */ n("span", { className: c[s] ?? i.spacerMedium });
146
146
  },
147
147
  // ── Table ────────────────────────────────────────────────────────────
148
- table: ({ value: t }) => {
148
+ table: ({ value: e }) => {
149
149
  var L, M;
150
- if (!((L = t == null ? void 0 : t.rows) != null && L.length)) return null;
151
- const { hasHeadingRow: s } = t, c = s ? t.rows[0] : null, u = s ? t.rows.slice(1) : t.rows, p = c || u[0];
152
- if (!((M = p == null ? void 0 : p.cells) != null && M.length)) return null;
153
- const k = p.cells.map((w, h) => {
154
- var x;
150
+ if (!((L = e == null ? void 0 : e.rows) != null && L.length)) return null;
151
+ const { hasHeadingRow: s } = e, c = s ? e.rows[0] : null, x = s ? e.rows.slice(1) : e.rows, d = c || x[0];
152
+ if (!((M = d == null ? void 0 : d.cells) != null && M.length)) return null;
153
+ const y = d.cells.map((w, h) => {
154
+ var k;
155
155
  return {
156
- header: c ? /* @__PURE__ */ r(
157
- N,
156
+ header: c ? /* @__PURE__ */ n(
157
+ $,
158
158
  {
159
- value: (x = c.cells[h]) == null ? void 0 : x.content,
160
- components: $()
159
+ value: (k = c.cells[h]) == null ? void 0 : k.content,
160
+ components: a()
161
161
  }
162
162
  ) : `Column ${h + 1}`,
163
163
  accessor: `col${h}`,
164
- cellRenderer: (f) => f ? /* @__PURE__ */ r(
165
- N,
164
+ cellRenderer: (f) => f ? /* @__PURE__ */ n(
165
+ $,
166
166
  {
167
167
  value: f,
168
- components: $()
168
+ components: a()
169
169
  }
170
170
  ) : null
171
171
  };
172
- }), y = u.map((w) => {
173
- var x;
172
+ }), T = x.map((w) => {
173
+ var k;
174
174
  const h = {};
175
- return (x = w.cells) == null || x.forEach((f, R) => {
175
+ return (k = w.cells) == null || k.forEach((f, R) => {
176
176
  h[`col${R}`] = f == null ? void 0 : f.content;
177
177
  }), h;
178
178
  });
179
- return /* @__PURE__ */ r(
179
+ return /* @__PURE__ */ n(
180
180
  j,
181
181
  {
182
182
  hasHeadingRow: s,
183
- data: y,
184
- columns: k,
185
- className: `${e ?? ""} ${s ? "hasHeadingRow" : ""}`
183
+ data: T,
184
+ columns: y,
185
+ className: `${t ?? ""} ${s ? "hasHeadingRow" : ""}`
186
186
  }
187
187
  );
188
188
  },
189
189
  // ── Code block ──────────────────────────────────────────────────────
190
- code: ({ value: t }) => t != null && t.code ? /* @__PURE__ */ T("div", { className: `${i.codeBlockWrapper} ${e ?? ""}`, children: [
191
- t.filename && /* @__PURE__ */ r("div", { className: i.codeFilename, children: t.filename }),
192
- /* @__PURE__ */ r("pre", { className: i.codeBlock, children: /* @__PURE__ */ r("code", { children: t.code }) })
190
+ code: ({ value: e }) => e != null && e.code ? /* @__PURE__ */ N("div", { className: `${i.codeBlockWrapper} ${t ?? ""}`, children: [
191
+ e.filename && /* @__PURE__ */ n("div", { className: i.codeFilename, children: e.filename }),
192
+ /* @__PURE__ */ n("pre", { className: i.codeBlock, children: /* @__PURE__ */ n("code", { children: e.code }) })
193
193
  ] }) : null
194
194
  }
195
- }, g;
195
+ }, u;
196
196
  }
197
197
  const ge = ({
198
- blocks: e,
199
- className: n,
198
+ blocks: t,
199
+ className: r,
200
200
  textOverride: o,
201
201
  animateText: l
202
202
  }) => {
203
- const a = U("(max-width: 767px)"), d = F(o);
203
+ const m = U("(max-width: 767px)"), p = F(o);
204
204
  I(() => {
205
- d.current = o;
205
+ p.current = o;
206
206
  }, [o]);
207
- const m = W(
207
+ const g = W(
208
208
  () => Z({
209
- baseClassName: n,
210
- previousTextRef: d,
209
+ baseClassName: r,
210
+ previousTextRef: p,
211
211
  textOverride: o,
212
212
  animateText: l,
213
- isMobile: a
213
+ isMobile: m
214
214
  }),
215
215
  // previousTextRef intentionally omitted — it's a stable ref object.
216
216
  // eslint-disable-next-line react-hooks/exhaustive-deps
217
- [n, o, l, a]
217
+ [r, o, l, m]
218
218
  );
219
- return e ? typeof e == "string" ? /* @__PURE__ */ r(B, { className: n, children: e }) : /* @__PURE__ */ r("div", { className: `${i.container} portableTextContainer`, children: /* @__PURE__ */ r(N, { value: e, components: m }) }) : null;
219
+ return t ? typeof t == "string" ? /* @__PURE__ */ n(B, { className: r, children: t }) : /* @__PURE__ */ n("div", { className: `${i.container} portableTextContainer`, children: /* @__PURE__ */ n($, { value: t, components: g }) }) : null;
220
220
  };
221
221
  export {
222
222
  ge as RichText
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.1.192",
4
+ "version": "0.1.193",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {