nish-ui 3.1.0 → 3.2.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 (56) hide show
  1. package/README.md +6 -3
  2. package/dist/chart.js +2 -2
  3. package/dist/elements-all.js +28 -28
  4. package/dist/elements-charts.d.ts +1 -1
  5. package/dist/elements-charts.js +22 -22
  6. package/dist/elements-data.js +2 -2
  7. package/dist/elements-forms.js +8 -8
  8. package/dist/elements.js +3 -3
  9. package/dist/esm/chart-values.js +2 -1
  10. package/dist/esm/combobox-filter.js +6 -5
  11. package/dist/esm/command-filter.js +32 -0
  12. package/dist/esm/components/accordion.js +2 -1
  13. package/dist/esm/components/app-shell.js +1 -1
  14. package/dist/esm/components/breadcrumbs.js +1 -1
  15. package/dist/esm/components/calendar-base.js +1 -1
  16. package/dist/esm/components/combobox.js +2 -2
  17. package/dist/esm/components/command.js +5 -5
  18. package/dist/esm/components/data-classes.js +18 -4
  19. package/dist/esm/components/display.js +4 -4
  20. package/dist/esm/components/feedback.js +1 -1
  21. package/dist/esm/components/file-dropzone.js +23 -1
  22. package/dist/esm/components/flow.js +4 -4
  23. package/dist/esm/components/forms-classes.js +1 -1
  24. package/dist/esm/components/forms.js +6 -4
  25. package/dist/esm/components/inbox.js +4 -1
  26. package/dist/esm/components/menu.js +4 -0
  27. package/dist/esm/components/multi-select.js +2 -2
  28. package/dist/esm/components/nav-classes.js +9 -0
  29. package/dist/esm/components/nav.js +2 -1
  30. package/dist/esm/components/primitives-classes.js +4 -4
  31. package/dist/esm/components/primitives.js +1 -1
  32. package/dist/esm/components/radio-group.js +1 -1
  33. package/dist/esm/components/resource-classes.js +7 -3
  34. package/dist/esm/components/resource.js +3 -2
  35. package/dist/esm/components/settings.js +5 -1
  36. package/dist/esm/components/tabs.js +3 -2
  37. package/dist/esm/components/toast-store.js +16 -4
  38. package/dist/esm/components/url-state.js +2 -1
  39. package/dist/esm/format.js +24 -2
  40. package/dist/esm/runtime.js +9 -2
  41. package/dist/esm/split-layout.js +2 -1
  42. package/dist/format.js +33 -5
  43. package/dist/inbox-client.d.ts +5 -1
  44. package/dist/inbox-client.js +0 -1
  45. package/dist/index.d.ts +7 -4
  46. package/dist/nish-components.css +11 -2
  47. package/dist/nish-components.min.css +1 -1
  48. package/dist/server/hono.d.ts +1 -1
  49. package/dist/server/hono.js +91 -7
  50. package/dist/server/index.d.ts +20 -12
  51. package/dist/server/index.js +117 -27
  52. package/dist/{spa-7myD4xvA.d.ts → spa-BfRDo38r.d.ts} +32 -4
  53. package/dist/split-layout.js +2 -2
  54. package/dist/theme.global.js +9 -4
  55. package/dist/theme.js +9 -3
  56. package/package.json +1 -1
package/README.md CHANGED
@@ -222,6 +222,10 @@ nonce:
222
222
  response. Vite runs the transform once per build, so a fixed real nonce (or a function) is baked into
223
223
  the file and gives no protection outside the dev server. In other setups give your own
224
224
  `<script nonce>` the file's contents.
225
+ - `serveSpa({ dir, csp: 'strict' })` (and `createSpaHandler`) from `nish-ui/server` sends a strict policy
226
+ on HTML answers, hashing every inline script in the built index.html (so the Vite plugin's theme-init
227
+ script is allowed without copying its hash); pass `connect`/`img` for extra origins and
228
+ `reportOnly: true` to try it first.
225
229
  - The components set no inline styles that need `style-src 'unsafe-inline'` beyond CSS custom
226
230
  properties on elements, and build their DOM without `innerHTML`, so a Trusted Types policy
227
231
  (`require-trusted-types-for 'script'`) passes.
@@ -355,10 +359,9 @@ export and two copies of the package on one page), Playwright specs for overlays
355
359
  elements, hydration, Content Security Policy and Trusted Types, an axe accessibility scan with
356
360
  zero serious or critical findings, a consumer build in Next.js (App Router), Vite and a
357
361
  TypeScript matrix (5.4, 5.9 and 6.0 with `bundler` and `node16` resolution), the bundle size
358
- budgets, a screenshot check of the docs site at 360, 840 and 1440 px in light and dark, and an
362
+ budgets, a screenshot check of the docs site at 390 and 1440 px, a Fold check on pull requests (its pages at 360, 840 and 1440 px in light and dark), and an
359
363
  exports snapshot that fails when a public name or `.nish-*` class disappears. Releases publish to
360
- npm with provenance. The docs site is checked at 360, 840 and 1440 px; not every component is
361
- checked in every theme on every pull request.
364
+ npm with provenance. Not every component is checked in every theme on every pull request.
362
365
 
363
366
  ## Links
364
367
 
package/dist/chart.js CHANGED
@@ -6,7 +6,8 @@ function readToken(name) {
6
6
 
7
7
  // src/chart-values.ts
8
8
  function seriesColor(i) {
9
- const n = (Math.trunc(i) % 8 + 8) % 8;
9
+ const k = Number.isFinite(i) ? Math.trunc(i) : 0;
10
+ const n = (k % 8 + 8) % 8;
10
11
  return `var(--nish-chart-${n + 1})`;
11
12
  }
12
13
  var CHART = {
@@ -61,4 +62,3 @@ export {
61
62
  seriesColor,
62
63
  tooltipStyle
63
64
  };
64
- //# sourceMappingURL=chart.js.map