create-quilltap-theme 2.0.10 → 2.0.11
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/dist/index.js
CHANGED
|
@@ -123,6 +123,24 @@ async function scaffoldBundle(config) {
|
|
|
123
123
|
"utf-8"
|
|
124
124
|
);
|
|
125
125
|
success("Created fonts/");
|
|
126
|
+
const iconsDir = path.join(destPath, "icons");
|
|
127
|
+
fs.mkdirSync(iconsDir, { recursive: true });
|
|
128
|
+
fs.writeFileSync(
|
|
129
|
+
path.join(iconsDir, ".gitkeep"),
|
|
130
|
+
[
|
|
131
|
+
"# Place icon override assets here (.svg or .webp) and map them in theme.json:",
|
|
132
|
+
"#",
|
|
133
|
+
'# "icons": {',
|
|
134
|
+
'# "settings": "icons/settings.svg", // .svg keeps currentColor tinting',
|
|
135
|
+
'# "brand": "icons/brand.webp" // .webp bakes in its own color',
|
|
136
|
+
"# }",
|
|
137
|
+
"#",
|
|
138
|
+
"# Icon names must match Quilltap's built-in icon names. Unmatched names are ignored.",
|
|
139
|
+
""
|
|
140
|
+
].join("\n"),
|
|
141
|
+
"utf-8"
|
|
142
|
+
);
|
|
143
|
+
success("Created icons/");
|
|
126
144
|
heading("Done! Next steps:");
|
|
127
145
|
log(` ${colors.dim}# Edit your theme:${colors.reset}`);
|
|
128
146
|
log(` ${colors.cyan}cd ${config.themeId}${colors.reset}`);
|
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ This is a `.qtap-theme` bundle — a simple directory (or zip archive) containin
|
|
|
14
14
|
├── tokens.json # Design tokens (colors, typography, spacing, effects)
|
|
15
15
|
├── styles.css # CSS overrides (optional)
|
|
16
16
|
├── fonts/ # Custom font files (optional)
|
|
17
|
+
├── icons/ # Icon override assets (optional)
|
|
17
18
|
└── README.md # This file
|
|
18
19
|
```
|
|
19
20
|
|
|
@@ -24,6 +25,29 @@ This is a `.qtap-theme` bundle — a simple directory (or zip archive) containin
|
|
|
24
25
|
- **Spacing/Radius**: Edit `tokens.json` → `spacing` section
|
|
25
26
|
- **Component styles**: Edit `styles.css` for custom CSS overrides
|
|
26
27
|
- **Custom fonts**: Add `.woff2` files to `fonts/` and reference them in `theme.json`
|
|
28
|
+
- **Custom icons**: Add `.svg` or `.webp` files to `icons/` and map them in `theme.json` (see below)
|
|
29
|
+
|
|
30
|
+
## Custom icons
|
|
31
|
+
|
|
32
|
+
Quilltap renders its UI icons through a central registry, so a theme can replace
|
|
33
|
+
any of them. Drop replacement assets into `icons/` and add an `icons` map to
|
|
34
|
+
`theme.json`, keyed by Quilltap's built-in icon name:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"icons": {
|
|
39
|
+
"settings": "icons/settings.svg",
|
|
40
|
+
"brand": "icons/brand.webp"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- **`.svg` overrides** are tinted by the current text color, exactly like the
|
|
46
|
+
built-in icons — good for monochrome glyphs that should follow the theme.
|
|
47
|
+
- **`.webp` overrides** are drawn in full color — good for textured or
|
|
48
|
+
multi-color marks (the `brand` quill is always drawn in full color).
|
|
49
|
+
- Icon names must match Quilltap's built-in names; unknown names are ignored.
|
|
50
|
+
Run `quilltap themes validate` to catch typos and bad asset paths.
|
|
27
51
|
|
|
28
52
|
## Installing
|
|
29
53
|
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import {
|
|
4
4
|
ColorPalette,
|
|
5
|
+
Icons,
|
|
5
6
|
Typography,
|
|
6
7
|
Spacing,
|
|
7
8
|
Buttons,
|
|
@@ -23,6 +24,12 @@ export const Colors: StoryObj = {
|
|
|
23
24
|
render: () => <ColorPalette />,
|
|
24
25
|
};
|
|
25
26
|
|
|
27
|
+
// Icons
|
|
28
|
+
export const IconReference: StoryObj = {
|
|
29
|
+
name: 'Icons',
|
|
30
|
+
render: () => <Icons />,
|
|
31
|
+
};
|
|
32
|
+
|
|
26
33
|
// Typography
|
|
27
34
|
export const Fonts: StoryObj = {
|
|
28
35
|
name: 'Typography',
|