@caseparts-org/caseblocks 0.0.199 → 0.0.201

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
- ._main_1e17g_1{box-shadow:#bbb3 0 8px 24px;padding:var(--spacing-0-5) 0;z-index:1;position:relative}._column_1e17g_8{box-sizing:border-box;padding:0 var(--spacing-1)}._topNav_1e17g_13{padding-bottom:var(--spacing-0-5);gap:var(--spacing-1-5)}@media (max-width: 1281px){._topNav_1e17g_13{gap:var(--spacing-1);padding-bottom:0}}._logo_1e17g_21{cursor:pointer}._operations_1e17g_24{gap:var(--spacing-1-5);width:100%}@media (max-width: 1281px){._operations_1e17g_24{gap:var(--spacing-1)}}._search_1e17g_31{flex:1}._siteLink_1e17g_34{color:var(--color-brand-primary-primary-black);cursor:default;border:none;background-color:transparent;padding:0;margin:0;font-family:var(--font-family-display);font-size:var(--font-size-md);cursor:pointer}._siteLink_1e17g_34:hover{text-decoration:underline;color:var(--text-text-links)}@media (max-width:1280px){._siteLink_1e17g_34{font-family:var(--font-family-body);font-size:var(--font-size-sm)}}._accountArea_1e17g_54{width:145px}@media (max-width: 1281px){._accountArea_1e17g_54{width:min-content}}._cart_1e17g_60{border:none;padding:0;margin:0;background-color:transparent}._category_1e17g_66{list-style:none;min-height:42px;display:flex;flex-direction:row;align-items:stretch;padding:0}._categoryLink_1e17g_74{color:var(--text-text-primary);text-decoration:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}._categoryLink_1e17g_74:hover{color:var(--color-brand-primary-primary-teal-blue);text-decoration:none}._categoryLink_1e17g_74 path{fill:var(--color-brand-primary-primary-teal-blue)}._menuList_1e17g_90{list-style:none;padding:0;margin:0;height:min-content;display:flex;flex-direction:column;gap:var(--spacing-spacing-3xs)}._menuList_1e17g_90>li{width:100%;min-height:42px;padding:var(--spacing-spacing-2xs);border:1px solid var(--border-border-primary, #dfdfdf);box-sizing:border-box;display:flex;flex-direction:row;align-items:center;border-radius:var(--border-radius-md);color:var(--text-text-links)}._menuItemAction_1e17g_113{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs);color:var(--color-brand-primary-primary-black)}._shortcutIcon_1e17g_122{color:var(--text-text-links)}
1
+ ._main_14nx2_1{box-shadow:#bbb3 0 8px 24px;padding:var(--spacing-0-5) 0;z-index:1;position:relative}._column_14nx2_8{box-sizing:border-box;padding:0 var(--spacing-1)}._topNav_14nx2_13{padding-bottom:var(--spacing-0-5);gap:var(--spacing-1-5)}@media (max-width: 1281px){._topNav_14nx2_13{gap:var(--spacing-1);padding-bottom:0}}._logo_14nx2_21{cursor:pointer}._operations_14nx2_24{gap:var(--spacing-1-5);width:100%}@media (max-width: 1281px){._operations_14nx2_24{gap:var(--spacing-1)}}._search_14nx2_31{flex:1}._siteLink_14nx2_34{color:var(--color-brand-primary-primary-black);cursor:default;border:none;background-color:transparent;padding:0;margin:0;font-family:var(--font-family-display);font-size:var(--font-size-md);cursor:pointer;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs)}._siteLink_14nx2_34:hover{text-decoration:underline;color:var(--text-text-links)}@media (max-width:1280px){._siteLink_14nx2_34{font-family:var(--font-family-body);font-size:var(--font-size-sm)}}._siteLink_14nx2_34 path{fill:var(--color-brand-primary-primary-teal-blue)}._accountArea_14nx2_61{width:145px}@media (max-width: 1281px){._accountArea_14nx2_61{width:min-content}}._cart_14nx2_67{border:none;padding:0;margin:0;background-color:transparent}._category_14nx2_73{list-style:none;min-height:42px;display:flex;flex-direction:row;align-items:stretch;padding:0}._categoryLink_14nx2_81{color:var(--text-text-primary);text-decoration:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}._categoryLink_14nx2_81:hover{color:var(--color-brand-primary-primary-teal-blue);text-decoration:none}._categoryLink_14nx2_81 path{fill:var(--color-brand-primary-primary-teal-blue)}._menuList_14nx2_97{list-style:none;padding:0;margin:0;height:min-content;display:flex;flex-direction:column;gap:var(--spacing-spacing-3xs)}._menuList_14nx2_97>li{width:100%;min-height:42px;padding:var(--spacing-spacing-2xs);border:1px solid var(--border-border-primary, #dfdfdf);box-sizing:border-box;display:flex;flex-direction:row;align-items:center;border-radius:var(--border-radius-md);color:var(--text-text-links)}._menuItemAction_14nx2_120{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs);color:var(--color-brand-primary-primary-black)}._shortcutIcon_14nx2_129{color:var(--text-text-links)}
@@ -4,9 +4,10 @@ export type MarkdownProps = {
4
4
  children?: string | null;
5
5
  className?: string;
6
6
  components?: Components;
7
- url?: LinkTarget;
7
+ partUrl?: LinkTarget;
8
+ relativePathUrl?: LinkTarget;
8
9
  validate?: ValidateToken;
9
10
  batchValidate?: BatchValidateTokens;
10
11
  debug?: boolean;
11
12
  };
12
- export declare function Markdown({ children, className, components, url, validate, batchValidate, debug, }: MarkdownProps): import("react/jsx-runtime").JSX.Element | null;
13
+ export declare function Markdown({ children, className, components, partUrl, relativePathUrl, validate, batchValidate, debug, }: MarkdownProps): import("react/jsx-runtime").JSX.Element | null;
@@ -8679,28 +8679,30 @@ function zf({
8679
8679
  children: e,
8680
8680
  className: t,
8681
8681
  components: n,
8682
- url: r,
8683
- validate: i,
8684
- batchValidate: o,
8685
- debug: l = !1
8682
+ partUrl: r,
8683
+ relativePathUrl: i,
8684
+ validate: o,
8685
+ batchValidate: l,
8686
+ debug: a = !1
8686
8687
  }) {
8687
- const a = e ?? "", { output: u } = Ti(
8688
- a,
8688
+ const u = e ?? "", { output: s } = Ti(
8689
+ u,
8689
8690
  r,
8690
8691
  i,
8691
- l,
8692
- o
8692
+ o,
8693
+ a,
8694
+ l
8693
8695
  );
8694
- if (!a) return null;
8695
- const s = r ? {
8696
- a: ({ node: p, ...h }) => /* @__PURE__ */ je("a", { ...h, target: "_blank", rel: "noopener noreferrer" })
8697
- } : {}, f = t ? `${or.markdown} ${t}` : or.markdown, c = { ...Ef, ...s, ...n };
8698
- return /* @__PURE__ */ je("div", { className: f, children: /* @__PURE__ */ je(
8696
+ if (!u) return null;
8697
+ const f = r || i ? {
8698
+ a: ({ node: h, ...d }) => /* @__PURE__ */ je("a", { ...d, target: "_blank", rel: "noopener noreferrer" })
8699
+ } : {}, c = t ? `${or.markdown} ${t}` : or.markdown, p = { ...Ef, ...f, ...n };
8700
+ return /* @__PURE__ */ je("div", { className: c, children: /* @__PURE__ */ je(
8699
8701
  os,
8700
8702
  {
8701
8703
  remarkPlugins: [xf, Sf, Ii],
8702
- components: c,
8703
- children: u
8704
+ components: p,
8705
+ children: s
8704
8706
  }
8705
8707
  ) });
8706
8708
  }
@@ -1,9 +1,9 @@
1
- import { jsx as n, jsxs as c } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as c } from "react/jsx-runtime";
2
2
  import { useState as m, useEffect as p } from "react";
3
- import { Markdown as s } from "./Markdown.js";
4
- const f = {
3
+ import { Markdown as l } from "./Markdown.js";
4
+ const w = {
5
5
  title: "Case Parts/Molecules/Markdown",
6
- component: s,
6
+ component: l,
7
7
  parameters: { layout: "padded" },
8
8
  tags: ["autodocs"]
9
9
  }, r = `Kason 171 Latch
@@ -12,50 +12,51 @@ const f = {
12
12
  Fits only selected revisions.
13
13
  :::
14
14
 
15
- This fits part [171] and an invalid token [bad].
15
+ This fits part [171], an invalid token [bad], and a help page at [FAQ](/faq).
16
16
  Already linked should remain: [171](https://example.com/should-stay).
17
17
  `;
18
- function u(e) {
19
- const [o, i] = m(e.children ?? r);
18
+ function h(e) {
19
+ const [i, o] = m(e.children ?? r);
20
20
  return p(() => {
21
- i(e.children ?? r);
21
+ o(e.children ?? r);
22
22
  }, [e.children]), /* @__PURE__ */ c("div", { style: { display: "grid", gap: 12 }, children: [
23
- /* @__PURE__ */ n("label", { style: { fontWeight: 600 }, children: "Edit Markdown (preprocess + admonitions live):" }),
24
- /* @__PURE__ */ n(
23
+ /* @__PURE__ */ a("label", { style: { fontWeight: 600 }, children: "Edit Markdown (preprocess + admonitions live):" }),
24
+ /* @__PURE__ */ a(
25
25
  "textarea",
26
26
  {
27
- value: o,
28
- onChange: (t) => i(t.target.value),
27
+ value: i,
28
+ onChange: (t) => o(t.target.value),
29
29
  rows: 14,
30
30
  style: { width: "100%", fontFamily: "monospace" }
31
31
  }
32
32
  ),
33
- /* @__PURE__ */ n(
34
- s,
33
+ /* @__PURE__ */ a(
34
+ l,
35
35
  {
36
36
  ...e,
37
- url: (t) => `https://example.com/parts/${encodeURIComponent(t)}`,
37
+ partUrl: (t) => `https://example.com/parts/${encodeURIComponent(t)}`,
38
+ relativePathUrl: "https://example.com",
38
39
  validate: async (t) => {
39
- if (await new Promise((a) => setTimeout(a, 50)), /^\d+$/.test(t)) return !0;
40
+ if (await new Promise((n) => setTimeout(n, 50)), /^\d+$/.test(t)) return !0;
40
41
  throw new Error("invalid");
41
42
  },
42
43
  debug: !0,
43
- children: o
44
+ children: i
44
45
  }
45
46
  )
46
47
  ] });
47
48
  }
48
- const y = {
49
+ const v = {
49
50
  name: "Live Playground",
50
51
  args: {
51
52
  children: r
52
53
  },
53
- render: (e) => /* @__PURE__ */ n(u, { ...e })
54
- }, v = {
54
+ render: (e) => /* @__PURE__ */ a(h, { ...e })
55
+ }, y = {
55
56
  args: {
56
57
  children: `# Heading 1
57
58
 
58
- Paragraph with a [link](https://example.com).
59
+ Paragraph with a [link](https://example.com) and a relative help path [FAQ](/faq).
59
60
 
60
61
  ## Heading 2
61
62
 
@@ -86,25 +87,27 @@ export default greet;
86
87
 
87
88
  | Col A | Col B |
88
89
  |------:|:------|
89
- | 123 | text |`
90
+ | 123 | text |`,
91
+ relativePathUrl: "https://example.com"
90
92
  }
91
93
  }, x = {
92
94
  name: "Item Description Variant",
93
- render: (e) => /* @__PURE__ */ n(({ text: l }) => /* @__PURE__ */ n(
94
- s,
95
+ render: (e) => /* @__PURE__ */ a(({ text: s }) => /* @__PURE__ */ a(
96
+ l,
95
97
  {
96
98
  ...e,
97
- url: (a) => `https://example.com/parts/${encodeURIComponent(a)}`,
98
- validate: async (a) => {
99
- if (await new Promise((d) => setTimeout(d, 50)), /^\d+$/.test(a)) return !0;
99
+ partUrl: (n) => `https://example.com/parts/${encodeURIComponent(n)}`,
100
+ relativePathUrl: "https://example.com",
101
+ validate: async (n) => {
102
+ if (await new Promise((d) => setTimeout(d, 50)), /^\d+$/.test(n)) return !0;
100
103
  throw new Error("invalid");
101
104
  },
102
105
  debug: !0,
103
- children: l
106
+ children: s
104
107
  }
105
108
  ), { text: `Kason 171 Latch
106
109
 
107
- This fits part [171] and an invalid token [bad]. Already linked should remain: [171](https://example.com/should-stay).
110
+ This fits part [171], an invalid token [bad], and the installation guide at [FAQ](/faq). Already linked should remain: [171](https://example.com/should-stay).
108
111
 
109
112
  Another valid numeric: [172].` })
110
113
  }, b = {
@@ -141,8 +144,8 @@ This block should not be transformed.
141
144
  };
142
145
  export {
143
146
  b as Admonitions,
144
- v as Basic,
147
+ y as Basic,
145
148
  x as ItemDescription,
146
- y as Playground,
147
- f as default
149
+ v as Playground,
150
+ w as default
148
151
  };
@@ -7,7 +7,7 @@ export type PreprocessedMarkdownResult = {
7
7
  tokens: string[];
8
8
  };
9
9
  /**
10
- * Extracts bracketed tokens not already followed by parentheses, validates them, and
11
- * returns the input with validated tokens converted to markdown links.
10
+ * Validates bare bracketed part tokens and rewrites relative markdown links using
11
+ * the configured URL targets.
12
12
  */
13
- export declare function usePreprocessedMarkdown(input: string | null | undefined, url?: LinkTarget, validate?: ValidateToken, debug?: boolean, batchValidate?: BatchValidateTokens): PreprocessedMarkdownResult;
13
+ export declare function usePreprocessedMarkdown(input: string | null | undefined, partUrl?: LinkTarget, relativePathUrl?: LinkTarget, validate?: ValidateToken, debug?: boolean, batchValidate?: BatchValidateTokens): PreprocessedMarkdownResult;
@@ -1,86 +1,95 @@
1
- import { useState as q, useRef as E, useEffect as v, useMemo as H } from "react";
2
- const x = (e, s) => {
3
- const u = e.lastIndexOf(`
4
- `, Math.max(0, s - 1)) + 1, h = e.indexOf(`
5
- `, s), d = h === -1 ? e.length : h;
6
- return e.slice(u, d).trimStart().startsWith(":::");
1
+ import { useState as N, useRef as L, useEffect as I, useMemo as x } from "react";
2
+ const H = /\[(.+?)\](?!\()/g, p = /\[([^\]]+?)\]\((\/[^)\s]*)\)/g, W = (e, n) => typeof e == "function" ? e(n) : e, X = (e, n) => typeof e == "function" ? e(n) : `${e}${n}`, E = (e, n) => {
3
+ const a = e.lastIndexOf(`
4
+ `, Math.max(0, n - 1)) + 1, l = e.indexOf(`
5
+ `, n), w = l === -1 ? e.length : l;
6
+ return e.slice(a, w).trimStart().startsWith(":::");
7
7
  };
8
- function N(e, s, u, h = !1, d) {
9
- const [A, w] = q(e ?? ""), [L, m] = q(!1), c = E(/* @__PURE__ */ new Map()), M = E(u), O = E(
10
- d
8
+ function j(e, n, a, l, w = !1, y) {
9
+ const [q, S] = N(e ?? ""), [v, m] = N(!1), o = L(/* @__PURE__ */ new Map()), O = L(l), M = L(
10
+ y
11
11
  );
12
- v(() => {
13
- M.current = u, O.current = d;
14
- }, [u, d]);
15
- const S = H(() => /\[(.+?)\](?!\()/g, []), l = H(() => {
16
- if (!e || !s) return [];
17
- const f = Array.from(e.matchAll(S)).filter(
18
- (a) => typeof a.index == "number" ? !x(e, a.index) : !0
19
- ).map((a) => a[1]);
12
+ I(() => {
13
+ O.current = l, M.current = y;
14
+ }, [l, y]);
15
+ const d = x(() => H, []), h = x(() => {
16
+ if (!e || !n) return [];
17
+ const f = Array.from(e.matchAll(d)).filter(
18
+ (u) => typeof u.index == "number" ? !E(e, u.index) : !0
19
+ ).map((u) => u[1]);
20
20
  return Array.from(new Set(f));
21
- }, [e, S, s]), R = (f) => {
22
- const r = f.split(/\r?\n/);
23
- if (r.length === 0) return f;
24
- const a = r[0];
25
- return /^\s*#\s/.test(a) || (r[0] = `# ${a.trim()}`), r.join(`
21
+ }, [e, d, n]), T = x(() => {
22
+ if (!e || !a) return [];
23
+ const f = Array.from(e.matchAll(p)).filter(
24
+ (t) => typeof t.index == "number" ? !E(e, t.index) : !0
25
+ ).map((t) => t[0]);
26
+ return Array.from(new Set(f));
27
+ }, [e, a]), _ = (f) => {
28
+ const t = f.split(/\r?\n/);
29
+ if (t.length === 0) return f;
30
+ const u = t[0];
31
+ return /^\s*#\s/.test(u) || (t[0] = `# ${u.trim()}`), t.join(`
26
32
  `);
27
33
  };
28
- return v(() => {
34
+ return I(() => {
29
35
  if (!e) {
30
- w(""), m(!1);
36
+ S(""), m(!1);
31
37
  return;
32
38
  }
33
- if (!s) {
34
- w(e), m(!1);
39
+ if (!n && !a) {
40
+ S(e), m(!1);
35
41
  return;
36
42
  }
37
- if (!l.length) {
38
- w(R(e)), m(!1);
43
+ if (!h.length && !T.length) {
44
+ S(_(e)), m(!1);
39
45
  return;
40
46
  }
41
47
  let f = !1;
42
48
  m(!0);
43
- const r = l.filter((y) => !c.current.has(y));
49
+ const t = h.filter((g) => !o.current.has(g));
44
50
  return (async () => {
45
- if (r.length) {
46
- const t = O.current, o = M.current;
47
- if (t)
51
+ if (t.length) {
52
+ const r = M.current, c = O.current;
53
+ if (r)
48
54
  try {
49
- const n = await t(r), i = n instanceof Set ? n : new Set(n);
50
- r.forEach((g) => {
51
- c.current.set(g, i.has(g));
55
+ const s = await r(t), i = s instanceof Set ? s : new Set(s);
56
+ t.forEach((R) => {
57
+ o.current.set(R, i.has(R));
52
58
  });
53
59
  } catch {
54
- r.forEach((n) => {
55
- c.current.set(n, !1);
60
+ t.forEach((s) => {
61
+ o.current.set(s, !1);
56
62
  });
57
63
  }
58
- else o ? (await Promise.allSettled(
59
- r.map(async (i) => {
64
+ else c ? (await Promise.allSettled(
65
+ t.map(async (i) => {
60
66
  try {
61
- await o(i), c.current.set(i, !0);
67
+ await c(i), o.current.set(i, !0);
62
68
  } catch {
63
- c.current.set(i, !1);
69
+ o.current.set(i, !1);
64
70
  }
65
71
  })
66
- )).forEach((i, g) => {
67
- const $ = r[g];
68
- c.current.has($) || c.current.set($, i.status === "fulfilled");
69
- }) : r.forEach((n) => {
70
- c.current.set(n, !0);
72
+ )).forEach((i, R) => {
73
+ const K = t[R];
74
+ o.current.has(K) || o.current.set(K, i.status === "fulfilled");
75
+ }) : t.forEach((s) => {
76
+ o.current.set(s, !0);
71
77
  });
72
78
  }
73
- const y = new Set(
74
- l.filter((t) => c.current.get(t) === !0)
75
- ), P = new Set(
76
- l.filter((t) => c.current.get(t) === !1)
77
- ), j = (t) => typeof s == "function" ? s(t) : s, p = e.replace(S, (t, o, n) => x(e, n) ? t : y.has(o) ? `**[${o}](${j(o)})**` : t), C = h ? p.replace(S, (t, o, n) => x(p, n) ? t : P.has(o) ? `[${o}]⚠️` : t) : p, F = R(C);
78
- f || (w(F), m(!1));
79
+ const g = new Set(
80
+ h.filter((r) => o.current.get(r) === !0)
81
+ ), C = new Set(
82
+ h.filter((r) => o.current.get(r) === !1)
83
+ ), A = e.replace(d, (r, c, s) => E(e, s) ? r : g.has(c) && n ? `**[${c}](${W(n, c)})**` : r), $ = a ? A.replace(
84
+ p,
85
+ (r, c, s, i) => E(A, i) ? r : `[${c}](${X(a, s)})`
86
+ ) : A, D = w ? $.replace(d, (r, c, s) => E($, s) ? r : C.has(c) ? `[${c}]⚠️` : r) : $, G = _(D);
87
+ f || (S(G), m(!1));
79
88
  })(), () => {
80
89
  f = !0;
81
90
  };
82
- }, [e, l, h, s, S]), { output: A, loading: L, tokens: l };
91
+ }, [e, h, T, w, n, a, d]), { output: q, loading: v, tokens: h };
83
92
  }
84
93
  export {
85
- N as usePreprocessedMarkdown
94
+ j as usePreprocessedMarkdown
86
95
  };
@@ -1,8 +1,8 @@
1
- import { jsx as s, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as s } from "react/jsx-runtime";
2
2
  import S from "react";
3
3
  import { Text as h } from "../../atoms/Text/Text.js";
4
4
  import { Link as u } from "../../atoms/Link/Link.js";
5
- import { Icon as t } from "../../atoms/Icon/Icon.js";
5
+ import { Icon as i } from "../../atoms/Icon/Icon.js";
6
6
  import { Flex as m } from "../../atoms/Flex/Flex.js";
7
7
  import { Grid as U, Column as C } from "../../atoms/Grid/Grid.js";
8
8
  import { Logo as F } from "../../molecules/Logo/Logo.js";
@@ -11,9 +11,9 @@ import { HamburgerMenu as H } from "../../molecules/HamburgerMenu/HamburgerMenu.
11
11
  import { ShoppingCart as q } from "../../molecules/Cart/Cart.js";
12
12
  import { Account as B } from "../../molecules/Account/Account.js";
13
13
  import { CategoryNav as G } from "../../molecules/CategoryNav/CategoryNav.js";
14
- import { getHideAtStyles as I } from "../../atoms/HideAt.js";
15
- import { c as i } from "../../clsx-OuTLNxxd.js";
16
- import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_8", T = "_topNav_1e17g_13", W = "_logo_1e17g_21", E = "_operations_1e17g_24", J = "_search_1e17g_31", O = "_siteLink_1e17g_34", R = "_accountArea_1e17g_54", V = "_category_1e17g_66", X = "_categoryLink_1e17g_74", Y = "_menuList_1e17g_90", Z = "_menuItemAction_1e17g_113", $ = "_shortcutIcon_1e17g_122", e = {
14
+ import { getHideAtStyles as x } from "../../atoms/HideAt.js";
15
+ import { c as t } from "../../clsx-OuTLNxxd.js";
16
+ import '../../assets/MainNav.css';const P = "_main_14nx2_1", Q = "_column_14nx2_8", T = "_topNav_14nx2_13", W = "_logo_14nx2_21", E = "_operations_14nx2_24", J = "_search_14nx2_31", O = "_siteLink_14nx2_34", R = "_accountArea_14nx2_61", V = "_category_14nx2_73", X = "_categoryLink_14nx2_81", Y = "_menuList_14nx2_97", Z = "_menuItemAction_14nx2_120", $ = "_shortcutIcon_14nx2_129", e = {
17
17
  main: P,
18
18
  column: Q,
19
19
  topNav: T,
@@ -29,19 +29,19 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
29
29
  shortcutIcon: $
30
30
  }, pe = S.forwardRef(function({
31
31
  account: l,
32
- categories: o,
33
- homeRoute: L,
34
- faqRoute: A,
32
+ categories: r,
33
+ homeRoute: I,
34
+ faqRoute: L,
35
35
  customPartsRoute: f,
36
- aboutUsRoute: v,
36
+ aboutUsRoute: A,
37
37
  contactRoute: p,
38
- cart: k,
39
- open: y,
38
+ cart: v,
39
+ open: k,
40
40
  // consume external panel control props from CartPropsBase
41
- className: x,
41
+ className: y,
42
42
  onLoginClick: b,
43
43
  onSearch: N,
44
- onCategoryClick: r,
44
+ onCategoryClick: o,
45
45
  onClickModelSerial: _,
46
46
  onCartClick: w,
47
47
  accountPopoverContent: z,
@@ -49,8 +49,8 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
49
49
  isCategoriesLoading: j,
50
50
  ...D
51
51
  }, M) {
52
- return /* @__PURE__ */ s(U, { ...D, gridWrapperClassName: i(e.main, x), children: /* @__PURE__ */ n(C, { span: 12, className: e.column, children: [
53
- /* @__PURE__ */ n(
52
+ return /* @__PURE__ */ n(U, { ...D, gridWrapperClassName: t(e.main, y), children: /* @__PURE__ */ s(C, { span: 12, className: e.column, children: [
53
+ /* @__PURE__ */ s(
54
54
  m,
55
55
  {
56
56
  flexDirection: "row",
@@ -58,8 +58,8 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
58
58
  justifyContent: "space-between",
59
59
  className: e.topNav,
60
60
  children: [
61
- /* @__PURE__ */ s("div", { className: e.logo, children: /* @__PURE__ */ s(u, { href: L, children: /* @__PURE__ */ s(F, {}) }) }),
62
- /* @__PURE__ */ n(
61
+ /* @__PURE__ */ n("div", { className: e.logo, children: /* @__PURE__ */ n(u, { href: I, children: /* @__PURE__ */ n(F, {}) }) }),
62
+ /* @__PURE__ */ s(
63
63
  m,
64
64
  {
65
65
  flexDirection: "row",
@@ -67,11 +67,14 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
67
67
  justifyContent: "flex-end",
68
68
  className: e.operations,
69
69
  children: [
70
- /* @__PURE__ */ s(m, { flexDirection: "row", hideAt: ["sm"], className: e.search, children: /* @__PURE__ */ s(g, { onSearch: N, inputName: "cpc-search" }) }),
71
- /* @__PURE__ */ s("button", { onClick: _, className: i(e.siteLink, I(["sm", "md"])), children: "Model/Serial" }),
72
- /* @__PURE__ */ s(c, { href: f, hideAt: ["sm", "md"], children: "Custom Parts" }),
73
- /* @__PURE__ */ s(c, { href: p, hideAt: ["sm", "md"], children: "Contact Us" }),
74
- /* @__PURE__ */ s("div", { className: e.accountArea, children: /* @__PURE__ */ s(
70
+ /* @__PURE__ */ n(m, { flexDirection: "row", hideAt: ["sm"], className: e.search, children: /* @__PURE__ */ n(g, { onSearch: N, inputName: "cpc-search" }) }),
71
+ /* @__PURE__ */ s("button", { onClick: _, className: t(e.siteLink, x(["sm", "md"])), children: [
72
+ /* @__PURE__ */ n(i, { iconKey: "fa-regular fa-sparkles", size: "sm" }),
73
+ "Model/Serial"
74
+ ] }),
75
+ /* @__PURE__ */ n(c, { href: f, hideAt: ["sm", "md"], children: "Custom Parts" }),
76
+ /* @__PURE__ */ n(c, { href: p, hideAt: ["sm", "md"], children: "Contact Us" }),
77
+ /* @__PURE__ */ n("div", { className: e.accountArea, children: /* @__PURE__ */ n(
75
78
  B,
76
79
  {
77
80
  account: l,
@@ -81,61 +84,61 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
81
84
  isAccountLoading: K
82
85
  }
83
86
  ) }),
84
- /* @__PURE__ */ s(
87
+ /* @__PURE__ */ n(
85
88
  q,
86
89
  {
87
90
  ref: M,
88
- cart: k,
89
- open: y,
91
+ cart: v,
92
+ open: k,
90
93
  onCartClick: w
91
94
  }
92
95
  ),
93
- /* @__PURE__ */ n(H, { hideAt: ["lg"], children: [
94
- /* @__PURE__ */ n("section", { children: [
95
- /* @__PURE__ */ s(h, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
96
- /* @__PURE__ */ n("ul", { className: e.menuList, children: [
97
- /* @__PURE__ */ s("li", { className: e.menuItem, children: /* @__PURE__ */ n(
96
+ /* @__PURE__ */ s(H, { hideAt: ["lg"], children: [
97
+ /* @__PURE__ */ s("section", { children: [
98
+ /* @__PURE__ */ n(h, { size: "md", weight: "semibold", children: "Useful shortcuts" }),
99
+ /* @__PURE__ */ s("ul", { className: e.menuList, children: [
100
+ /* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(
98
101
  "button",
99
102
  {
100
103
  onClick: _,
101
104
  "data-hamburger-close": "true",
102
- className: i(e.siteLink, e.menuItemAction, I(["lg"])),
105
+ className: t(e.siteLink, e.menuItemAction, x(["lg"])),
103
106
  children: [
104
- /* @__PURE__ */ s(t, { iconKey: "fa-regular fa-book", size: "sm", className: e.shortcutIcon }),
107
+ /* @__PURE__ */ n(i, { iconKey: "fa-regular fa-sparkles", size: "sm", className: e.shortcutIcon }),
105
108
  "Model/Serial"
106
109
  ]
107
110
  }
108
111
  ) }),
109
- /* @__PURE__ */ s("li", { className: e.menuItem, children: /* @__PURE__ */ n(c, { href: f, className: i(e.siteLink, e.menuItemAction), children: [
110
- /* @__PURE__ */ s(t, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
112
+ /* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(c, { href: f, className: t(e.siteLink, e.menuItemAction), children: [
113
+ /* @__PURE__ */ n(i, { iconKey: "fa-regular fa-screwdriver-wrench", size: "sm", className: e.shortcutIcon }),
111
114
  "Custom Parts"
112
115
  ] }) }),
113
- /* @__PURE__ */ s("li", { className: e.menuItem, children: /* @__PURE__ */ n(c, { href: p, className: i(e.siteLink, e.menuItemAction), children: [
114
- /* @__PURE__ */ s(t, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
116
+ /* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(c, { href: p, className: t(e.siteLink, e.menuItemAction), children: [
117
+ /* @__PURE__ */ n(i, { iconKey: "fa-regular fa-envelope", size: "sm", className: e.shortcutIcon }),
115
118
  "Contact Us"
116
119
  ] }) }),
117
- /* @__PURE__ */ s("li", { className: e.menuItem, children: /* @__PURE__ */ n(c, { href: A, className: i(e.siteLink, e.menuItemAction), children: [
118
- /* @__PURE__ */ s(t, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
120
+ /* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(c, { href: L, className: t(e.siteLink, e.menuItemAction), children: [
121
+ /* @__PURE__ */ n(i, { iconKey: "fa-solid fa-question", size: "sm", className: e.shortcutIcon }),
119
122
  "FAQ"
120
123
  ] }) }),
121
- /* @__PURE__ */ s("li", { className: e.menuItem, children: /* @__PURE__ */ n(c, { href: v, className: i(e.siteLink, e.menuItemAction), children: [
122
- /* @__PURE__ */ s(t, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
124
+ /* @__PURE__ */ n("li", { className: e.menuItem, children: /* @__PURE__ */ s(c, { href: A, className: t(e.siteLink, e.menuItemAction), children: [
125
+ /* @__PURE__ */ n(i, { iconKey: "fa-regular fa-people-group", size: "sm", className: e.shortcutIcon }),
123
126
  "About Us"
124
127
  ] }) })
125
128
  ] })
126
129
  ] }),
127
- /* @__PURE__ */ n("section", { children: [
128
- /* @__PURE__ */ s(h, { size: "md", weight: "semibold", children: "Shop by category" }),
129
- /* @__PURE__ */ s("ul", { className: e.menuList, children: o && o.map((a) => /* @__PURE__ */ s("li", { className: e.category, children: /* @__PURE__ */ n(
130
+ /* @__PURE__ */ s("section", { children: [
131
+ /* @__PURE__ */ n(h, { size: "md", weight: "semibold", children: "Shop by category" }),
132
+ /* @__PURE__ */ n("ul", { className: e.menuList, children: r && r.map((a) => /* @__PURE__ */ n("li", { className: e.category, children: /* @__PURE__ */ s(
130
133
  u,
131
134
  {
132
135
  href: a.route,
133
136
  className: e.categoryLink,
134
- onClick: () => r == null ? void 0 : r(a),
137
+ onClick: () => o == null ? void 0 : o(a),
135
138
  children: [
136
- /* @__PURE__ */ s(h, { size: "sm", children: a.label }),
137
- /* @__PURE__ */ s(
138
- t,
139
+ /* @__PURE__ */ n(h, { size: "sm", children: a.label }),
140
+ /* @__PURE__ */ n(
141
+ i,
139
142
  {
140
143
  iconKey: "fa-solid fa-chevron-right",
141
144
  title: "Navigate",
@@ -153,13 +156,13 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
153
156
  ]
154
157
  }
155
158
  ),
156
- /* @__PURE__ */ s(m, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ s(g, { onSearch: N, inputName: "cpc-search", className: e.search }) }),
157
- /* @__PURE__ */ s(
159
+ /* @__PURE__ */ n(m, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ n(g, { onSearch: N, inputName: "cpc-search", className: e.search }) }),
160
+ /* @__PURE__ */ n(
158
161
  G,
159
162
  {
160
- categories: o,
163
+ categories: r,
161
164
  isCategoriesLoading: j,
162
- onCategoryClick: r
165
+ onCategoryClick: o
163
166
  }
164
167
  )
165
168
  ] }) });
@@ -167,9 +170,9 @@ import '../../assets/MainNav.css';const P = "_main_1e17g_1", Q = "_column_1e17g_
167
170
  function c({
168
171
  href: d,
169
172
  children: l,
170
- ...o
173
+ ...r
171
174
  }) {
172
- return /* @__PURE__ */ s(u, { href: d, className: e.siteLink, ...o, children: l });
175
+ return /* @__PURE__ */ n(u, { href: d, className: e.siteLink, ...r, children: l });
173
176
  }
174
177
  export {
175
178
  pe as MainNav
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.199",
4
+ "version": "0.0.201",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",