@nqmcreative/ui 0.2.0 → 0.2.1

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/cli/index.mjs CHANGED
@@ -191,9 +191,22 @@ async function init() {
191
191
  if (css.includes(`@nqmcreative/ui/${style.name}/theme.css`)) {
192
192
  skip(`${project.cssRel} already imports the theme`);
193
193
  } else {
194
- const body = css.trim()
195
- ? `${lines.join('\n')}\n\n${css.replace(/@import 'tailwindcss';\n?/, '').trim()}\n`
196
- : `${lines.join('\n')}\n`;
194
+ // Drop whatever this package left here before — an older layout's
195
+ // `@nqmcreative/ui/theme.css`, another style's, and the `@source` that
196
+ // went with them. Keeping those would either fight the new tokens or fail
197
+ // to resolve, so a rewrite is cleaner than an append.
198
+ const stale =
199
+ /^@import ['"]@nqmcreative\/ui\/[^'"]+\.css['"];$|^@source ['"][^'"]*@nqmcreative\/ui[^'"]*['"];$/;
200
+
201
+ const kept = css
202
+ .split('\n')
203
+ .filter((line) => !stale.test(line.trim()))
204
+ .join('\n')
205
+ .replace(/@import ['"]tailwindcss['"];\n?/, '')
206
+ .replace(/\n{3,}/g, '\n\n')
207
+ .trim();
208
+
209
+ const body = kept ? `${lines.join('\n')}\n\n${kept}\n` : `${lines.join('\n')}\n`;
197
210
  await write(project.css, body, project.cssRel);
198
211
  }
199
212
 
@@ -40,7 +40,7 @@ export { default as DatePicker } from './DatePicker.svelte';
40
40
  export { default as Calendar } from './Calendar.svelte';
41
41
  export { default as Dropzone } from './Dropzone.svelte';
42
42
  export { default as Badge } from './Badge.svelte';
43
- export type { BadgeTone, BadgeVariant, BadgeSize } from './Badge.svelte';
43
+ export type { BadgeVariant, BadgeSize } from './Badge.svelte';
44
44
  export { default as Avatar } from './Avatar.svelte';
45
45
  export type { AvatarSize } from './Avatar.svelte';
46
46
  export { default as AvatarGroup } from './AvatarGroup.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nqmcreative/ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Svelte 5 + Tailwind CSS v4 component library — two styles (matte, paper), 65 components each, one shared behaviour core. No runtime dependencies.",
5
5
  "scripts": {
6
6
  "dev": "vite dev",