@postal-music/icons 0.1.6 → 0.1.7
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 +77 -0
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +67 -1
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.js +46 -0
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +45 -1
- package/dist/index.native.mjs.map +1 -1
- package/dist/types/icons/general/Recording02.d.ts +7 -0
- package/dist/types/icons/general/Target05Icon.d.ts +7 -0
- package/dist/types/icons/general/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/icons/general/Recording02.native.tsx +28 -0
- package/src/icons/general/Recording02.web.tsx +39 -0
- package/src/icons/general/Target05Icon.native.tsx +28 -0
- package/src/icons/general/Target05Icon.web.tsx +39 -0
- package/src/icons/general/index.ts +2 -0
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @postal-music/icons
|
|
2
|
+
|
|
3
|
+
Shared icon library for Postal — React (web) and React Native, from one source.
|
|
4
|
+
|
|
5
|
+
Each icon lives as a pair: `FooIcon.web.tsx` and `FooIcon.native.tsx`. At build time `tsup` resolves the platform extension and emits two bundles (`dist/index.*` for web, `dist/index.native.*` for native). Consumers import from a single specifier; bundlers/Metro pick the right entry via the `exports` map in `package.json`.
|
|
6
|
+
|
|
7
|
+
## Publishing
|
|
8
|
+
|
|
9
|
+
Published to npm as a public scoped package under the `@postal-music` org.
|
|
10
|
+
|
|
11
|
+
### Prerequisites
|
|
12
|
+
|
|
13
|
+
- npm login with publish rights on the `@postal-music` org:
|
|
14
|
+
```sh
|
|
15
|
+
npm whoami # should print your npm username
|
|
16
|
+
npm access list packages @postal-music # should list @postal-music/icons
|
|
17
|
+
```
|
|
18
|
+
If not logged in: `npm login`.
|
|
19
|
+
- Clean working tree in this package (`packages/postal-icons`). `package.json` has `"files": ["dist", "src"]`, so only those are shipped — but a dirty `src/` will still go out.
|
|
20
|
+
|
|
21
|
+
### Release workflow
|
|
22
|
+
|
|
23
|
+
Run all commands from `packages/postal-icons`.
|
|
24
|
+
|
|
25
|
+
1. **Make sure the build is current.**
|
|
26
|
+
```sh
|
|
27
|
+
npm run build
|
|
28
|
+
```
|
|
29
|
+
This runs `tsup` (web + native bundles), `tsc -p tsconfig.build.json` (types into `dist/types`), then `scripts/strip-web-suffix.mjs` (renames `*.web.d.ts` → `*.d.ts` so the declarations match the exports map).
|
|
30
|
+
|
|
31
|
+
2. **Bump the version.** Pick one:
|
|
32
|
+
```sh
|
|
33
|
+
npm version patch # 0.1.7 → 0.1.8 (icon added, bug fix)
|
|
34
|
+
npm version minor # 0.1.7 → 0.2.0 (new category, API addition)
|
|
35
|
+
npm version major # 0.1.7 → 1.0.0 (breaking rename/removal)
|
|
36
|
+
```
|
|
37
|
+
This rewrites `package.json` and creates a git commit + tag in this sub-repo (`postal-icons` is its own git repo — see the monorepo `CLAUDE.md`).
|
|
38
|
+
|
|
39
|
+
3. **Publish.**
|
|
40
|
+
```sh
|
|
41
|
+
npm publish
|
|
42
|
+
```
|
|
43
|
+
`publishConfig.access` is already `public`, so no `--access public` flag needed.
|
|
44
|
+
|
|
45
|
+
4. **Push the version commit and tag.**
|
|
46
|
+
```sh
|
|
47
|
+
git push && git push --tags
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
5. **Verify.**
|
|
51
|
+
```sh
|
|
52
|
+
npm view @postal-music/icons version
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Dry run
|
|
56
|
+
|
|
57
|
+
Before publishing, inspect exactly what will be shipped:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
npm pack --dry-run
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This lists every file that would land in the tarball without touching the registry. Make sure `dist/` looks complete and nothing sensitive snuck in.
|
|
64
|
+
|
|
65
|
+
### Bumping consumers
|
|
66
|
+
|
|
67
|
+
After publish, update the `@postal-music/icons` dependency in any consuming package (`postal-ac-frontend`, `postal-admin`, `postal-mobile`, `postal-desktop`, …) and run their respective install.
|
|
68
|
+
|
|
69
|
+
## Adding an icon
|
|
70
|
+
|
|
71
|
+
1. Drop the SVG into the right category under `src/icons/<category>/`:
|
|
72
|
+
- `FooIcon.web.tsx` — uses `<svg>` / `<path>`, stroke `currentColor`.
|
|
73
|
+
- `FooIcon.native.tsx` — uses `react-native-svg`'s `<Svg>` / `<Path>`, same path data.
|
|
74
|
+
2. Export it from that category's `index.ts` in alphabetical position.
|
|
75
|
+
3. Run `npm run build` to confirm both bundles compile.
|
|
76
|
+
|
|
77
|
+
Use `currentColor` for strokes/fills so consumers can theme via CSS / `color` prop. Keep the source `viewBox` (usually `0 0 18 18` or `0 0 24 24`); don't rescale paths.
|
package/dist/index.js
CHANGED
|
@@ -3103,6 +3103,39 @@ var Recording01Icon = ({
|
|
|
3103
3103
|
);
|
|
3104
3104
|
};
|
|
3105
3105
|
var Recordering01_web_default = Recording01Icon;
|
|
3106
|
+
var Recording02Icon = ({
|
|
3107
|
+
title = "Recording",
|
|
3108
|
+
className,
|
|
3109
|
+
size = 18,
|
|
3110
|
+
...props
|
|
3111
|
+
}) => {
|
|
3112
|
+
const ariaLabel = props["aria-label"] ?? title;
|
|
3113
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3114
|
+
"svg",
|
|
3115
|
+
{
|
|
3116
|
+
width: size,
|
|
3117
|
+
height: size,
|
|
3118
|
+
viewBox: "0 0 18 18",
|
|
3119
|
+
fill: "none",
|
|
3120
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3121
|
+
role: "img",
|
|
3122
|
+
"aria-label": ariaLabel,
|
|
3123
|
+
className,
|
|
3124
|
+
...props,
|
|
3125
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3126
|
+
"path",
|
|
3127
|
+
{
|
|
3128
|
+
d: "M2.25 7.5L2.25 10.5M5.625 8.25V9.75M9 4.5V13.5M12.375 2.25V15.75M15.75 7.5V10.5",
|
|
3129
|
+
stroke: "currentColor",
|
|
3130
|
+
strokeWidth: "1.6",
|
|
3131
|
+
strokeLinecap: "round",
|
|
3132
|
+
strokeLinejoin: "round"
|
|
3133
|
+
}
|
|
3134
|
+
)
|
|
3135
|
+
}
|
|
3136
|
+
);
|
|
3137
|
+
};
|
|
3138
|
+
var Recording02_web_default = Recording02Icon;
|
|
3106
3139
|
var Share01Icon = ({
|
|
3107
3140
|
size = 18,
|
|
3108
3141
|
color = "currentColor",
|
|
@@ -3372,6 +3405,39 @@ var TagsIcon = ({ size = 18, className, ...props }) => /* @__PURE__ */ jsxRuntim
|
|
|
3372
3405
|
}
|
|
3373
3406
|
);
|
|
3374
3407
|
var TagsIcon_web_default = TagsIcon;
|
|
3408
|
+
var Target05Icon = ({
|
|
3409
|
+
title = "Target",
|
|
3410
|
+
className,
|
|
3411
|
+
size = 18,
|
|
3412
|
+
...props
|
|
3413
|
+
}) => {
|
|
3414
|
+
const ariaLabel = props["aria-label"] ?? title;
|
|
3415
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3416
|
+
"svg",
|
|
3417
|
+
{
|
|
3418
|
+
width: size,
|
|
3419
|
+
height: size,
|
|
3420
|
+
viewBox: "0 0 18 18",
|
|
3421
|
+
fill: "none",
|
|
3422
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3423
|
+
role: "img",
|
|
3424
|
+
"aria-label": ariaLabel,
|
|
3425
|
+
className,
|
|
3426
|
+
...props,
|
|
3427
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3428
|
+
"path",
|
|
3429
|
+
{
|
|
3430
|
+
d: "M11.25 4.25522C13.0237 5.09782 14.25 6.9057 14.25 9M6.29431 13.5C4.76969 12.5813 3.75 10.9097 3.75 8.99996M16.5 9C16.5 13.1421 13.1421 16.5 9 16.5C4.85786 16.5 1.5 13.1421 1.5 9C1.5 4.85786 4.85786 1.5 9 1.5C13.1421 1.5 16.5 4.85786 16.5 9ZM11.25 9C11.25 10.2426 10.2426 11.25 9 11.25C7.75736 11.25 6.75 10.2426 6.75 9C6.75 7.75736 7.75736 6.75 9 6.75C10.2426 6.75 11.25 7.75736 11.25 9Z",
|
|
3431
|
+
stroke: "currentColor",
|
|
3432
|
+
strokeWidth: "1.6",
|
|
3433
|
+
strokeLinecap: "round",
|
|
3434
|
+
strokeLinejoin: "round"
|
|
3435
|
+
}
|
|
3436
|
+
)
|
|
3437
|
+
}
|
|
3438
|
+
);
|
|
3439
|
+
};
|
|
3440
|
+
var Target05Icon_web_default = Target05Icon;
|
|
3375
3441
|
var ThumbsDownIcon = ({
|
|
3376
3442
|
size = 18,
|
|
3377
3443
|
className,
|
|
@@ -5524,6 +5590,7 @@ exports.PostalIcon = PostalIcon_web_default;
|
|
|
5524
5590
|
exports.PreviousTrackIcon = PreviousTrackIcon_web_default;
|
|
5525
5591
|
exports.QuestionCircleIcon = QuestionCircleIcon_web_default;
|
|
5526
5592
|
exports.Recording01Icon = Recordering01_web_default;
|
|
5593
|
+
exports.Recording02Icon = Recording02_web_default;
|
|
5527
5594
|
exports.RefreshIcon = RefreshIcon;
|
|
5528
5595
|
exports.Repeat01Icon = Repeat01Icon;
|
|
5529
5596
|
exports.Repeat02Icon = Repeat02Icon_web_default;
|
|
@@ -5552,6 +5619,7 @@ exports.Stars04Icon = Stars04Icon_web_default;
|
|
|
5552
5619
|
exports.Stars06Icon = Stars06Icon_web_default;
|
|
5553
5620
|
exports.SwitchHorizontal02Icon = SwitchHorizontal02Icon_web_default;
|
|
5554
5621
|
exports.TagsIcon = TagsIcon_web_default;
|
|
5622
|
+
exports.Target05Icon = Target05Icon_web_default;
|
|
5555
5623
|
exports.TenSecondsBackIcon = SecondsBackIcon_web_default;
|
|
5556
5624
|
exports.TenSecondsForwardIcon = TenSecondsForwardIcon_web_default;
|
|
5557
5625
|
exports.ThumbsDownIcon = ThumbsDownIcon;
|