@mano8/astro-media-m8 0.1.0-alpha.2 → 1.0.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/README.md CHANGED
@@ -1,23 +1,35 @@
1
1
  # @mano8/astro-media-m8
2
2
 
3
+ ![CI/CD](https://github.com/mano8/astro-media-m8/actions/workflows/CI.yaml/badge.svg?branch=main)
4
+
3
5
  Astro integration and headless client for [`media-service-m8`]. The media-side
4
6
  analog of `@mano8/astro-auth-m8`: typed Zod schemas, API wrappers for the full
5
7
  media contract, a presigned-upload controller, optional React provider/hooks,
6
8
  and injectable starter routes — so any Astro stack can drive media without
7
9
  re-implementing the contract.
8
10
 
9
- Part of the M8 media stack: [mano8/astro-media-m8](https://github.com/mano8/astro-media-m8) works with [mano8/astro-auth-m8](https://github.com/mano8/astro-auth-m8) for fa-auth-m8 token delegation, targets the media backend at [https://github.com/mano8/media-service-m8/tree/main](https://github.com/mano8/media-service-m8/tree/main), and composes into [mano8/fa-ui-m8](https://github.com/mano8/fa-ui-m8).
11
+ Part of the M8 media stack: [mano8/astro-media-m8](https://github.com/mano8/astro-media-m8)
12
+ requires [mano8/astro-auth-m8](https://github.com/mano8/astro-auth-m8) as its
13
+ auth peer for fa-auth-m8 token delegation, consumes shared UI/registry blocks
14
+ from [mano8/astro-ui-m8](https://github.com/mano8/astro-ui-m8), targets the
15
+ media backend at [mano8/media-service-m8](https://github.com/mano8/media-service-m8),
16
+ and composes into the [mano8/fa-ui-m8](https://github.com/mano8/fa-ui-m8) host app.
17
+
18
+ ### Related repositories
19
+
20
+ - [`media-service-m8`](https://github.com/mano8/media-service-m8) — the FastAPI backend this plugin fronts.
21
+ - [`astro-ui-m8`](https://github.com/mano8/astro-ui-m8) — canonical shared shadcn registry (data-table, state components) this plugin's admin views build on.
22
+ - [`astro-auth-m8`](https://github.com/mano8/astro-auth-m8) — required auth peer; issues the fa-auth-m8 tokens this plugin's adapter consumes.
23
+ - [`fa-ui-m8`](https://github.com/mano8/fa-ui-m8) — the Astro/Starlight host app this plugin installs into.
10
24
 
11
- Pinned to `media-service-m8@0.0` (supported service-version range
12
- `>=0.0.10 <0.1.0`; see `mediaServiceM8` in `package.json`).
25
+ Pinned to `media-service-m8@1.0` (supported service-version range
26
+ `>=1.0.0 <2.0.0`; see `mediaServiceM8` in `package.json`).
13
27
 
14
28
  ## Backend contract
15
29
 
16
- This package targets the `media-service-m8@0.0` API contract and was tested
17
- against `media-service-m8` service version `0.0.10`. Supported backend service
18
- versions are `>=0.0.10 <0.1.0` (the floor is the first release supporting the
19
- media library sorting contract). The contract major.minor tracks the pre-1.0
20
- package line.
30
+ This package targets the `media-service-m8@1.0` API contract and was tested
31
+ against `media-service-m8` service version `1.0.0`. Supported backend service
32
+ versions are `>=1.0.0 <2.0.0`.
21
33
 
22
34
  Compatibility helpers are exported from `@mano8/astro-media-m8/compatibility`.
23
35
  `media-service-m8` (>= 0.0.10) exposes a public `GET {API_PREFIX}/meta` route
@@ -47,7 +59,8 @@ npm i @mano8/astro-media-m8 @mano8/astro-auth-m8 zod
47
59
  tokens). `@mano8/astro-ui-m8` is a normal dependency because the media registry
48
60
  skins compose the canonical shared table from its packaged registry output.
49
61
  `react`/`react-dom` are optional — only `./react`, `./hooks` and the starter
50
- views need them.
62
+ views need them; `@tanstack/react-query` is a required peer once you use
63
+ `./hooks` (`npm i @tanstack/react-query`).
51
64
 
52
65
  ## Modes
53
66
 
@@ -209,4 +222,4 @@ Consumers should install the shared UI block first or let `shadcn` resolve it fr
209
222
  - `npm run typecheck` — `tsc --noEmit`
210
223
  - `npm test` — Vitest with coverage (100% on the non-React runtime)
211
224
 
212
- [`media-service-m8`]: ../media-service-m8
225
+ [`media-service-m8`]: https://github.com/mano8/media-service-m8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mano8/astro-media-m8",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "1.0.0",
4
4
  "description": "Astro integration and headless client for media-service-m8.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,10 +58,10 @@
58
58
  "test:unit": "vitest run"
59
59
  },
60
60
  "dependencies": {
61
- "@mano8/astro-ui-m8": "^0.1.0-alpha.1"
61
+ "@mano8/astro-ui-m8": "^1.0.0"
62
62
  },
63
63
  "peerDependencies": {
64
- "@mano8/astro-auth-m8": "^0.1.0-alpha.3",
64
+ "@mano8/astro-auth-m8": "^1.0.0",
65
65
  "@tanstack/react-query": "^5.101.1",
66
66
  "astro": "^5.0.0 || ^6.0.0",
67
67
  "react": "^18.0.0 || ^19.0.0",
@@ -78,7 +78,7 @@
78
78
  },
79
79
  "devDependencies": {
80
80
  "@astrojs/react": "^5.0.7",
81
- "@mano8/astro-auth-m8": "^0.1.0-alpha.3",
81
+ "@mano8/astro-auth-m8": "^1.0.0",
82
82
  "@tanstack/react-query": "^5.101.1",
83
83
  "@types/node": "^22.0.0",
84
84
  "@types/react": "^19.0.0",
@@ -1,6 +1,6 @@
1
- /* Modest, framework-neutral styling for the media starter views. Consumers can
2
- override every class; nothing here assumes Tailwind, Starlight, or a theme. */
3
-
1
+ /* Modest, framework-neutral styling for the media starter views. Consumers can
2
+ override every class; nothing here assumes Tailwind, Starlight, or a theme. */
3
+
4
4
  .fa-media-panel {
5
5
  --fa-media-border: var(--fa-media-border-color, var(--border, color-mix(in srgb, CanvasText 14%, Canvas)));
6
6
  --fa-media-input-border: var(--fa-media-input-border-color, var(--fa-media-border));
@@ -21,19 +21,19 @@
21
21
  border-radius: 0.5rem;
22
22
  font-family: system-ui, sans-serif;
23
23
  }
24
-
25
- .fa-media-panel h2,
26
- .fa-media-panel h3 {
27
- margin-top: 0;
28
- }
29
-
24
+
25
+ .fa-media-panel h2,
26
+ .fa-media-panel h3 {
27
+ margin-top: 0;
28
+ }
29
+
30
30
  .fa-media-field,
31
31
  .fa-media-actions,
32
32
  .fa-media-toolbar {
33
33
  display: flex;
34
34
  flex-wrap: wrap;
35
- gap: 0.75rem;
36
- align-items: center;
35
+ gap: 0.75rem;
36
+ align-items: center;
37
37
  margin-bottom: 1rem;
38
38
  }
39
39
 
@@ -60,7 +60,7 @@
60
60
  align-items: center;
61
61
  }
62
62
  }
63
-
63
+
64
64
  .fa-media-panel fieldset {
65
65
  display: grid;
66
66
  gap: 1rem;
@@ -69,27 +69,27 @@
69
69
  border: 1px solid var(--fa-media-border);
70
70
  border-radius: 0.5rem;
71
71
  }
72
-
73
- .fa-media-panel legend {
74
- padding: 0 0.25rem;
75
- font-size: 0.875rem;
76
- font-weight: 500;
77
- }
78
-
79
- .fa-media-panel label:has(input[type="checkbox"]),
80
- .fa-media-panel label:has(input[type="radio"]) {
81
- flex-direction: row;
82
- align-items: center;
83
- gap: 0.5rem;
84
- }
85
-
86
- .fa-media-field-control {
87
- display: flex;
88
- flex-direction: column;
89
- min-width: 12rem;
90
- max-width: 100%;
91
- }
92
-
72
+
73
+ .fa-media-panel legend {
74
+ padding: 0 0.25rem;
75
+ font-size: 0.875rem;
76
+ font-weight: 500;
77
+ }
78
+
79
+ .fa-media-panel label:has(input[type="checkbox"]),
80
+ .fa-media-panel label:has(input[type="radio"]) {
81
+ flex-direction: row;
82
+ align-items: center;
83
+ gap: 0.5rem;
84
+ }
85
+
86
+ .fa-media-field-control {
87
+ display: flex;
88
+ flex-direction: column;
89
+ min-width: 12rem;
90
+ max-width: 100%;
91
+ }
92
+
93
93
  .fa-media-control {
94
94
  box-sizing: border-box;
95
95
  height: 2rem;
@@ -105,18 +105,18 @@
105
105
  background-color: var(--fa-media-popover-bg);
106
106
  color: var(--fa-media-popover-fg);
107
107
  }
108
-
109
- .fa-media-control::file-selector-button {
110
- height: 1.5rem;
111
- margin: -0.125rem 0.5rem -0.125rem -0.125rem;
112
- border: 0;
113
- background: transparent;
114
- color: inherit;
115
- font: inherit;
116
- font-size: 0.875rem;
117
- font-weight: 500;
118
- }
119
-
108
+
109
+ .fa-media-control::file-selector-button {
110
+ height: 1.5rem;
111
+ margin: -0.125rem 0.5rem -0.125rem -0.125rem;
112
+ border: 0;
113
+ background: transparent;
114
+ color: inherit;
115
+ font: inherit;
116
+ font-size: 0.875rem;
117
+ font-weight: 500;
118
+ }
119
+
120
120
  .fa-media-panel button {
121
121
  display: inline-flex;
122
122
  min-height: 2rem;
@@ -131,9 +131,9 @@
131
131
  font: inherit;
132
132
  font-size: 0.875rem;
133
133
  font-weight: 500;
134
- cursor: pointer;
135
- }
136
-
134
+ cursor: pointer;
135
+ }
136
+
137
137
  .fa-media-panel button:disabled {
138
138
  cursor: not-allowed;
139
139
  opacity: 0.5;
@@ -158,12 +158,12 @@
158
158
  gap: 0.5rem;
159
159
  align-items: center;
160
160
  }
161
-
162
- .fa-media-table {
163
- width: 100%;
164
- border-collapse: collapse;
165
- }
166
-
161
+
162
+ .fa-media-table {
163
+ width: 100%;
164
+ border-collapse: collapse;
165
+ }
166
+
167
167
  .fa-media-table th,
168
168
  .fa-media-table td {
169
169
  text-align: left;
@@ -193,14 +193,14 @@
193
193
  .fa-media-badge--pending_upload {
194
194
  background: var(--fa-media-badge-processing-bg);
195
195
  }
196
-
197
- .fa-media-progress {
198
- display: flex;
199
- align-items: center;
200
- gap: 0.5rem;
201
- margin: 0.75rem 0;
202
- }
203
-
196
+
197
+ .fa-media-progress {
198
+ display: flex;
199
+ align-items: center;
200
+ gap: 0.5rem;
201
+ margin: 0.75rem 0;
202
+ }
203
+
204
204
  .fa-media-danger,
205
205
  .fa-media-danger-zone {
206
206
  color: var(--fa-media-danger-fg);