@still-forest/canopy 0.25.1 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Code.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as e } from "./utils.js";
1
+ import { j as e } from "./jsx-runtime.js";
2
2
  import { T as s } from "./Heading.js";
3
3
  const r = ({ children: o, ...t }) => /* @__PURE__ */ e.jsx(s, { className: "inline-block w-fit rounded bg-accent px-2", family: "mono", size: "sm", variant: "accent", ...t, children: o });
4
4
  export {
package/dist/Heading.js CHANGED
@@ -1,6 +1,7 @@
1
- import { j as b, c as p } from "./utils.js";
2
- import h from "react";
3
- const y = h.forwardRef(
1
+ import { j as b } from "./jsx-runtime.js";
2
+ import p from "react";
3
+ import { c as h } from "./index2.js";
4
+ const y = p.forwardRef(
4
5
  ({
5
6
  className: c,
6
7
  as: o,
@@ -13,15 +14,15 @@ const y = h.forwardRef(
13
14
  tracking: r,
14
15
  family: f = "display",
15
16
  asForeground: x = !1,
16
- truncate: u = !1,
17
- numeric: m = !1,
17
+ truncate: m = !1,
18
+ numeric: u = !1,
18
19
  ...i
19
20
  }, a) => {
20
21
  const g = o || "p";
21
22
  return /* @__PURE__ */ b.jsx(
22
23
  g,
23
24
  {
24
- className: p(
25
+ className: h(
25
26
  // Font sizes
26
27
  {
27
28
  "text-xs": e === "xs",
@@ -105,9 +106,9 @@ const y = h.forwardRef(
105
106
  "font-mono": f === "mono"
106
107
  },
107
108
  // Truncation
108
- u && "truncate",
109
+ m && "truncate",
109
110
  // Tabular numerals
110
- m && "tabular-nums",
111
+ u && "tabular-nums",
111
112
  c
112
113
  ),
113
114
  ref: a,
@@ -117,7 +118,7 @@ const y = h.forwardRef(
117
118
  }
118
119
  );
119
120
  y.displayName = "Text";
120
- const j = h.forwardRef(
121
+ const j = p.forwardRef(
121
122
  ({
122
123
  className: c,
123
124
  variant: o = "default",
@@ -131,8 +132,8 @@ const j = h.forwardRef(
131
132
  tracking: r,
132
133
  family: f = "display",
133
134
  asForeground: x = !1,
134
- truncate: u = !1,
135
- numeric: m = !1,
135
+ truncate: m = !1,
136
+ numeric: u = !1,
136
137
  ...i
137
138
  }, a) => {
138
139
  const g = `h${e}`, l = d || {
@@ -146,7 +147,7 @@ const j = h.forwardRef(
146
147
  return /* @__PURE__ */ b.jsx(
147
148
  g,
148
149
  {
149
- className: p(
150
+ className: h(
150
151
  // Size scales
151
152
  {
152
153
  "text-xs": l === "xs",
@@ -230,9 +231,9 @@ const j = h.forwardRef(
230
231
  "font-mono": f === "mono"
231
232
  },
232
233
  // Truncation
233
- u && "truncate",
234
+ m && "truncate",
234
235
  // Tabular numerals
235
- m && "tabular-nums",
236
+ u && "tabular-nums",
236
237
  // Add some scroll margin for better anchor navigation
237
238
  "scroll-m-20",
238
239
  c
package/dist/Layout2.js CHANGED
@@ -1,35 +1,36 @@
1
- import { j as u, c as m } from "./utils.js";
1
+ import { j as u } from "./jsx-runtime.js";
2
2
  import g from "react";
3
+ import { c as m } from "./index2.js";
3
4
  const w = g.forwardRef(
4
5
  ({
5
6
  className: c,
6
7
  as: t = "div",
7
- variant: s,
8
+ variant: n,
8
9
  size: r,
9
10
  width: e,
10
11
  height: o,
11
12
  display: l,
12
- sizing: n,
13
+ sizing: s,
13
14
  position: x,
14
15
  overflow: a,
15
16
  overflowX: b,
16
17
  overflowY: d,
17
18
  rounded: f,
18
- ...v
19
- }, j) => /* @__PURE__ */ u.jsx(
19
+ ...p
20
+ }, v) => /* @__PURE__ */ u.jsx(
20
21
  t,
21
22
  {
22
23
  className: m(
23
24
  // Variant
24
25
  {
25
- "bg-primary text-primary-foreground": s === "primary",
26
- "bg-secondary text-secondary-foreground": s === "secondary",
27
- "bg-muted text-muted-foreground": s === "muted",
28
- "bg-accent text-accent-foreground": s === "accent",
29
- "bg-info text-info-foreground": s === "info",
30
- "bg-success text-success-foreground": s === "success",
31
- "bg-warning text-warning-foreground": s === "warning",
32
- "bg-destructive text-destructive-foreground": s === "destructive"
26
+ "bg-primary text-primary-foreground": n === "primary",
27
+ "bg-secondary text-secondary-foreground": n === "secondary",
28
+ "bg-muted text-muted-foreground": n === "muted",
29
+ "bg-accent text-accent-foreground": n === "accent",
30
+ "bg-info text-info-foreground": n === "info",
31
+ "bg-success text-success-foreground": n === "success",
32
+ "bg-warning text-warning-foreground": n === "warning",
33
+ "bg-destructive text-destructive-foreground": n === "destructive"
33
34
  },
34
35
  // Size
35
36
  {
@@ -188,8 +189,8 @@ const w = g.forwardRef(
188
189
  },
189
190
  // Box sizing
190
191
  {
191
- "box-border": n === "border",
192
- "box-content": n === "content"
192
+ "box-border": s === "border",
193
+ "box-content": s === "content"
193
194
  },
194
195
  // Position
195
196
  {
@@ -238,17 +239,17 @@ const w = g.forwardRef(
238
239
  },
239
240
  c
240
241
  ),
241
- ref: j,
242
- ...v
242
+ ref: v,
243
+ ...p
243
244
  }
244
245
  )
245
246
  );
246
247
  w.displayName = "Box";
247
- const y = ({ children: c, className: t, direction: s = "col", ...r }) => {
248
- const { display: e = "flex", ...o } = r, l = m("w-full max-w-6xl px-4 py-2 md:px-8 md:py-4 lg:px-12 lg:py-6", t);
249
- return e === "block" ? /* @__PURE__ */ u.jsx(w, { className: l, ...o, children: c }) : /* @__PURE__ */ u.jsx(i, { className: l, direction: s, ...o, children: c });
250
- }, N = ({ flex: c, className: t, as: s, children: r, ...e }) => {
251
- const o = s || "div";
248
+ const y = ({ children: c, className: t, direction: n = "col", ...r }) => {
249
+ const { display: e = "flex", ...o } = r, l = m("w-full px-4 py-2 md:px-8 md:py-4 lg:px-12 lg:py-6", t);
250
+ return e === "block" ? /* @__PURE__ */ u.jsx(w, { className: l, ...o, children: c }) : /* @__PURE__ */ u.jsx(i, { className: l, direction: n, ...o, children: c });
251
+ }, j = ({ flex: c, className: t, as: n, children: r, ...e }) => {
252
+ const o = n || "div";
252
253
  return /* @__PURE__ */ u.jsx(
253
254
  o,
254
255
  {
@@ -265,18 +266,18 @@ const y = ({ children: c, className: t, direction: s = "col", ...r }) => {
265
266
  children: r
266
267
  }
267
268
  );
268
- }, k = g.forwardRef(
269
- ({ className: c, as: t = "div", direction: s, align: r, justify: e, grow: o, wrap: l, gap: n, gapX: x, gapY: a, ...b }, d) => /* @__PURE__ */ u.jsx(
269
+ }, N = g.forwardRef(
270
+ ({ className: c, as: t = "div", direction: n, align: r, justify: e, grow: o, wrap: l, gap: s, gapX: x, gapY: a, ...b }, d) => /* @__PURE__ */ u.jsx(
270
271
  t,
271
272
  {
272
273
  className: m(
273
274
  "flex",
274
275
  // Flex direction
275
276
  {
276
- "flex-row": s === "row",
277
- "flex-row-reverse": s === "row-reverse",
278
- "flex-col": s === "col",
279
- "flex-col-reverse": s === "col-reverse"
277
+ "flex-row": n === "row",
278
+ "flex-row-reverse": n === "row-reverse",
279
+ "flex-col": n === "col",
280
+ "flex-col-reverse": n === "col-reverse"
280
281
  },
281
282
  // Align items
282
283
  {
@@ -322,23 +323,23 @@ const y = ({ children: c, className: t, direction: s = "col", ...r }) => {
322
323
  },
323
324
  // Gap
324
325
  {
325
- "gap-0": n === "0",
326
- "gap-1": n === "1",
327
- "gap-2": n === "2",
328
- "gap-3": n === "3",
329
- "gap-4": n === "4",
330
- "gap-5": n === "5",
331
- "gap-6": n === "6",
332
- "gap-7": n === "7",
333
- "gap-8": n === "8",
334
- "gap-9": n === "9",
335
- "gap-10": n === "10",
336
- "gap-11": n === "11",
337
- "gap-12": n === "12",
338
- "gap-13": n === "13",
339
- "gap-14": n === "14",
340
- "gap-15": n === "15",
341
- "gap-16": n === "16"
326
+ "gap-0": s === "0",
327
+ "gap-1": s === "1",
328
+ "gap-2": s === "2",
329
+ "gap-3": s === "3",
330
+ "gap-4": s === "4",
331
+ "gap-5": s === "5",
332
+ "gap-6": s === "6",
333
+ "gap-7": s === "7",
334
+ "gap-8": s === "8",
335
+ "gap-9": s === "9",
336
+ "gap-10": s === "10",
337
+ "gap-11": s === "11",
338
+ "gap-12": s === "12",
339
+ "gap-13": s === "13",
340
+ "gap-14": s === "14",
341
+ "gap-15": s === "15",
342
+ "gap-16": s === "16"
342
343
  },
343
344
  {
344
345
  "gap-x-0": x === "0",
@@ -384,26 +385,26 @@ const y = ({ children: c, className: t, direction: s = "col", ...r }) => {
384
385
  ...b
385
386
  }
386
387
  )
387
- ), i = Object.assign(k, { Item: N }), C = ({ children: c, ...t }) => /* @__PURE__ */ u.jsx(y, { as: "footer", className: "bottom-0 mt-auto pb-2", justify: "between", ...t, children: c }), R = g.forwardRef(
388
- ({ className: c, as: t = "div", cols: s, rows: r, gap: e, gapX: o, gapY: l, flow: n, ...x }, a) => /* @__PURE__ */ u.jsx(
388
+ ), i = Object.assign(N, { Item: j }), k = ({ children: c, className: t, ...n }) => /* @__PURE__ */ u.jsx(y, { as: "footer", className: m("bottom-0 mt-auto pb-2", t), justify: "between", ...n, children: c }), R = g.forwardRef(
389
+ ({ className: c, as: t = "div", cols: n, rows: r, gap: e, gapX: o, gapY: l, flow: s, ...x }, a) => /* @__PURE__ */ u.jsx(
389
390
  t,
390
391
  {
391
392
  className: m(
392
393
  "grid",
393
394
  {
394
- "grid-cols-1": s === "1",
395
- "grid-cols-2": s === "2",
396
- "grid-cols-3": s === "3",
397
- "grid-cols-4": s === "4",
398
- "grid-cols-5": s === "5",
399
- "grid-cols-6": s === "6",
400
- "grid-cols-7": s === "7",
401
- "grid-cols-8": s === "8",
402
- "grid-cols-9": s === "9",
403
- "grid-cols-10": s === "10",
404
- "grid-cols-11": s === "11",
405
- "grid-cols-12": s === "12",
406
- "grid-cols-none": s === "none"
395
+ "grid-cols-1": n === "1",
396
+ "grid-cols-2": n === "2",
397
+ "grid-cols-3": n === "3",
398
+ "grid-cols-4": n === "4",
399
+ "grid-cols-5": n === "5",
400
+ "grid-cols-6": n === "6",
401
+ "grid-cols-7": n === "7",
402
+ "grid-cols-8": n === "8",
403
+ "grid-cols-9": n === "9",
404
+ "grid-cols-10": n === "10",
405
+ "grid-cols-11": n === "11",
406
+ "grid-cols-12": n === "12",
407
+ "grid-cols-none": n === "none"
407
408
  },
408
409
  {
409
410
  "grid-rows-1": r === "1",
@@ -491,11 +492,11 @@ const y = ({ children: c, className: t, direction: s = "col", ...r }) => {
491
492
  "gap-y-16": l === "16"
492
493
  },
493
494
  {
494
- "grid-flow-row": n === "row",
495
- "grid-flow-col": n === "col",
496
- "grid-flow-dense": n === "dense",
497
- "grid-flow-row-dense": n === "row-dense",
498
- "grid-flow-col-dense": n === "col-dense"
495
+ "grid-flow-row": s === "row",
496
+ "grid-flow-col": s === "col",
497
+ "grid-flow-dense": s === "dense",
498
+ "grid-flow-row-dense": s === "row-dense",
499
+ "grid-flow-col-dense": s === "col-dense"
499
500
  },
500
501
  c
501
502
  ),
@@ -505,16 +506,25 @@ const y = ({ children: c, className: t, direction: s = "col", ...r }) => {
505
506
  )
506
507
  );
507
508
  R.displayName = "Grid";
508
- const F = ({ children: c, sticky: t = !1, className: s, ...r }) => /* @__PURE__ */ u.jsx(y, { as: "header", className: m("top-0 ", t && "z-50 sticky", s), justify: "between", ...r, children: c }), p = "mx-auto w-full max-w-screen-lg", B = ({ children: c, className: t, withContainer: s = !1, ...r }) => {
509
- const e = m("flex-1 grow", p, t);
510
- return s ? /* @__PURE__ */ u.jsx(y, { as: "main", className: e, display: "block", ...r, children: c }) : /* @__PURE__ */ u.jsx(i.Item, { as: "main", className: e, ...r, children: c });
511
- }, G = g.forwardRef(({ children: c, className: t, ...s }, r) => /* @__PURE__ */ u.jsx(i, { className: m(p, "h-screen flex-1", t), direction: "col", ref: r, ...s, children: c })), H = Object.assign(G, { Header: F, Body: B, Footer: C });
509
+ const C = ({ children: c, sticky: t = !1, className: n, ...r }) => /* @__PURE__ */ u.jsx(y, { as: "header", className: m("top-0 ", t && "z-50 sticky", n), justify: "between", ...r, children: c }), F = ({ children: c, className: t, withContainer: n = !1, ...r }) => {
510
+ const e = m("flex-1 grow", t);
511
+ return n ? /* @__PURE__ */ u.jsx(y, { as: "main", className: e, display: "block", ...r, children: c }) : /* @__PURE__ */ u.jsx(i.Item, { as: "main", className: e, ...r, children: c });
512
+ }, B = g.forwardRef(({ children: c, className: t, ...n }, r) => /* @__PURE__ */ u.jsx(
513
+ i,
514
+ {
515
+ className: m("mx-auto w-full max-w-screen-xl h-screen flex-1", t),
516
+ direction: "col",
517
+ ref: r,
518
+ ...n,
519
+ children: c
520
+ }
521
+ )), H = Object.assign(B, { Header: C, Body: F, Footer: k });
512
522
  export {
513
523
  w as B,
514
524
  y as C,
515
525
  i as F,
516
526
  R as G,
517
- F as H,
527
+ C as H,
518
528
  H as L,
519
- C as a
529
+ k as a
520
530
  };
@@ -1,9 +1,10 @@
1
- import { j as e, c as d } from "./utils.js";
1
+ import { j as e } from "./jsx-runtime.js";
2
2
  import { c, B as l } from "./calendar.js";
3
3
  import "react";
4
- import { F as o, B as m } from "./Layout2.js";
5
- import { C as h } from "./Code.js";
6
- import { H as x } from "./Heading.js";
4
+ import { F as o, B as d } from "./Layout2.js";
5
+ import { C as m } from "./Code.js";
6
+ import { H as h } from "./Heading.js";
7
+ import { c as x } from "./index2.js";
7
8
  /**
8
9
  * @license lucide-react v0.525.0 - ISC
9
10
  *
@@ -21,11 +22,11 @@ const u = [
21
22
  * This source code is licensed under the ISC license.
22
23
  * See the LICENSE file in the root directory of this source tree.
23
24
  */
24
- const j = [
25
+ const f = [
25
26
  ["path", { d: "M12 17h.01", key: "p32p05" }],
26
27
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z", key: "1mlx9k" }],
27
28
  ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
28
- ], f = c("file-question-mark", j);
29
+ ], j = c("file-question-mark", f);
29
30
  /**
30
31
  * @license lucide-react v0.525.0 - ISC
31
32
  *
@@ -68,7 +69,7 @@ const N = [
68
69
  {
69
70
  "aria-hidden": !!r,
70
71
  "aria-label": r ? void 0 : `${n || "info"} icon`,
71
- className: d(
72
+ className: x(
72
73
  n === "error" && "text-destructive",
73
74
  n === "success" && "text-success",
74
75
  n === "warning" && "text-warning",
@@ -80,7 +81,7 @@ const N = [
80
81
  }
81
82
  ) }),
82
83
  /* @__PURE__ */ e.jsxs(o, { className: "max-w-[500px]", direction: "col", justify: "center", children: [
83
- r ? /* @__PURE__ */ e.jsx(x, { align: "center", level: "4", weight: "normal", children: r }) : null,
84
+ r ? /* @__PURE__ */ e.jsx(h, { align: "center", level: "4", weight: "normal", children: r }) : null,
84
85
  i
85
86
  ] })
86
87
  ] }) });
@@ -90,17 +91,17 @@ const N = [
90
91
  } catch {
91
92
  console.warn("Page reload prevented in test environment");
92
93
  }
93
- }, B = ({ error: n, onRetry: t = _ }) => /* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsxs(o, { align: "center", className: "mt-8", direction: "col", children: [
94
- /* @__PURE__ */ e.jsx(m, { className: "mb-8 p-4", variant: "muted", width: "full", children: /* @__PURE__ */ e.jsx(h, { align: "center", size: "xs", variant: "inherit", children: n.message || "Unknown error occurred" }) }),
94
+ }, E = ({ error: n, onRetry: t = _ }) => /* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsxs(o, { align: "center", className: "mt-8", direction: "col", children: [
95
+ /* @__PURE__ */ e.jsx(d, { className: "mb-8 p-4", variant: "muted", width: "full", children: /* @__PURE__ */ e.jsx(m, { align: "center", size: "xs", variant: "inherit", children: n.message || "Unknown error occurred" }) }),
95
96
  /* @__PURE__ */ e.jsx(l, { icon: /* @__PURE__ */ e.jsx(v, {}), onClick: t, variant: "primary", children: "Reload" })
96
- ] }) }), M = () => /* @__PURE__ */ e.jsx(g, { className: "animate-spin text-info", "data-testid": "icon", size: 64 }), E = ({ iconComponent: n, message: t }) => {
97
+ ] }) }), M = () => /* @__PURE__ */ e.jsx(g, { className: "animate-spin text-info", "data-testid": "icon", size: 64 }), L = ({ iconComponent: n, message: t }) => {
97
98
  const r = n || M;
98
99
  return /* @__PURE__ */ e.jsx(a, { iconComponent: r, message: t });
99
- }, L = ({ goHome: n, message: t = "404: Not found" }) => /* @__PURE__ */ e.jsx(a, { iconComponent: f, message: t, variant: "warning", children: /* @__PURE__ */ e.jsx(o, { align: "center", className: "mt-8", direction: "col", children: n && /* @__PURE__ */ e.jsx(l, { icon: /* @__PURE__ */ e.jsx(k, {}), onClick: n, variant: "primary", children: "Home" }) }) });
100
+ }, P = ({ goHome: n, message: t = "404: Not found" }) => /* @__PURE__ */ e.jsx(a, { iconComponent: j, message: t, variant: "warning", children: /* @__PURE__ */ e.jsx(o, { align: "center", className: "mt-8", direction: "col", children: n && /* @__PURE__ */ e.jsx(l, { icon: /* @__PURE__ */ e.jsx(k, {}), onClick: n, variant: "primary", children: "Home" }) }) });
100
101
  export {
101
- B as E,
102
+ E,
102
103
  a as I,
103
- E as P,
104
+ L as P,
104
105
  C as a,
105
- L as b
106
+ P as b
106
107
  };
package/dist/Paragraph.js CHANGED
@@ -1,6 +1,7 @@
1
- import { j as m, c as o } from "./utils.js";
1
+ import { j as o } from "./jsx-runtime.js";
2
+ import { c as t } from "./index2.js";
2
3
  import { T as p } from "./Heading.js";
3
- const c = ({ children: r, className: s, as: a = "p", ...t }) => /* @__PURE__ */ m.jsx(p, { as: a, className: o("mb-4", s), ...t, children: r });
4
+ const i = ({ children: r, className: s, as: a = "p", ...m }) => /* @__PURE__ */ o.jsx(p, { as: a, className: t("mb-4", s), ...m, children: r });
4
5
  export {
5
- c as P
6
+ i as P
6
7
  };