@particle-academy/react-fancy 5.62.0 → 5.64.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 (42) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +1 -0
  3. package/dist/{chunk-35MF32VQ.js → chunk-2HPADT4X.js} +3 -3
  4. package/dist/chunk-2HPADT4X.js.map +1 -0
  5. package/dist/{chunk-QWNZZPFL.cjs → chunk-ATIDUWY6.cjs} +14 -4
  6. package/dist/chunk-ATIDUWY6.cjs.map +1 -0
  7. package/dist/{chunk-EVIHLWPG.js → chunk-CAUEKGMR.js} +14 -4
  8. package/dist/chunk-CAUEKGMR.js.map +1 -0
  9. package/dist/chunk-DTOIO42M.js +605 -0
  10. package/dist/chunk-DTOIO42M.js.map +1 -0
  11. package/dist/chunk-QP6VNKLW.cjs +608 -0
  12. package/dist/chunk-QP6VNKLW.cjs.map +1 -0
  13. package/dist/{chunk-IEQK3LGI.cjs → chunk-S4FXY3B4.cjs} +3 -3
  14. package/dist/chunk-S4FXY3B4.cjs.map +1 -0
  15. package/dist/editor.cjs +3 -3
  16. package/dist/editor.d.cts +11 -1
  17. package/dist/editor.d.ts +11 -1
  18. package/dist/editor.js +1 -1
  19. package/dist/index.cjs +33 -24
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +1 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.js +7 -6
  24. package/dist/index.js.map +1 -1
  25. package/dist/inputs.cjs +10 -10
  26. package/dist/inputs.js +2 -2
  27. package/dist/kanban.cjs +3 -3
  28. package/dist/kanban.js +1 -1
  29. package/dist/reorderable-grid.cjs +20 -0
  30. package/dist/reorderable-grid.cjs.map +1 -0
  31. package/dist/reorderable-grid.d.cts +141 -0
  32. package/dist/reorderable-grid.d.ts +141 -0
  33. package/dist/reorderable-grid.js +7 -0
  34. package/dist/reorderable-grid.js.map +1 -0
  35. package/docs/Editor.md +18 -0
  36. package/docs/Kanban.md +4 -2
  37. package/docs/ReorderableGrid.md +231 -0
  38. package/package.json +11 -1
  39. package/dist/chunk-35MF32VQ.js.map +0 -1
  40. package/dist/chunk-EVIHLWPG.js.map +0 -1
  41. package/dist/chunk-IEQK3LGI.cjs.map +0 -1
  42. package/dist/chunk-QWNZZPFL.cjs.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme-tokens.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCO,IAAM,YAAA,GAAe;AAAA,EAC1B,OAAA,EAAS;AAAA,IACP,QAAA,EAAU,iBAAA;AAAA,IACV,YAAA,EAAc,sBAAA;AAAA,IACd,KAAA,EAAO,oBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA,GACf;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,QAAA,EAAU,uBAAA;AAAA,IACV,YAAA,EAAc,4BAAA;AAAA,IACd,KAAA,EAAO,uBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA,GACf;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,QAAA,EAAU,gBAAA;AAAA,IACV,YAAA,EAAc,qBAAA;AAAA,IACd,KAAA,EAAO,uBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA,GACf;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,QAAA,EAAU,uBAAA;AAAA,IACV,YAAA,EAAc,4BAAA;AAAA,IACd,KAAA,EAAO,uBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA,GACf;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,eAAA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AA,EAAU,eAAA;AAAA,IACV,YAAA,EAAc,oBAAA;AAAA,IACd,KAAA,EAAO,uBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA;AAEjB","file":"index.js","sourcesContent":["/**\n * Semantic theme tokens — the small set of colours the kit's DOM components\n * read, so a host can repaint the whole kit with its own palette WITHOUT\n * remapping Tailwind's `zinc` or `violet`.\n *\n * Each role is two CSS custom properties, one per mode:\n *\n * --fancy-surface the light value\n * --fancy-surface-dark the dark value\n *\n * Components read them through their var() FALLBACK, which is the colour the\n * component used before these existed:\n *\n * bg-[color:var(--fancy-surface,var(--color-white))]\n * dark:bg-[color:var(--fancy-surface-dark,var(--color-zinc-900))]\n *\n * So:\n * - **Set nothing and nothing changes.** An unset custom property resolves to\n * its fallback, which is the exact declaration the old `bg-white` produced.\n * - **Set one and every surface follows**, wherever the variable is in scope:\n * `:root`, `body`, or any wrapper element. No selector to match, no layer or\n * specificity to win — a custom property is inherited, not cascaded against.\n * - **Both modes are stated, not derived.** The dark value is a separate\n * variable rather than a flip under `.dark`, so which one applies is decided\n * by the host's own `dark:` variant — the same switch that drives every\n * other `dark:` utility in the kit. (See `dark-variant.css` for a variant\n * that follows `[data-theme=\"dark\"]` as well as `.dark`.)\n *\n * NOT covered, deliberately: colours that ENCODE DATA — chart series,\n * file-type marks, mood and confidence scales, event kinds. Repainting those\n * with a host's neutral palette would erase what they mean. A component's\n * explicit `color` prop (Badge, Button, Callout …) is also untouched: that is\n * the host choosing a hue, not the kit choosing one for it.\n *\n * `light` / `dark` are the defaults exactly as components write them in their\n * fallbacks. `tests/theme-tokens.test.tsx` fails if a component's fallback\n * disagrees with this table, so the table is the contract rather than a\n * description of it.\n */\nexport const THEME_TOKENS = {\n surface: {\n variable: \"--fancy-surface\",\n darkVariable: \"--fancy-surface-dark\",\n light: \"var(--color-white)\",\n dark: \"var(--color-zinc-900)\",\n description: \"Panels, cards, overlays (menus, modals, popovers, toasts), sidebars and navbars.\",\n },\n \"surface-muted\": {\n variable: \"--fancy-surface-muted\",\n darkVariable: \"--fancy-surface-muted-dark\",\n light: \"var(--color-zinc-100)\",\n dark: \"var(--color-zinc-800)\",\n description: \"Hovered and selected rows, chips, inset wells, toolbar buttons.\",\n },\n border: {\n variable: \"--fancy-border\",\n darkVariable: \"--fancy-border-dark\",\n light: \"var(--color-zinc-200)\",\n dark: \"var(--color-zinc-700)\",\n description: \"Outlines, dividers, separators and tracks (skeletons, progress, sliders).\",\n },\n \"border-strong\": {\n variable: \"--fancy-border-strong\",\n darkVariable: \"--fancy-border-strong-dark\",\n light: \"var(--color-zinc-300)\",\n dark: \"var(--color-zinc-700)\",\n description: \"The firmer outline on form controls (inputs, checkboxes, radios) and keycaps.\",\n },\n input: {\n variable: \"--fancy-input\",\n darkVariable: \"--fancy-input-dark\",\n light: \"var(--color-white)\",\n dark: \"#1e1e24\",\n description: \"The field surface of text inputs, checkboxes, radios, OTP cells and pickers.\",\n },\n text: {\n variable: \"--fancy-text\",\n darkVariable: \"--fancy-text-dark\",\n light: \"var(--color-zinc-900)\",\n dark: \"var(--color-zinc-100)\",\n description: \"Strongest foreground: headings, values, field text, active items.\",\n },\n \"text-soft\": {\n variable: \"--fancy-text-soft\",\n darkVariable: \"--fancy-text-soft-dark\",\n light: \"var(--color-zinc-700)\",\n dark: \"var(--color-zinc-300)\",\n description: \"Body copy and menu items: readable, one step back from text.\",\n },\n \"text-muted\": {\n variable: \"--fancy-text-muted\",\n darkVariable: \"--fancy-text-muted-dark\",\n light: \"var(--color-zinc-500)\",\n dark: \"var(--color-zinc-400)\",\n description: \"Descriptions, captions, secondary labels, axis labels.\",\n },\n \"text-faint\": {\n variable: \"--fancy-text-faint\",\n darkVariable: \"--fancy-text-faint-dark\",\n light: \"var(--color-zinc-400)\",\n dark: \"var(--color-zinc-500)\",\n description: \"Placeholders, disabled hints, decorative icons.\",\n },\n \"text-subtle\": {\n variable: \"--fancy-text-subtle\",\n darkVariable: \"--fancy-text-subtle-dark\",\n light: \"var(--color-zinc-600)\",\n dark: \"var(--color-zinc-400)\",\n description: \"Inactive nav labels (Sidebar, Menu, Navbar, MultiSwitch) and secondary prose. Added 5.53.1.\",\n },\n \"surface-hover\": {\n variable: \"--fancy-surface-hover\",\n darkVariable: \"--fancy-surface-hover-dark\",\n light: \"var(--color-zinc-50)\",\n // Tailwind's `bg-zinc-800/50`, written out so a host's value is used as-is.\n dark: \"color-mix(in oklab, var(--color-zinc-800) 50%, transparent)\",\n description: \"The hover fill on nav items, list options and table rows. Added 5.53.1.\",\n },\n focus: {\n variable: \"--fancy-focus\",\n darkVariable: \"--fancy-focus-dark\",\n light: \"var(--color-blue-500)\",\n dark: \"var(--color-blue-400)\",\n description: \"The focus border and ring on form controls.\",\n },\n} as const;\n\nexport type ThemeTokenRole = keyof typeof THEME_TOKENS;\n"]}
1
+ {"version":3,"sources":["../src/theme-tokens.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCO,IAAM,YAAA,GAAe;AAAA,EAC1B,OAAA,EAAS;AAAA,IACP,QAAA,EAAU,iBAAA;AAAA,IACV,YAAA,EAAc,sBAAA;AAAA,IACd,KAAA,EAAO,oBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA,GACf;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,QAAA,EAAU,uBAAA;AAAA,IACV,YAAA,EAAc,4BAAA;AAAA,IACd,KAAA,EAAO,uBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA,GACf;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,QAAA,EAAU,gBAAA;AAAA,IACV,YAAA,EAAc,qBAAA;AAAA,IACd,KAAA,EAAO,uBAAA;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uBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA,GACf;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,QAAA,EAAU,uBAAA;AAAA,IACV,YAAA,EAAc,4BAAA;AAAA,IACd,KAAA,EAAO,sBAAA;AAAA;AAAA,IAEP,IAAA,EAAM,6DAAA;AAAA,IACN,WAAA,EAAa;AAAA,GACf;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,eAAA;AAAA,IACV,YAAA,EAAc,oBAAA;AAAA,IACd,KAAA,EAAO,uBAAA;AAAA,IACP,IAAA,EAAM,uBAAA;AAAA,IACN,WAAA,EAAa;AAAA;AAEjB","file":"index.js","sourcesContent":["/**\n * Semantic theme tokens — the small set of colours the kit's DOM components\n * read, so a host can repaint the whole kit with its own palette WITHOUT\n * remapping Tailwind's `zinc` or `violet`.\n *\n * Each role is two CSS custom properties, one per mode:\n *\n * --fancy-surface the light value\n * --fancy-surface-dark the dark value\n *\n * Components read them through their var() FALLBACK, which is the colour the\n * component used before these existed:\n *\n * bg-[color:var(--fancy-surface,var(--color-white))]\n * dark:bg-[color:var(--fancy-surface-dark,var(--color-zinc-900))]\n *\n * So:\n * - **Set nothing and nothing changes.** An unset custom property resolves to\n * its fallback, which is the exact declaration the old `bg-white` produced.\n * - **Set one and every surface follows**, wherever the variable is in scope:\n * `:root`, `body`, or any wrapper element. No selector to match, no layer or\n * specificity to win — a custom property is inherited, not cascaded against.\n * - **Both modes are stated, not derived.** The dark value is a separate\n * variable rather than a flip under `.dark`, so which one applies is decided\n * by the host's own `dark:` variant — the same switch that drives every\n * other `dark:` utility in the kit. (See `dark-variant.css` for a variant\n * that follows `[data-theme=\"dark\"]` as well as `.dark`.)\n *\n * NOT covered, deliberately: colours that ENCODE DATA — chart series,\n * file-type marks, mood and confidence scales, event kinds. Repainting those\n * with a host's neutral palette would erase what they mean. A component's\n * explicit `color` prop (Badge, Button, Callout …) is also untouched: that is\n * the host choosing a hue, not the kit choosing one for it.\n *\n * `light` / `dark` are the defaults exactly as components write them in their\n * fallbacks. `tests/theme-tokens.test.tsx` fails if a component's fallback\n * disagrees with this table, so the table is the contract rather than a\n * description of it.\n */\nexport const THEME_TOKENS = {\n surface: {\n variable: \"--fancy-surface\",\n darkVariable: \"--fancy-surface-dark\",\n light: \"var(--color-white)\",\n dark: \"var(--color-zinc-900)\",\n description: \"Panels, cards, overlays (menus, modals, popovers, toasts), sidebars and navbars.\",\n },\n \"surface-muted\": {\n variable: \"--fancy-surface-muted\",\n darkVariable: \"--fancy-surface-muted-dark\",\n light: \"var(--color-zinc-100)\",\n dark: \"var(--color-zinc-800)\",\n description: \"Hovered and selected rows, chips, inset wells, toolbar buttons.\",\n },\n border: {\n variable: \"--fancy-border\",\n darkVariable: \"--fancy-border-dark\",\n light: \"var(--color-zinc-200)\",\n dark: \"var(--color-zinc-700)\",\n description: \"Outlines, dividers, separators and tracks (skeletons, progress, sliders).\",\n },\n \"border-strong\": {\n variable: \"--fancy-border-strong\",\n darkVariable: \"--fancy-border-strong-dark\",\n light: \"var(--color-zinc-300)\",\n dark: \"var(--color-zinc-700)\",\n description: \"The firmer outline on form controls (inputs, checkboxes, radios) and keycaps.\",\n },\n input: {\n variable: \"--fancy-input\",\n darkVariable: \"--fancy-input-dark\",\n light: \"var(--color-white)\",\n dark: \"#1e1e24\",\n description: \"The field surface of text inputs, checkboxes, radios, OTP cells and pickers.\",\n },\n text: {\n variable: \"--fancy-text\",\n darkVariable: \"--fancy-text-dark\",\n light: \"var(--color-zinc-900)\",\n dark: \"var(--color-zinc-100)\",\n description: \"Strongest foreground: headings, values, field text, active items.\",\n },\n \"text-soft\": {\n variable: \"--fancy-text-soft\",\n darkVariable: \"--fancy-text-soft-dark\",\n light: \"var(--color-zinc-700)\",\n dark: \"var(--color-zinc-300)\",\n description: \"Body copy and menu items: readable, one step back from text.\",\n },\n \"text-muted\": {\n variable: \"--fancy-text-muted\",\n darkVariable: \"--fancy-text-muted-dark\",\n light: \"var(--color-zinc-500)\",\n dark: \"var(--color-zinc-400)\",\n description: \"Descriptions, captions, secondary labels, axis labels.\",\n },\n \"text-faint\": {\n variable: \"--fancy-text-faint\",\n darkVariable: \"--fancy-text-faint-dark\",\n light: \"var(--color-zinc-400)\",\n dark: \"var(--color-zinc-500)\",\n description: \"Placeholders, disabled hints, decorative icons.\",\n },\n \"text-subtle\": {\n variable: \"--fancy-text-subtle\",\n darkVariable: \"--fancy-text-subtle-dark\",\n light: \"var(--color-zinc-600)\",\n dark: \"var(--color-zinc-400)\",\n description: \"Inactive nav labels (Sidebar, Menu, Navbar, MultiSwitch) and secondary prose. Added 5.53.1.\",\n },\n \"surface-hover\": {\n variable: \"--fancy-surface-hover\",\n darkVariable: \"--fancy-surface-hover-dark\",\n light: \"var(--color-zinc-50)\",\n // Tailwind's `bg-zinc-800/50`, written out so a host's value is used as-is.\n dark: \"color-mix(in oklab, var(--color-zinc-800) 50%, transparent)\",\n description: \"The hover fill on nav items, list options and table rows. Added 5.53.1.\",\n },\n focus: {\n variable: \"--fancy-focus\",\n darkVariable: \"--fancy-focus-dark\",\n light: \"var(--color-blue-500)\",\n dark: \"var(--color-blue-400)\",\n description: \"The focus border and ring on form controls.\",\n },\n} as const;\n\nexport type ThemeTokenRole = keyof typeof THEME_TOKENS;\n"]}
package/dist/inputs.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  require('./chunk-O5IO7TCO.cjs');
4
+ var chunkZ4UXLQSK_cjs = require('./chunk-Z4UXLQSK.cjs');
4
5
  require('./chunk-OYZDSMNP.cjs');
5
6
  require('./chunk-5FV6GMFP.cjs');
6
7
  var chunk6MDZQIMZ_cjs = require('./chunk-6MDZQIMZ.cjs');
8
+ var chunkETNQ4AEQ_cjs = require('./chunk-ETNQ4AEQ.cjs');
7
9
  var chunkDJB3N4G3_cjs = require('./chunk-DJB3N4G3.cjs');
8
10
  require('./chunk-URTLYNZI.cjs');
9
11
  require('./chunk-QGPMVFZJ.cjs');
10
12
  var chunkIB673TEG_cjs = require('./chunk-IB673TEG.cjs');
11
13
  var chunkH7ELUIF6_cjs = require('./chunk-H7ELUIF6.cjs');
12
14
  require('./chunk-HXLSEBAL.cjs');
13
- var chunkZ4UXLQSK_cjs = require('./chunk-Z4UXLQSK.cjs');
14
- var chunkETNQ4AEQ_cjs = require('./chunk-ETNQ4AEQ.cjs');
15
15
  require('./chunk-I27K6NLX.cjs');
16
16
  var chunk2O5UXH5R_cjs = require('./chunk-2O5UXH5R.cjs');
17
17
  var chunkTLRFXSPA_cjs = require('./chunk-TLRFXSPA.cjs');
@@ -36,6 +36,10 @@ require('./chunk-ZU5Q77OT.cjs');
36
36
 
37
37
 
38
38
 
39
+ Object.defineProperty(exports, "Slider", {
40
+ enumerable: true,
41
+ get: function () { return chunkZ4UXLQSK_cjs.Slider; }
42
+ });
39
43
  Object.defineProperty(exports, "Form", {
40
44
  enumerable: true,
41
45
  get: function () { return chunk6MDZQIMZ_cjs.Form; }
@@ -44,6 +48,10 @@ Object.defineProperty(exports, "FormProvider", {
44
48
  enumerable: true,
45
49
  get: function () { return chunk6MDZQIMZ_cjs.FormProvider; }
46
50
  });
51
+ Object.defineProperty(exports, "Checkbox", {
52
+ enumerable: true,
53
+ get: function () { return chunkETNQ4AEQ_cjs.Checkbox; }
54
+ });
47
55
  Object.defineProperty(exports, "CheckboxGroup", {
48
56
  enumerable: true,
49
57
  get: function () { return chunkDJB3N4G3_cjs.CheckboxGroup; }
@@ -56,14 +64,6 @@ Object.defineProperty(exports, "RadioGroup", {
56
64
  enumerable: true,
57
65
  get: function () { return chunkH7ELUIF6_cjs.RadioGroup; }
58
66
  });
59
- Object.defineProperty(exports, "Slider", {
60
- enumerable: true,
61
- get: function () { return chunkZ4UXLQSK_cjs.Slider; }
62
- });
63
- Object.defineProperty(exports, "Checkbox", {
64
- enumerable: true,
65
- get: function () { return chunkETNQ4AEQ_cjs.Checkbox; }
66
- });
67
67
  Object.defineProperty(exports, "Switch", {
68
68
  enumerable: true,
69
69
  get: function () { return chunk2O5UXH5R_cjs.Switch; }
package/dist/inputs.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import './chunk-VXHFR5MV.js';
2
+ export { Slider } from './chunk-NVXTHTJI.js';
2
3
  import './chunk-NW3GJWJ7.js';
3
4
  import './chunk-ORCXPDDG.js';
4
5
  export { Form, FormProvider } from './chunk-PQWQ5K6J.js';
6
+ export { Checkbox } from './chunk-OTM7RL2L.js';
5
7
  export { CheckboxGroup } from './chunk-TAYJSIOP.js';
6
8
  import './chunk-V4EARA4F.js';
7
9
  import './chunk-SHDSKHCC.js';
8
10
  export { MultiSwitch } from './chunk-YUNOVQQJ.js';
9
11
  export { RadioGroup } from './chunk-4FH2JHUY.js';
10
12
  import './chunk-GNHQVPZP.js';
11
- export { Slider } from './chunk-NVXTHTJI.js';
12
- export { Checkbox } from './chunk-OTM7RL2L.js';
13
13
  import './chunk-SV5BW3IA.js';
14
14
  export { Switch } from './chunk-DXZCKDYS.js';
15
15
  export { DatePicker } from './chunk-2UTN3EFK.js';
package/dist/kanban.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkIEQK3LGI_cjs = require('./chunk-IEQK3LGI.cjs');
3
+ var chunkS4FXY3B4_cjs = require('./chunk-S4FXY3B4.cjs');
4
4
  require('./chunk-ZU5Q77OT.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Kanban", {
9
9
  enumerable: true,
10
- get: function () { return chunkIEQK3LGI_cjs.Kanban; }
10
+ get: function () { return chunkS4FXY3B4_cjs.Kanban; }
11
11
  });
12
12
  Object.defineProperty(exports, "useKanban", {
13
13
  enumerable: true,
14
- get: function () { return chunkIEQK3LGI_cjs.useKanban; }
14
+ get: function () { return chunkS4FXY3B4_cjs.useKanban; }
15
15
  });
16
16
  //# sourceMappingURL=kanban.cjs.map
17
17
  //# sourceMappingURL=kanban.cjs.map
package/dist/kanban.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Kanban, useKanban } from './chunk-35MF32VQ.js';
1
+ export { Kanban, useKanban } from './chunk-2HPADT4X.js';
2
2
  import './chunk-MMW2JGKZ.js';
3
3
  //# sourceMappingURL=kanban.js.map
4
4
  //# sourceMappingURL=kanban.js.map
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var chunkQP6VNKLW_cjs = require('./chunk-QP6VNKLW.cjs');
4
+ require('./chunk-I27K6NLX.cjs');
5
+ require('./chunk-OUYC6EIL.cjs');
6
+ require('./chunk-SNHU2AI4.cjs');
7
+ require('./chunk-ZU5Q77OT.cjs');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "ReorderableGrid", {
12
+ enumerable: true,
13
+ get: function () { return chunkQP6VNKLW_cjs.ReorderableGrid; }
14
+ });
15
+ Object.defineProperty(exports, "moveItem", {
16
+ enumerable: true,
17
+ get: function () { return chunkQP6VNKLW_cjs.moveItem; }
18
+ });
19
+ //# sourceMappingURL=reorderable-grid.cjs.map
20
+ //# sourceMappingURL=reorderable-grid.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"reorderable-grid.cjs"}
@@ -0,0 +1,141 @@
1
+ import { HTMLAttributes, ReactNode, Ref, ReactElement } from 'react';
2
+
3
+ /** The least an item needs. Anything else on it is yours, and reaches `renderItem` untouched. */
4
+ interface ReorderableGridItem {
5
+ /** Stable id. The order is reported as these. */
6
+ id: string;
7
+ /**
8
+ * Pinned: this cell keeps its slot. It cannot be picked up or dragged, and
9
+ * nothing can be dropped onto it; other cells flow around it.
10
+ */
11
+ locked?: boolean;
12
+ }
13
+ /** What `renderItem` gets alongside the item. */
14
+ interface ReorderableGridItemState {
15
+ /** 0-based index in the order currently shown (the live preview while dragging). */
16
+ index: number;
17
+ /** 1-based position. */
18
+ position: number;
19
+ /** 1-based row. */
20
+ row: number;
21
+ /** 1-based column. */
22
+ column: number;
23
+ total: number;
24
+ /** Being dragged with a pointer. */
25
+ dragging: boolean;
26
+ /** Picked up with the keyboard. */
27
+ pickedUp: boolean;
28
+ /** This cell's slot is where the active item will land. */
29
+ dropTarget: boolean;
30
+ locked: boolean;
31
+ disabled: boolean;
32
+ /**
33
+ * Spread on an element to make it the drag handle. Once a cell contains a
34
+ * handle, only the handle starts a pointer drag; without one, the whole cell
35
+ * does. The keyboard always works on the cell itself.
36
+ */
37
+ handleProps: {
38
+ "data-reorderable-handle": "";
39
+ };
40
+ }
41
+ /** Facts every announcement can use. Positions are 1-based. */
42
+ interface ReorderableGridAnnouncementContext {
43
+ id: string;
44
+ /** From `getItemLabel`, else `item.label` when it is a string, else the id. */
45
+ label: string;
46
+ position: number;
47
+ total: number;
48
+ row: number;
49
+ column: number;
50
+ }
51
+ /** Every string the grid speaks or shows to assistive tech. Override any of them (i18n). */
52
+ interface ReorderableGridLabels {
53
+ /** Read with each cell (`aria-describedby`). */
54
+ instructions: string;
55
+ /** `aria-roledescription` of each cell. */
56
+ roleDescription: string;
57
+ pickedUp: (ctx: ReorderableGridAnnouncementContext) => string;
58
+ moved: (ctx: ReorderableGridAnnouncementContext) => string;
59
+ dropped: (ctx: ReorderableGridAnnouncementContext) => string;
60
+ /** `ctx` is the restored (original) position. */
61
+ cancelled: (ctx: ReorderableGridAnnouncementContext) => string;
62
+ locked: (ctx: ReorderableGridAnnouncementContext) => string;
63
+ }
64
+ interface ReorderableGridProps<T extends ReorderableGridItem> extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> {
65
+ /** The cells' data. Each needs a unique `id`. */
66
+ items: T[];
67
+ /**
68
+ * Controlled order, as ids. Ids that are not in `items` are ignored, and
69
+ * items missing from it follow in `items` order, so a stale or partial order
70
+ * never drops a cell.
71
+ */
72
+ value?: string[];
73
+ /** Uncontrolled starting order. Omit both to start in `items` order. */
74
+ defaultValue?: string[];
75
+ /**
76
+ * The full new order, once per committed move: a pointer release or a
77
+ * keyboard drop that changed something. Never on a cancel, never on a
78
+ * no-op drop, never during the live preview.
79
+ */
80
+ onReorder?: (ids: string[]) => void;
81
+ /** Renders a cell's content. Default: the item's label. */
82
+ renderItem?: (item: T, state: ReorderableGridItemState) => ReactNode;
83
+ /** Columns, 1 to 12. Placement is row-major. Default `2`. */
84
+ columns?: number;
85
+ /** Gutter. Default `sm`. */
86
+ gap?: "none" | "sm" | "md" | "lg";
87
+ /** No reordering at all, and no tab stops. */
88
+ disabled?: boolean;
89
+ /** Accessible name of the grid. */
90
+ label?: string;
91
+ /** The name an item is announced by. */
92
+ getItemLabel?: (item: T) => string;
93
+ /** Overrides for any announcement or label. */
94
+ labels?: Partial<ReorderableGridLabels>;
95
+ /** Skip the cell's default visuals (border, surface, padding). Behaviour stays. */
96
+ unstyled?: boolean;
97
+ /** Extra classes on every cell. */
98
+ cellClassName?: string;
99
+ }
100
+
101
+ /**
102
+ * A grid of cells reordered in place, row-major, by pointer or keyboard.
103
+ *
104
+ * Built for field-order designers: the grid looks like the grid it designs.
105
+ * Order is a list of ids (`value` / `defaultValue` / `onReorder`); the pure
106
+ * `moveItem(ids, from, to, { locked })` is the same rule without a DOM, for
107
+ * agents.
108
+ */
109
+ declare const ReorderableGrid: (<T extends ReorderableGridItem>(props: ReorderableGridProps<T> & {
110
+ ref?: Ref<HTMLDivElement>;
111
+ }) => ReactElement) & {
112
+ displayName?: string;
113
+ };
114
+
115
+ interface MoveItemOptions<T> {
116
+ /**
117
+ * Pinned entries. A locked entry keeps its absolute index: it cannot be
118
+ * moved, nothing can be dropped onto its slot, and the other entries flow
119
+ * around it. Either the locked ids themselves or a predicate.
120
+ */
121
+ locked?: Iterable<T> | ((id: T) => boolean);
122
+ }
123
+ /**
124
+ * Move the entry at `fromIndex` so that it ends up at `toIndex`, row-major,
125
+ * and return a NEW array. The input is never mutated.
126
+ *
127
+ * This is the whole reorder rule of `ReorderableGrid`, with no DOM: the grid's
128
+ * pointer drags and arrow keys both go through it, and an agent bridge can call
129
+ * it directly to reorder from a tool call.
130
+ *
131
+ * - `toIndex` is the entry's index in the RESULT, so `moveItem(ids, 0, ids.length - 1)`
132
+ * moves the first entry to the end.
133
+ * - An index outside the list (or not an integer) throws `RangeError`. That is
134
+ * a caller bug, and a silent no-op would hide it.
135
+ * - With `locked`: a locked entry keeps its absolute index and the move happens
136
+ * among the free slots only. Moving a locked entry, or onto a locked slot,
137
+ * returns the order unchanged: that is the rule doing its job, not an error.
138
+ */
139
+ declare function moveItem<T>(ids: readonly T[], fromIndex: number, toIndex: number, options?: MoveItemOptions<T>): T[];
140
+
141
+ export { type MoveItemOptions, ReorderableGrid, type ReorderableGridAnnouncementContext, type ReorderableGridItem, type ReorderableGridItemState, type ReorderableGridLabels, type ReorderableGridProps, moveItem };
@@ -0,0 +1,141 @@
1
+ import { HTMLAttributes, ReactNode, Ref, ReactElement } from 'react';
2
+
3
+ /** The least an item needs. Anything else on it is yours, and reaches `renderItem` untouched. */
4
+ interface ReorderableGridItem {
5
+ /** Stable id. The order is reported as these. */
6
+ id: string;
7
+ /**
8
+ * Pinned: this cell keeps its slot. It cannot be picked up or dragged, and
9
+ * nothing can be dropped onto it; other cells flow around it.
10
+ */
11
+ locked?: boolean;
12
+ }
13
+ /** What `renderItem` gets alongside the item. */
14
+ interface ReorderableGridItemState {
15
+ /** 0-based index in the order currently shown (the live preview while dragging). */
16
+ index: number;
17
+ /** 1-based position. */
18
+ position: number;
19
+ /** 1-based row. */
20
+ row: number;
21
+ /** 1-based column. */
22
+ column: number;
23
+ total: number;
24
+ /** Being dragged with a pointer. */
25
+ dragging: boolean;
26
+ /** Picked up with the keyboard. */
27
+ pickedUp: boolean;
28
+ /** This cell's slot is where the active item will land. */
29
+ dropTarget: boolean;
30
+ locked: boolean;
31
+ disabled: boolean;
32
+ /**
33
+ * Spread on an element to make it the drag handle. Once a cell contains a
34
+ * handle, only the handle starts a pointer drag; without one, the whole cell
35
+ * does. The keyboard always works on the cell itself.
36
+ */
37
+ handleProps: {
38
+ "data-reorderable-handle": "";
39
+ };
40
+ }
41
+ /** Facts every announcement can use. Positions are 1-based. */
42
+ interface ReorderableGridAnnouncementContext {
43
+ id: string;
44
+ /** From `getItemLabel`, else `item.label` when it is a string, else the id. */
45
+ label: string;
46
+ position: number;
47
+ total: number;
48
+ row: number;
49
+ column: number;
50
+ }
51
+ /** Every string the grid speaks or shows to assistive tech. Override any of them (i18n). */
52
+ interface ReorderableGridLabels {
53
+ /** Read with each cell (`aria-describedby`). */
54
+ instructions: string;
55
+ /** `aria-roledescription` of each cell. */
56
+ roleDescription: string;
57
+ pickedUp: (ctx: ReorderableGridAnnouncementContext) => string;
58
+ moved: (ctx: ReorderableGridAnnouncementContext) => string;
59
+ dropped: (ctx: ReorderableGridAnnouncementContext) => string;
60
+ /** `ctx` is the restored (original) position. */
61
+ cancelled: (ctx: ReorderableGridAnnouncementContext) => string;
62
+ locked: (ctx: ReorderableGridAnnouncementContext) => string;
63
+ }
64
+ interface ReorderableGridProps<T extends ReorderableGridItem> extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "defaultValue" | "onChange"> {
65
+ /** The cells' data. Each needs a unique `id`. */
66
+ items: T[];
67
+ /**
68
+ * Controlled order, as ids. Ids that are not in `items` are ignored, and
69
+ * items missing from it follow in `items` order, so a stale or partial order
70
+ * never drops a cell.
71
+ */
72
+ value?: string[];
73
+ /** Uncontrolled starting order. Omit both to start in `items` order. */
74
+ defaultValue?: string[];
75
+ /**
76
+ * The full new order, once per committed move: a pointer release or a
77
+ * keyboard drop that changed something. Never on a cancel, never on a
78
+ * no-op drop, never during the live preview.
79
+ */
80
+ onReorder?: (ids: string[]) => void;
81
+ /** Renders a cell's content. Default: the item's label. */
82
+ renderItem?: (item: T, state: ReorderableGridItemState) => ReactNode;
83
+ /** Columns, 1 to 12. Placement is row-major. Default `2`. */
84
+ columns?: number;
85
+ /** Gutter. Default `sm`. */
86
+ gap?: "none" | "sm" | "md" | "lg";
87
+ /** No reordering at all, and no tab stops. */
88
+ disabled?: boolean;
89
+ /** Accessible name of the grid. */
90
+ label?: string;
91
+ /** The name an item is announced by. */
92
+ getItemLabel?: (item: T) => string;
93
+ /** Overrides for any announcement or label. */
94
+ labels?: Partial<ReorderableGridLabels>;
95
+ /** Skip the cell's default visuals (border, surface, padding). Behaviour stays. */
96
+ unstyled?: boolean;
97
+ /** Extra classes on every cell. */
98
+ cellClassName?: string;
99
+ }
100
+
101
+ /**
102
+ * A grid of cells reordered in place, row-major, by pointer or keyboard.
103
+ *
104
+ * Built for field-order designers: the grid looks like the grid it designs.
105
+ * Order is a list of ids (`value` / `defaultValue` / `onReorder`); the pure
106
+ * `moveItem(ids, from, to, { locked })` is the same rule without a DOM, for
107
+ * agents.
108
+ */
109
+ declare const ReorderableGrid: (<T extends ReorderableGridItem>(props: ReorderableGridProps<T> & {
110
+ ref?: Ref<HTMLDivElement>;
111
+ }) => ReactElement) & {
112
+ displayName?: string;
113
+ };
114
+
115
+ interface MoveItemOptions<T> {
116
+ /**
117
+ * Pinned entries. A locked entry keeps its absolute index: it cannot be
118
+ * moved, nothing can be dropped onto its slot, and the other entries flow
119
+ * around it. Either the locked ids themselves or a predicate.
120
+ */
121
+ locked?: Iterable<T> | ((id: T) => boolean);
122
+ }
123
+ /**
124
+ * Move the entry at `fromIndex` so that it ends up at `toIndex`, row-major,
125
+ * and return a NEW array. The input is never mutated.
126
+ *
127
+ * This is the whole reorder rule of `ReorderableGrid`, with no DOM: the grid's
128
+ * pointer drags and arrow keys both go through it, and an agent bridge can call
129
+ * it directly to reorder from a tool call.
130
+ *
131
+ * - `toIndex` is the entry's index in the RESULT, so `moveItem(ids, 0, ids.length - 1)`
132
+ * moves the first entry to the end.
133
+ * - An index outside the list (or not an integer) throws `RangeError`. That is
134
+ * a caller bug, and a silent no-op would hide it.
135
+ * - With `locked`: a locked entry keeps its absolute index and the move happens
136
+ * among the free slots only. Moving a locked entry, or onto a locked slot,
137
+ * returns the order unchanged: that is the rule doing its job, not an error.
138
+ */
139
+ declare function moveItem<T>(ids: readonly T[], fromIndex: number, toIndex: number, options?: MoveItemOptions<T>): T[];
140
+
141
+ export { type MoveItemOptions, ReorderableGrid, type ReorderableGridAnnouncementContext, type ReorderableGridItem, type ReorderableGridItemState, type ReorderableGridLabels, type ReorderableGridProps, moveItem };
@@ -0,0 +1,7 @@
1
+ export { ReorderableGrid, moveItem } from './chunk-DTOIO42M.js';
2
+ import './chunk-SV5BW3IA.js';
3
+ import './chunk-YX6FTJ6N.js';
4
+ import './chunk-EDYAXGUM.js';
5
+ import './chunk-MMW2JGKZ.js';
6
+ //# sourceMappingURL=reorderable-grid.js.map
7
+ //# sourceMappingURL=reorderable-grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"reorderable-grid.js"}
package/docs/Editor.md CHANGED
@@ -48,6 +48,7 @@ import { Editor } from "@particle-academy/react-fancy";
48
48
  | children | `ReactNode` | - | Custom toolbar content |
49
49
  | showSourceToggle | `boolean` | `true` | Append a Source toggle to the default toolbar. Ignored when `children` are supplied — custom toolbars compose their own `<Editor.SourceToggle />` |
50
50
  | showFullScreenToggle | `boolean` | `false` | Append a full-screen toggle (Lucide `maximize-2` / `minimize-2`) at the right end of the default toolbar. Ignored when `children` are supplied — use `<Editor.FullScreenToggle />` |
51
+ | toolbarExtra | `ReactNode` | - | Host content (e.g. Save / Cancel) rendered inside the default toolbar at its trailing end: after the Source toggle, before the full-screen toggle. Wrapped in `[data-react-fancy-editor-toolbar-extra]`. Stays reachable in full screen. Same name and placement as fancy-sheets' `SheetWorkbook toolbarExtra`. Ignored when `children` are supplied |
51
52
  | className | `string` | - | Additional CSS classes |
52
53
 
53
54
  #### EditorAction
@@ -94,6 +95,23 @@ Toolbar button that takes the editor full screen and back. Carries `data-react-f
94
95
 
95
96
  While full screen the root has `data-fullscreen="true"`, `maxHeight` is ignored so the content fills the screen, and Escape leaves. The editor is not remounted, so the caret, undo history and text survive the round trip.
96
97
 
98
+ A host's own actions belong in `toolbarExtra`, not in `children`: children replace the whole default toolbar, while `toolbarExtra` adds to it, so Save stays on screen while the editor is full screen.
99
+
100
+ ```tsx
101
+ <Editor value={doc} onChange={setDoc}>
102
+ <Editor.Toolbar
103
+ showFullScreenToggle
104
+ toolbarExtra={
105
+ <>
106
+ <Button size="sm" variant="ghost" onClick={cancel}>Cancel</Button>
107
+ <Button size="sm" onClick={save}>Save</Button>
108
+ </>
109
+ }
110
+ />
111
+ <Editor.Content />
112
+ </Editor>
113
+ ```
114
+
97
115
  ### Editor.Content
98
116
 
99
117
  | Prop | Type | Default | Description |
package/docs/Kanban.md CHANGED
@@ -58,8 +58,10 @@ The board ships with a drop-position indicator (a thin blue line that appears wh
58
58
  | `title` | `string` | - | Column header text. When set, the column renders a built-in header with a count chip (and `count / wipLimit` if `wipLimit` is set). |
59
59
  | `wipLimit` | `number` | - | Soft work-in-progress limit. The header pill turns red when `cardCount > wipLimit`. Drops are not refused — enforce hard via `onCardMove`. *Since v2.8.0.* |
60
60
  | `hideWhenEmpty` | `boolean` | `false` | Render nothing when the column has zero card children. The column still re-mounts to receive drops while a card is being dragged elsewhere. *Since v2.8.0.* |
61
- | `unstyled` | `boolean` | `false` | Skip the default visuals (background, padding, min-height, fixed `w-72`) so you can render your own surface around the children. The drop target, drag-over ring, and column id wiring are kept. *Since v2.7.0.* |
62
- | `className` | `string` | - | Additional CSS classes |
61
+ | `unstyled` | `boolean` | `false` | Skip the default visuals (background, padding, min-height, fixed `w-72 shrink-0`) so you can render your own surface around the children. The drop target, drag-over ring, and column id wiring are kept. *Since v2.7.0.* |
62
+ | `className` | `string` | - | Additional CSS classes. Merged over the defaults, so `w-60` replaces `w-72` and `shrink` replaces `shrink-0` |
63
+
64
+ Columns default to `w-72 shrink-0`, and the board root is a flex row with `overflow-x-auto`, so a board wider than its container scrolls horizontally instead of squeezing its columns.
63
65
 
64
66
  ### Kanban.Card
65
67