@nxgt/material-vue 0.25.0 → 0.25.2
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/CHANGELOG.md +1628 -0
- package/README.md +24 -2
- package/docs/getting-started.md +2 -2
- package/docs/roadmap.md +18 -16
- package/docs/troubleshooting.md +31 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ lists the React equivalent for each entry.
|
|
|
45
45
|
- [Guides](#guides)
|
|
46
46
|
- [Components](#components)
|
|
47
47
|
- [Traps](#traps)
|
|
48
|
+
- [Using with Claude Code](#using-with-claude-code)
|
|
48
49
|
- [Documentation](#documentation)
|
|
49
50
|
- [Development](#development)
|
|
50
51
|
- [License](#license)
|
|
@@ -76,8 +77,8 @@ stores silently split between two instances.
|
|
|
76
77
|
|
|
77
78
|
The tarball ships `dist/`, `docs/`, the stylesheets (`lib/styles.css`, the
|
|
78
79
|
component stylesheets it imports, `lib/components/**/*.css`, and
|
|
79
|
-
`lib/map/map.css`) and the Nuxt module (`lib/nuxt`, with the `lib/vite/index.ts` it imports)
|
|
80
|
-
`postinstall` build.
|
|
80
|
+
`lib/map/map.css`) and the Nuxt module (`lib/nuxt`, with the `lib/vite/index.ts` it imports), and, from the
|
|
81
|
+
release after 0.25.1, `CHANGELOG.md`. There is no `postinstall` build.
|
|
81
82
|
|
|
82
83
|
## Setup
|
|
83
84
|
|
|
@@ -587,6 +588,27 @@ The ones that cost the most time. Every error message, with its fix, is in
|
|
|
587
588
|
| `Cannot find module '…/pdfkit/js/standard-fonts/Helvetica.cjs'` from a Nuxt or Nitro production server | use the Nuxt module, or add pdfkit's font files to `nitro.externals.traceInclude` ([troubleshooting](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/troubleshooting.md#cannot-find-module-pdfkitjsstandard-fontshelveticacjs)) |
|
|
588
589
|
| CSS or a test selecting `[data-variant=destructive]` on a menu item stops matching | menu items render `data-variant="error"`, for `variant="error"` and the deprecated `"destructive"` alike: select `[data-variant=error]` |
|
|
589
590
|
|
|
591
|
+
## Using with Claude Code
|
|
592
|
+
|
|
593
|
+
The `nxgt-material-vue` plugin teaches Claude Code to build a Vue or Nuxt app with this
|
|
594
|
+
package. Add the marketplace once, then install the plugin in the app's
|
|
595
|
+
repository:
|
|
596
|
+
|
|
597
|
+
```
|
|
598
|
+
/plugin marketplace add softistx/nxgt-material
|
|
599
|
+
/plugin install nxgt-material-vue@nxgt-material
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
The marketplace lives in the `softistx/nxgt-material` GitHub repository,
|
|
603
|
+
which is private: adding it needs a GitHub account with access to it.
|
|
604
|
+
|
|
605
|
+
| Part | What it does |
|
|
606
|
+
| --- | --- |
|
|
607
|
+
| skill `use-nxgt-material-vue` | picks the component by need, and wires imports, `styles.css` and the tokens, forms, i18n, tests by role and SSR from these docs, read in `node_modules/@nxgt/material-vue/docs/` |
|
|
608
|
+
| agent `vue-screen-builder` | builds a page or a form from the catalogue, with tests by role and name and an accessibility check |
|
|
609
|
+
| agent `vue-upgrade-assistant` | upgrades between two versions: reads the release notes in between, applies the migrations that match, runs the app's typecheck and tests |
|
|
610
|
+
| hook (after Write / Edit) | names the component and its docs page when a file hand-rolls one (a native date input, a home-made dialog or tabs, a paged `<table>`, a file input with a preview). Advisory only; `NXGT_MATERIAL_ADVISOR_DISABLE=1` turns it off |
|
|
611
|
+
|
|
590
612
|
## Documentation
|
|
591
613
|
|
|
592
614
|
- [docs/README.md](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/README.md) — every page, and when to read it
|
package/docs/getting-started.md
CHANGED
|
@@ -35,8 +35,8 @@ does not import that entry never has them in its tree.
|
|
|
35
35
|
The tarball contains the built `dist/`, `lib/styles.css`, the component
|
|
36
36
|
stylesheets it imports (`lib/components/**/*.css`), `lib/map/map.css`, the
|
|
37
37
|
Nuxt module (`lib/nuxt`, with the
|
|
38
|
-
`lib/vite/index.ts` it imports)
|
|
39
|
-
build step.
|
|
38
|
+
`lib/vite/index.ts` it imports), these docs and `CHANGELOG.md` (from the
|
|
39
|
+
release after 0.25.1). There is no `postinstall` build step.
|
|
40
40
|
|
|
41
41
|
## Styles
|
|
42
42
|
|
package/docs/roadmap.md
CHANGED
|
@@ -6,22 +6,7 @@ the version something shipped in.
|
|
|
6
6
|
|
|
7
7
|
## Now
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
field, as chips when several, with an optional filter that keeps each match
|
|
11
|
-
under its ancestors (`TreeSelectField`, `TreeSelectFormField`).
|
|
12
|
-
- **The same options as `@nxgt/material`** — a generic `Autocomplete` and
|
|
13
|
-
`FilesFormField` typed by your items, a `ConfirmationDialog` that holds a
|
|
14
|
-
form, date fields that disable chosen days, `SliderField` ticks and
|
|
15
|
-
leading/trailing content, a presence status on `Avatar`, a logo slot on the
|
|
16
|
-
QR code, slots on `AccordionCard`, an option slot on `SelectField`, Monaco's
|
|
17
|
-
own options on `CodeEditor` and a line variant for `Tabs`.
|
|
18
|
-
- **DateRangeField presets and time** — one-click ranges such as Today, Last 7
|
|
19
|
-
days and This month, or your own, beside the calendar (`presets`), and a time
|
|
20
|
-
of day on each end of the range (`with-time`), and `min-date` / `max-date`.
|
|
21
|
-
- **FilePreview** — preview a file picked by its type, in one component: an
|
|
22
|
-
image, a PDF in `PdfReader`, a video or audio file, the text of a text, JSON,
|
|
23
|
-
CSV or Markdown file, or a card with a download link for anything else
|
|
24
|
-
(`FilePreview`, `@error`). Safe on a server.
|
|
9
|
+
Nothing in progress right now; see Next.
|
|
25
10
|
|
|
26
11
|
## Next
|
|
27
12
|
|
|
@@ -107,6 +92,23 @@ the version something shipped in.
|
|
|
107
92
|
|
|
108
93
|
## Shipped
|
|
109
94
|
|
|
95
|
+
- **TreeSelectField** — pick one or several items from a tree inside a form
|
|
96
|
+
field, as chips when several, with an optional filter that keeps each match
|
|
97
|
+
under its ancestors (`TreeSelectField`, `TreeSelectFormField`). 0.25.0.
|
|
98
|
+
- **The same options as `@nxgt/material`** — a generic `Autocomplete` and
|
|
99
|
+
`FilesFormField` typed by your items, a `ConfirmationDialog` that holds a
|
|
100
|
+
form, date fields that disable chosen days, `SliderField` ticks and
|
|
101
|
+
leading/trailing content, a presence status on `Avatar`, a logo slot on the
|
|
102
|
+
QR code, slots on `AccordionCard`, an option slot on `SelectField`, Monaco's
|
|
103
|
+
own options on `CodeEditor` and a line variant for `Tabs`. 0.25.0.
|
|
104
|
+
- **DateRangeField presets and time** — one-click ranges such as Today, Last 7
|
|
105
|
+
days and This month, or your own, beside the calendar (`presets`), and a time
|
|
106
|
+
of day on each end of the range (`with-time`), and `min-date` / `max-date`.
|
|
107
|
+
0.25.0.
|
|
108
|
+
- **FilePreview** — preview a file picked by its type, in one component: an
|
|
109
|
+
image, a PDF in `PdfReader`, a video or audio file, the text of a text, JSON,
|
|
110
|
+
CSV or Markdown file, or a card with a download link for anything else
|
|
111
|
+
(`FilePreview`, `@error`). Safe on a server. 0.25.0.
|
|
110
112
|
- **Spinner `light` colour renders** — a `Spinner` with `color="light"` shows
|
|
111
113
|
its light ring, for loading states on dark or coloured surfaces. 0.24.0.
|
|
112
114
|
- **Range filters announce their field name** — the slider thumbs and the
|
package/docs/troubleshooting.md
CHANGED
|
@@ -117,6 +117,7 @@ words in your error.
|
|
|
117
117
|
- [A form with a required `Switch` no longer submits](#a-form-with-a-required-switch-no-longer-submits)
|
|
118
118
|
- [A `RichTextEditor` became editable after upgrading](#a-richtexteditor-became-editable-after-upgrading)
|
|
119
119
|
- [Focus falls to `<body>` when a controlled `Drawer` closes](#focus-falls-to-body-when-a-controlled-drawer-closes)
|
|
120
|
+
- [A `TimePicker` test expects AM / PM to add 12 hours, or a click on the pressed half to switch to PM](#a-timepicker-test-expects-am--pm-to-add-12-hours-or-a-click-on-the-pressed-half-to-switch-to-pm)
|
|
120
121
|
|
|
121
122
|
**PDF reader**
|
|
122
123
|
|
|
@@ -2073,6 +2074,33 @@ const opener = useTemplateRef<InstanceType<typeof Button>>('opener');
|
|
|
2073
2074
|
</template>
|
|
2074
2075
|
```
|
|
2075
2076
|
|
|
2077
|
+
### A `TimePicker` test expects AM / PM to add 12 hours, or a click on the pressed half to switch to PM
|
|
2078
|
+
|
|
2079
|
+
**When:** after upgrading to 0.25.0, a test (or code of yours) around a
|
|
2080
|
+
`TimePicker` — or the popover of a `DateField` with `show-time-picker`, a
|
|
2081
|
+
`TimeField` or a `DateRangeField` with `with-time`, which hold one — sees a
|
|
2082
|
+
different time, or no `change` event, when it clicks AM or PM.
|
|
2083
|
+
**Why:** before 0.25.0 the toggle added 12 hours on every PM and took
|
|
2084
|
+
`% 12` on AM. A time already in the afternoon went 12 hours further — PM on
|
|
2085
|
+
14:00 gave 02:00 the next day — and a click on the half already pressed
|
|
2086
|
+
(which Reka reports as no value, unpressing it) was read as PM and did the
|
|
2087
|
+
same. The AM / PM shown was also read once, from the first `date`, so a
|
|
2088
|
+
`date` changed from outside kept its old half. Now AM / PM follows the `date`
|
|
2089
|
+
it is given, switching moves the time into that half and no further (09:30 +
|
|
2090
|
+
PM is 21:30, 21:30 + PM stays 21:30, 21:30 + AM is 09:30, on the same day),
|
|
2091
|
+
and a click on the pressed half changes nothing and emits no `change`. This
|
|
2092
|
+
is the same fix as `@nxgt/material`'s 2.6.0 (`periodOf` / `withPeriod`). The
|
|
2093
|
+
hours and minutes inputs are also named "Hours" and "Minutes"
|
|
2094
|
+
(`material.time-picker.hours`, `material.time-picker.minutes`).
|
|
2095
|
+
**Fix:** expect the time in the half you picked, and no event for a click on
|
|
2096
|
+
the pressed half. Find the inputs by their names rather than by position:
|
|
2097
|
+
|
|
2098
|
+
```ts
|
|
2099
|
+
await userEvent.click(canvas.getByRole('button', { name: 'PM' }));
|
|
2100
|
+
expect(onChange).toHaveBeenLastCalledWith(new Date(2026, 0, 1, 21, 30)); // from 09:30
|
|
2101
|
+
await userEvent.type(canvas.getByRole('spinbutton', { name: 'Hours' }), '10');
|
|
2102
|
+
```
|
|
2103
|
+
|
|
2076
2104
|
---
|
|
2077
2105
|
|
|
2078
2106
|
## PDF reader
|
|
@@ -2470,7 +2498,9 @@ own error inside it.
|
|
|
2470
2498
|
**When:** a `FilePreview` given a URL, or a file it cannot show, renders that
|
|
2471
2499
|
message (and `@error` receives the error).
|
|
2472
2500
|
**Why:** a text, JSON, CSV or Markdown URL is fetched with `fetch`: an HTTP
|
|
2473
|
-
error is a `FilePreviewHttpError` with its `status`,
|
|
2501
|
+
error is a `FilePreviewHttpError` with its `status`, whose message is
|
|
2502
|
+
`Could not read …: HTTP 404` (the URL as you passed it, then the status —
|
|
2503
|
+
`Could not read /files/notes.txt: HTTP 404`), and a cross-origin URL
|
|
2474
2504
|
without CORS headers is a `TypeError: Failed to fetch`. An image, video or
|
|
2475
2505
|
audio file the browser cannot decode (a corrupt file, a codec the browser
|
|
2476
2506
|
lacks, a URL that answers an error page) fails in its own element. A URL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/material-vue",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "stevegires@gmail.com"
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"lib/components/**/*.css",
|
|
19
19
|
"docs",
|
|
20
20
|
"README.md",
|
|
21
|
+
"CHANGELOG.md",
|
|
21
22
|
"package.json"
|
|
22
23
|
],
|
|
23
24
|
"exports": {
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
"docs:previews": "vitest run --project previews"
|
|
119
120
|
},
|
|
120
121
|
"dependencies": {
|
|
121
|
-
"@nxgt/material-core": "^0.3.
|
|
122
|
+
"@nxgt/material-core": "^0.3.2",
|
|
122
123
|
"@floating-ui/dom": "^1.8.0",
|
|
123
124
|
"@fortawesome/fontawesome-common-types": "7.3.1",
|
|
124
125
|
"@lucide/vue": "^1.45.0",
|