@sybilion/uilib 1.0.20 → 1.0.21

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.
Files changed (2) hide show
  1. package/README.md +65 -32
  2. package/package.json +1 -3
package/README.md CHANGED
@@ -4,9 +4,27 @@ React UI components (Stylus modules, Radix primitives, Recharts).
4
4
 
5
5
  > This package does **not** embed app-specific contexts or API clients; the host app passes data and callbacks via props.
6
6
 
7
- ## Install from GitHub
7
+ ## Install from npm (recommended)
8
8
 
9
- Point your package manager at the repository (branch or tag as needed). **Prebuilt ESM** under `dist/esm` is committed to the repo, so consumers **do not** need to run `yarn build` inside `uilib` for the default install path.
9
+ Published as **`@sybilion/uilib`** on the public registry. No scope-specific `.npmrc` required.
10
+
11
+ ```bash
12
+ yarn add @sybilion/uilib
13
+ ```
14
+
15
+ Equivalent in `package.json`:
16
+
17
+ ```json
18
+ {
19
+ "dependencies": {
20
+ "@sybilion/uilib": "^1.0.20"
21
+ }
22
+ }
23
+ ```
24
+
25
+ ## Install from GitHub (optional)
26
+
27
+ Point your package manager at the repository (branch or tag as needed). **Prebuilt ESM** under `dist/esm` is committed to the repo, so consumers **do not** need to run `yarn build` inside `uilib` for this path.
10
28
 
11
29
  ```bash
12
30
  yarn add uilib@github:Mir-Insight/uilib#main
@@ -22,18 +40,16 @@ Equivalent in `package.json`:
22
40
  }
23
41
  ```
24
42
 
25
- ### GitHub Packages + bare `uilib` imports
43
+ ### Bare `uilib` imports + scoped install
26
44
 
27
- When consuming the published GitHub Packages build (`@Mir-Insight/uilib`) but
28
- keeping existing imports as `from 'uilib'`, add a bundler alias and matching
29
- TypeScript paths in the host app:
45
+ When the package is installed as **`@sybilion/uilib`** but you keep imports as `from 'uilib'`, add a bundler alias and matching TypeScript paths:
30
46
 
31
47
  ```json
32
48
  {
33
49
  "compilerOptions": {
34
50
  "paths": {
35
- "uilib": ["node_modules/@Mir-Insight/uilib"],
36
- "uilib/*": ["node_modules/@Mir-Insight/uilib/*"]
51
+ "uilib": ["../node_modules/@sybilion/uilib"],
52
+ "uilib/*": ["../node_modules/@sybilion/uilib/*"]
37
53
  }
38
54
  }
39
55
  }
@@ -44,12 +60,14 @@ Webpack example:
44
60
  ```js
45
61
  resolve: {
46
62
  alias: {
47
- uilib: path.join(paths.modules, '@Mir-Insight/uilib'),
63
+ uilib: path.join(paths.modules, '@sybilion/uilib'),
48
64
  },
49
65
  }
50
66
  ```
51
67
 
52
- CI installs from GitHub Packages also need npm auth:
68
+ ### Legacy: GitHub Packages (`@Mir-Insight/uilib`)
69
+
70
+ Older installs used GitHub Packages. CI needed:
53
71
 
54
72
  ```text
55
73
  @Mir-Insight:registry=https://npm.pkg.github.com/
@@ -57,41 +75,45 @@ CI installs from GitHub Packages also need npm auth:
57
75
  always-auth=true
58
76
  ```
59
77
 
78
+ Prefer **`@sybilion/uilib`** from **npmjs** for new work.
79
+
60
80
  ### Default: prebuilt (`dist/esm`)
61
81
 
62
82
  The package [`exports`](./package.json) entry `.` resolves to Rollup output and generated declarations:
63
83
 
64
84
  ```ts
65
- import { Button } from 'uilib';
85
+ import { Button } from '@sybilion/uilib';
86
+
87
+ // or, with alias: import { Button } from 'uilib';
66
88
  ```
67
89
 
68
- Use this when you want **compiled** ESM (CSS modules processed; no Stylus loader required for `uilib`). Ensure your bundler still handles standard JS/CSS imports from `node_modules` as usual.
90
+ Use this when you want **compiled** ESM (CSS modules processed; no Stylus loader required for the library). Ensure your bundler still handles standard JS/CSS imports from `node_modules` as usual.
69
91
 
70
- ### Optional: source (`src`)
92
+ ### Optional: source (`./src` subpath)
71
93
 
72
- To compile `uilib` from **TypeScript + Stylus** in your app (same as older workflows), import from the `./src` subpath:
94
+ To compile from **TypeScript + Stylus** in your app, use the `./src` export:
73
95
 
74
96
  ```ts
75
- import { Button } from 'uilib/src';
97
+ import { Button } from '@sybilion/uilib/src';
76
98
  ```
77
99
 
78
- Deep imports are supported via `uilib/src/...` (maps to files under [`src/`](./src)). Internal `#uilib/...` imports resolve through this package’s [`imports`](./package.json) field when bundling source.
100
+ Deep imports use `@sybilion/uilib/src/...` (maps to files under [`src/`](./src)). Internal `#uilib/...` imports resolve through this package’s [`imports`](./package.json) field when bundling source.
79
101
 
80
- ## Bundling from source (`uilib` / `uilib/src`)
102
+ ## Bundling from source (`uilib/src`)
81
103
 
82
104
  If you use **`uilib/src`** (or deep imports under `uilib/src/`), the host app must **compile** those files like application code:
83
105
 
84
- 1. **Include `uilib` in the TypeScript/JSX pipeline** — e.g. extend `babel-loader` / `ts-loader` `include` so it matches `node_modules/uilib` (and not only your app `src`):
106
+ 1. **Include the library in the TypeScript/JSX pipeline** — e.g. extend `babel-loader` / `ts-loader` `include` so it matches the installed package (and not only your app `src`):
85
107
 
86
108
  ```js
87
- include: [paths.src, /node_modules\/uilib/],
109
+ include: [paths.src, /node_modules\/@sybilion\/uilib/],
88
110
  ```
89
111
 
90
- 2. **Apply the same Stylus/CSS-module rules** to files under `node_modules/uilib` as you use for your own `.styl` imports.
112
+ 2. **Apply the same Stylus/CSS-module rules** to `.styl` under `node_modules/@sybilion/uilib` as you use for your own imports.
91
113
 
92
- 3. **Do not remap `#uilib`** — internal imports use the subpath pattern `#uilib/...`, resolved via this package’s `package.json` [`imports`](./package.json) field. Keep your app’s own alias (for example `@` → app `src`) as usual; it does not conflict with `#uilib`.
114
+ 3. **Do not remap `#uilib`** — internal imports use `#uilib/...`, resolved via this package’s `package.json` [`imports`](./package.json). Keep your app’s own alias (for example `@` → app `src`) as usual; it does not conflict with `#uilib`.
93
115
 
94
- If you only use the **default** entry (`import from 'uilib'`), you typically **do not** need Stylus/TS compilation for `uilib` in the consumer Webpack config.
116
+ If you only use the **default** entry (`import from '@sybilion/uilib'` or aliased `uilib`), you typically **do not** need Stylus/TS compilation for the library in the consumer Webpack config.
95
117
 
96
118
  ## Peer dependencies
97
119
 
@@ -105,9 +127,17 @@ Install these in the consuming app:
105
127
 
106
128
  Runtime dependencies of this package (Recharts, Radix, `motion`, `vaul`, `@vimeo/player`, etc.) are declared in `package.json` and should be satisfied by the consumer’s install tree.
107
129
 
108
- ## Maintainers: keeping `dist/` in sync
130
+ ## Maintainers
131
+
132
+ **npm:** log in (`npm login`), then from repo root:
133
+
134
+ ```bash
135
+ yarn publish:npm # @sybilion/uilib
136
+ ```
137
+
138
+ `publish:npm` runs `yarn build` before `npm publish`.
109
139
 
110
- After changing library **source**, regenerate and commit the prebuilt output:
140
+ **GitHub `github:` consumers:** after changing library **source**, regenerate and commit the prebuilt output:
111
141
 
112
142
  ```bash
113
143
  yarn build
@@ -128,11 +158,14 @@ These areas expect the **app** to supply behavior or data (not vendored from pro
128
158
 
129
159
  ## Scripts (this repo)
130
160
 
131
- | Script | Description |
132
- | ----------------- | --------------------------------------------------- |
133
- | `yarn dev` | Webpack dev server for the docs app |
134
- | `yarn docs:build` | Production build of docs to `build/` |
135
- | `yarn build` | Rollup ESM build to `dist/esm` |
136
- | `yarn build:ship` | Same as `yarn build` (refresh `dist` before commit) |
137
- | `yarn ts` | Typecheck (`tsc --noEmit`) |
138
- | `yarn tests` | Jest smoke tests |
161
+ | Script | Description |
162
+ | --------------------- | ------------------------------------------- |
163
+ | `yarn dev` | Webpack dev server for the docs app |
164
+ | `yarn docs:build` | Production build of docs to `build/` |
165
+ | `yarn build` | Rollup ESM build to `dist/esm` |
166
+ | `yarn build:watch` | Rollup in watch mode |
167
+ | `yarn build:compress` | Rollup build with `COMPRESS=true` |
168
+ | `yarn publish:npm` | `yarn build` then publish `@sybilion/uilib` |
169
+ | `yarn ts` | Typecheck (`tsc --noEmit`) |
170
+ | `yarn tests` | Jest smoke tests |
171
+ | `yarn release` | `standard-version` (bump changelog + tag) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sybilion/uilib",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Sybilion Design System — React UI components (Webpack + Stylus)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -47,9 +47,7 @@
47
47
  "build": "rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript",
48
48
  "build:watch": "yarn build --watch",
49
49
  "build:compress": "COMPRESS=true yarn build",
50
- "build:sybilion-ui": "rollup -c rollup.sybilion-ui.config.ts --configPlugin @rollup/plugin-typescript && rm -rf packages/sybilion-ui/dist/esm/types && rollup -c rollup.sybilion-ui.dts.config.ts --configPlugin @rollup/plugin-typescript",
51
50
  "publish:npm": "yarn build && npm publish --access public",
52
- "publish:sybilion-ui": "yarn build:sybilion-ui && npm publish ./packages/sybilion-ui --access public",
53
51
  "docs:build": "NODE_OPTIONS='--loader ts-node/esm' NODE_ENV=production webpack --mode=production --config ./src/docs/config/webpack.config.js --progress",
54
52
  "release": "standard-version",
55
53
  "release:major": "yarn release -- --release-as major",