@happyvertical/smrt-assets 0.55.11 → 0.55.18

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.
@@ -229,12 +229,14 @@ const isLargeFile = $derived((file?.size ?? 0) > 2 * 1024 * 1024);
229
229
  </Modal>
230
230
 
231
231
  <style>
232
+ @layer smrt.reset, smrt.structure, smrt.theme;
233
+ @layer smrt.theme {
232
234
  .create-error {
233
235
  margin: var(--smrt-spacing-2, 0.5rem) 0 0;
234
236
  padding: var(--smrt-spacing-2, 0.5rem) var(--smrt-spacing-3, 0.75rem);
235
237
  border-radius: var(--smrt-radius-medium, 0.5rem);
236
- background: var(--smrt-color-error-container, #fde8e6);
237
- color: var(--smrt-color-on-error-container, #410002);
238
+ background: var(--smrt-color-error-container);
239
+ color: var(--smrt-color-on-error-container);
238
240
  font-size: var(--smrt-typography-body-small-size, 0.8rem);
239
241
  }
240
242
 
@@ -245,7 +247,7 @@ const isLargeFile = $derived((file?.size ?? 0) > 2 * 1024 * 1024);
245
247
  align-items: center;
246
248
  justify-content: center;
247
249
  padding: var(--smrt-spacing-8, 2rem);
248
- border: 2px dashed var(--smrt-color-outline-variant, #d1d5db);
250
+ border: 2px dashed var(--smrt-color-outline-variant);
249
251
  border-radius: var(--smrt-radius-medium, 0.5rem);
250
252
  cursor: pointer;
251
253
  transition: all 150ms ease;
@@ -253,25 +255,25 @@ const isLargeFile = $derived((file?.size ?? 0) > 2 * 1024 * 1024);
253
255
  }
254
256
 
255
257
  .dropzone:hover, .dropzone--active {
256
- border-color: var(--smrt-color-primary, #005ac1);
258
+ border-color: var(--smrt-color-primary);
257
259
  background: var(--smrt-color-primary-container, rgba(0, 90, 193, 0.05));
258
260
  }
259
261
 
260
262
  .dropzone__icon {
261
- color: var(--smrt-color-on-surface-variant, #6b7280);
263
+ color: var(--smrt-color-on-surface-variant);
262
264
  margin-bottom: var(--smrt-spacing-3, 0.75rem);
263
265
  }
264
266
 
265
267
  .dropzone__text {
266
268
  margin: 0;
267
269
  font-weight: var(--smrt-typography-weight-medium, 500);
268
- color: var(--smrt-color-on-surface, #111827);
270
+ color: var(--smrt-color-on-surface);
269
271
  }
270
272
 
271
273
  .dropzone__hint {
272
274
  margin: var(--smrt-spacing-1, 0.25rem) 0 0;
273
275
  font-size: var(--smrt-typography-body-small-size, 0.8rem);
274
- color: var(--smrt-color-on-surface-variant, #9ca3af);
276
+ color: var(--smrt-color-on-surface-variant);
275
277
  }
276
278
 
277
279
  .dropzone__input {
@@ -284,7 +286,7 @@ const isLargeFile = $derived((file?.size ?? 0) > 2 * 1024 * 1024);
284
286
  align-items: center;
285
287
  gap: var(--smrt-spacing-3, 0.75rem);
286
288
  padding: var(--smrt-spacing-3, 0.75rem);
287
- background: var(--smrt-color-surface-container-low, #f9fafb);
289
+ background: var(--smrt-color-surface-container-low);
288
290
  border-radius: var(--smrt-radius-medium, 0.5rem);
289
291
  margin-bottom: var(--smrt-spacing-4, 1rem);
290
292
  }
@@ -303,7 +305,7 @@ const isLargeFile = $derived((file?.size ?? 0) > 2 * 1024 * 1024);
303
305
  align-items: center;
304
306
  justify-content: center;
305
307
  font-size: var(--smrt-typography-headline-small-size, 1.5rem);
306
- background: var(--smrt-color-surface-container, #f3f4f6);
308
+ background: var(--smrt-color-surface-container);
307
309
  border-radius: var(--smrt-radius-small, 0.25rem);
308
310
  }
309
311
 
@@ -324,14 +326,14 @@ const isLargeFile = $derived((file?.size ?? 0) > 2 * 1024 * 1024);
324
326
  .file-preview__size {
325
327
  display: block;
326
328
  font-size: var(--smrt-typography-label-medium-size, 0.75rem);
327
- color: var(--smrt-color-on-surface-variant, #6b7280);
329
+ color: var(--smrt-color-on-surface-variant);
328
330
  }
329
331
 
330
332
  .file-preview__warning {
331
333
  display: block;
332
334
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
333
- color: var(--smrt-color-error, #dc2626);
334
- margin-top: var(--smrt-spacing-1, 4px);
335
+ color: var(--smrt-color-error);
336
+ margin-top: var(--smrt-spacing-1);
335
337
  }
336
338
 
337
339
  /* file-preview__remove renders via <Button class="file-preview__remove">
@@ -344,13 +346,13 @@ const isLargeFile = $derived((file?.size ?? 0) > 2 * 1024 * 1024);
344
346
  padding: 0;
345
347
  border: none;
346
348
  background: transparent;
347
- color: var(--smrt-color-on-surface-variant, #6b7280);
348
- border-radius: var(--smrt-radius-full, 9999px);
349
+ color: var(--smrt-color-on-surface-variant);
350
+ border-radius: var(--smrt-radius-full);
349
351
  }
350
352
 
351
353
  .file-preview :global(.file-preview__remove:hover) {
352
- background: var(--smrt-color-surface-container, #f3f4f6);
353
- color: var(--smrt-color-error, #dc2626);
354
+ background: var(--smrt-color-surface-container);
355
+ color: var(--smrt-color-error);
354
356
  }
355
357
 
356
358
  /* Form fields */
@@ -369,14 +371,14 @@ const isLargeFile = $derived((file?.size ?? 0) > 2 * 1024 * 1024);
369
371
  .form-label {
370
372
  font-size: var(--smrt-typography-body-medium-size, 0.875rem);
371
373
  font-weight: var(--smrt-typography-weight-medium, 500);
372
- color: var(--smrt-color-on-surface, #111827);
374
+ color: var(--smrt-color-on-surface);
373
375
  }
374
376
 
375
377
  .form-label__warning {
376
378
  font-weight: var(--smrt-typography-weight-normal, 400);
377
379
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
378
- color: var(--smrt-color-error, #dc2626);
379
- margin-left: var(--smrt-spacing-1, 4px);
380
+ color: var(--smrt-color-error);
381
+ margin-left: var(--smrt-spacing-1);
380
382
  }
381
-
383
+ }
382
384
  </style>
@@ -93,7 +93,7 @@ async function confirmRemove() {
93
93
  </div>
94
94
  {/snippet}
95
95
 
96
- <section class="attachment-list" aria-label={title ?? t(M['assets.attachments.title'])} aria-busy={loading}>
96
+ <section class="attachment-list" aria-label={title ?? t(M['assets.attachments.title'])} aria-busy={loading} data-smrt-component="AttachmentList">
97
97
  <h3>{title ?? t(M['assets.attachments.title'])}</h3>
98
98
  {#if message}<p role="alert">{message}</p>{/if}
99
99
  {#if loading}<p role="status">{t(M['assets.attachments.loading'])}</p>{/if}
@@ -137,6 +137,8 @@ async function confirmRemove() {
137
137
  </section>
138
138
 
139
139
  <style>
140
+ @layer smrt.reset, smrt.structure, smrt.theme;
141
+ @layer smrt.theme {
140
142
  .attachment-list { min-width: 0; overflow-wrap: anywhere; }
141
143
  ul { list-style: none; padding: 0; }
142
144
  ul, ol { display: grid; gap: var(--smrt-spacing-4); }
@@ -146,4 +148,5 @@ async function confirmRemove() {
146
148
  .metadata { color: var(--smrt-color-on-surface-variant); }
147
149
  h3, h4, p { margin: 0; }
148
150
  .links :global(a) { max-width: 100%; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
151
+ }
149
152
  </style>
@@ -6,8 +6,13 @@ import AttachmentUpload from './AttachmentUpload.svelte';
6
6
  export interface Props extends AttachmentPanelProps {}
7
7
  let { upload, ...list }: Props = $props();
8
8
  </script>
9
- <div class="attachment-panel">
9
+ <div class="attachment-panel" data-smrt-component="AttachmentPanel">
10
10
  <AttachmentList {...list} />
11
11
  {#if upload}<AttachmentUpload {...upload} />{/if}
12
12
  </div>
13
- <style>.attachment-panel { display: grid; gap: var(--smrt-spacing-4); min-width: 0; }</style>
13
+ <style>
14
+ @layer smrt.reset, smrt.structure, smrt.theme;
15
+ @layer smrt.theme {
16
+ .attachment-panel { display: grid; gap: var(--smrt-spacing-4); min-width: 0; }
17
+ }
18
+ </style>
@@ -72,10 +72,13 @@ const fileHelp = $derived(
72
72
  </div>
73
73
  </Form>
74
74
  {:else}
75
- <p>{t(M['assets.attachments.readonly'])}</p>
75
+ <p data-smrt-component="AttachmentUpload">{t(M['assets.attachments.readonly'])}</p>
76
76
  {/if}
77
77
 
78
78
  <style>
79
+ @layer smrt.reset, smrt.structure, smrt.theme;
80
+ @layer smrt.theme {
79
81
  .upload-fields { display: grid; gap: var(--smrt-spacing-3); min-width: 0; overflow-wrap: anywhere; }
80
82
  p { margin: 0; }
83
+ }
81
84
  </style>
@@ -85,6 +85,8 @@ function handleEdit() {
85
85
  </div>
86
86
 
87
87
  <style>
88
+ @layer smrt.reset, smrt.structure, smrt.theme;
89
+ @layer smrt.theme {
88
90
  .preview-shell {
89
91
  display: grid;
90
92
  gap: 1rem;
@@ -110,7 +112,7 @@ function handleEdit() {
110
112
  font-size: var(--smrt-typography-label-medium-size, 0.75rem);
111
113
  letter-spacing: var(--smrt-typography-label-medium-tracking, 0.12em);
112
114
  text-transform: uppercase;
113
- color: var(--smrt-color-primary, #0f766e);
115
+ color: var(--smrt-color-primary);
114
116
  }
115
117
 
116
118
  /* The open-preview button renders via <Button variant="primary"> (issue
@@ -119,13 +121,14 @@ function handleEdit() {
119
121
  .preview-card :global(.preview-open) {
120
122
  justify-self: start;
121
123
  border: 0;
122
- border-radius: var(--smrt-radius-full, 9999px);
124
+ border-radius: var(--smrt-radius-full);
123
125
  padding: 0.75rem 1rem;
124
126
  font-weight: var(--smrt-typography-weight-semibold, 600);
125
127
  }
126
128
 
127
129
  .status {
128
- color: var(--smrt-color-primary, #0f766e);
130
+ color: var(--smrt-color-primary);
129
131
  font-size: var(--smrt-typography-body-large-size, 0.95rem);
130
132
  }
133
+ }
131
134
  </style>
@@ -19,4 +19,9 @@ function submit(event: SubmitEvent & { currentTarget: HTMLFormElement }) {
19
19
  <AttachmentPanel attachments={assetAttachmentMockAttachments}
20
20
  upload={{ action: '', canUpload, description, message, help: 'Preview accepts a local file but never sends it.', hiddenFields: [{ name: 'requestId', value: 'preview-request-retained' }], onsubmit: submit }} />
21
21
  </div>
22
- <style>.preview { display: grid; gap: var(--smrt-spacing-4); }</style>
22
+ <style>
23
+ @layer smrt.reset, smrt.structure, smrt.theme;
24
+ @layer smrt.theme {
25
+ .preview { display: grid; gap: var(--smrt-spacing-4); }
26
+ }
27
+ </style>
@@ -80,6 +80,8 @@ function handleCreate(data: {
80
80
  </div>
81
81
 
82
82
  <style>
83
+ @layer smrt.reset, smrt.structure, smrt.theme;
84
+ @layer smrt.theme {
83
85
  .preview-shell {
84
86
  display: grid;
85
87
  gap: 1rem;
@@ -108,7 +110,7 @@ function handleCreate(data: {
108
110
  font-size: var(--smrt-typography-label-medium-size, 0.75rem);
109
111
  letter-spacing: var(--smrt-typography-label-medium-tracking, 0.12em);
110
112
  text-transform: uppercase;
111
- color: var(--smrt-color-primary, #0f766e);
113
+ color: var(--smrt-color-primary);
112
114
  }
113
115
 
114
116
  /* The open-modal button renders via <Button variant="primary"> (issue #1589).
@@ -117,13 +119,13 @@ function handleCreate(data: {
117
119
  .preview-card :global(.preview-open) {
118
120
  justify-self: start;
119
121
  border: 0;
120
- border-radius: var(--smrt-radius-full, 9999px);
122
+ border-radius: var(--smrt-radius-full);
121
123
  padding: 0.75rem 1rem;
122
124
  font-weight: var(--smrt-typography-weight-semibold, 600);
123
125
  }
124
126
 
125
127
  .status {
126
- color: var(--smrt-color-primary, #0f766e);
128
+ color: var(--smrt-color-primary);
127
129
  font-size: var(--smrt-typography-body-large-size, 0.95rem);
128
130
  }
129
131
 
@@ -142,10 +144,11 @@ function handleCreate(data: {
142
144
  font-size: var(--smrt-typography-label-medium-size, 0.75rem);
143
145
  letter-spacing: var(--smrt-typography-label-medium-tracking, 0.08em);
144
146
  text-transform: uppercase;
145
- color: var(--smrt-color-on-surface-variant, #5b6574);
147
+ color: var(--smrt-color-on-surface-variant);
146
148
  }
147
149
 
148
150
  .summary dd {
149
- color: var(--smrt-color-on-surface, #172033);
151
+ color: var(--smrt-color-on-surface);
150
152
  }
153
+ }
151
154
  </style>
@@ -90,6 +90,8 @@ const customActions = [
90
90
  </div>
91
91
 
92
92
  <style>
93
+ @layer smrt.reset, smrt.structure, smrt.theme;
94
+ @layer smrt.theme {
93
95
  .assets-route {
94
96
  max-width: 1440px;
95
97
  margin: 0 auto;
@@ -108,7 +110,7 @@ const customActions = [
108
110
 
109
111
  .assets-route__eyebrow {
110
112
  margin: 0 0 0.5rem;
111
- color: var(--smrt-color-primary, #0f766e);
113
+ color: var(--smrt-color-primary);
112
114
  font-size: var(--smrt-typography-label-medium-size, 0.75rem);
113
115
  font-weight: var(--smrt-typography-weight-bold, 700);
114
116
  letter-spacing: var(--smrt-typography-label-medium-tracking, 0.08em);
@@ -123,7 +125,7 @@ const customActions = [
123
125
  .assets-route__lede {
124
126
  max-width: 56rem;
125
127
  margin: 0.75rem 0 0;
126
- color: var(--smrt-color-on-surface-variant, #475569);
128
+ color: var(--smrt-color-on-surface-variant);
127
129
  line-height: 1.6;
128
130
  }
129
131
 
@@ -145,8 +147,8 @@ const customActions = [
145
147
  }
146
148
 
147
149
  .assets-route__panel {
148
- background: var(--smrt-color-surface, #fff);
149
- border: 1px solid var(--smrt-color-outline-variant, #dbe3ef);
150
+ background: var(--smrt-color-surface);
151
+ border: 1px solid var(--smrt-color-outline-variant);
150
152
  border-radius: 1rem;
151
153
  padding: 1.25rem;
152
154
  box-shadow: var(--smrt-elevation-5, 0 10px 30px color-mix(in srgb, var(--smrt-color-shadow) 6%, transparent));
@@ -159,15 +161,15 @@ const customActions = [
159
161
 
160
162
  .assets-route__empty {
161
163
  margin: 0;
162
- color: var(--smrt-color-on-surface-variant, #64748b);
164
+ color: var(--smrt-color-on-surface-variant);
163
165
  }
164
166
 
165
167
  .assets-route__message {
166
168
  margin: 0.75rem 0 0;
167
169
  padding: 0.75rem 0.875rem;
168
170
  border-radius: 0.75rem;
169
- background: var(--smrt-color-primary-container, #ecfeff);
170
- color: var(--smrt-color-on-primary-container, #155e75);
171
+ background: var(--smrt-color-primary-container);
172
+ color: var(--smrt-color-on-primary-container);
171
173
  }
172
174
 
173
175
  .assets-route__selection-list {
@@ -184,13 +186,13 @@ const customActions = [
184
186
  gap: 0.25rem;
185
187
  padding: 0.625rem 0.75rem;
186
188
  border-radius: 0.75rem;
187
- background: var(--smrt-color-surface-container, #f8fafc);
188
- border: 1px solid var(--smrt-color-outline-variant, #e2e8f0);
189
+ background: var(--smrt-color-surface-container);
190
+ border: 1px solid var(--smrt-color-outline-variant);
189
191
  }
190
192
 
191
193
  .assets-route__selection-list code {
192
194
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
193
- color: var(--smrt-color-on-primary-container, #155e75);
195
+ color: var(--smrt-color-on-primary-container);
194
196
  }
195
197
 
196
198
  @media (max-width: 960px) {
@@ -206,4 +208,5 @@ const customActions = [
206
208
  min-height: 640px;
207
209
  }
208
210
  }
211
+ }
209
212
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-assets",
3
- "version": "0.55.11",
3
+ "version": "0.55.18",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Asset management system with versioning, metadata, and AI-powered operations for SMRT framework",
6
6
  "type": "module",
@@ -44,16 +44,16 @@
44
44
  }
45
45
  },
46
46
  "dependencies": {
47
- "@happyvertical/ai": "^0.103.1",
48
- "@happyvertical/files": "^0.103.1",
49
- "@happyvertical/logger": "^0.103.1",
50
- "@happyvertical/smrt-core": "0.55.11",
51
- "@happyvertical/smrt-tags": "0.55.11",
52
- "@happyvertical/smrt-tenancy": "0.55.11",
53
- "@happyvertical/smrt-types": "0.55.11",
54
- "@happyvertical/smrt-ui": "0.55.11",
55
- "@happyvertical/sql": "^0.103.1",
56
- "@happyvertical/utils": "^0.103.1"
47
+ "@happyvertical/ai": "^0.103.4",
48
+ "@happyvertical/files": "^0.103.4",
49
+ "@happyvertical/logger": "^0.103.4",
50
+ "@happyvertical/smrt-core": "0.55.18",
51
+ "@happyvertical/smrt-tags": "0.55.18",
52
+ "@happyvertical/smrt-tenancy": "0.55.18",
53
+ "@happyvertical/smrt-types": "0.55.18",
54
+ "@happyvertical/smrt-ui": "0.55.18",
55
+ "@happyvertical/sql": "^0.103.4",
56
+ "@happyvertical/utils": "^0.103.4"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "svelte": "^5.57.0"
@@ -64,8 +64,8 @@
64
64
  }
65
65
  },
66
66
  "devDependencies": {
67
- "@happyvertical/smrt-playground": "0.55.11",
68
- "@happyvertical/smrt-vitest": "0.55.11",
67
+ "@happyvertical/smrt-playground": "0.55.18",
68
+ "@happyvertical/smrt-vitest": "0.55.18",
69
69
  "@sveltejs/adapter-auto": "^7.0.1",
70
70
  "@sveltejs/kit": "2.69.1",
71
71
  "@sveltejs/package": "^2.5.8",