@apliteni/apliteni-ui 0.43.0 → 0.43.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/README.md CHANGED
@@ -217,42 +217,26 @@ react/ # React components — private workspace, built to reac
217
217
  dist/ # tsup output; shipped as …/react and …/react/css
218
218
  ```
219
219
 
220
- ## Develop
221
-
222
- ```bash
223
- npm install
224
- npm run storybook # http://localhost:6006, or the next free port
225
- npm run build-storybook # -> storybook-static/
226
- node site/build.mjs # -> site/public/ (landing + kit.css + /storybook)
227
- ```
228
-
229
- The React components build and test through the workspace (`npm install` at the repo
230
- root covers them — there is no second install):
231
-
232
- ```bash
233
- npm run storybook -w react # http://localhost:6007, or the next free port
234
- npm test -w react # vitest
235
- npm run build # tsup -> react/dist/ (also runs on prepare)
236
- ```
237
-
238
- ## Publish (public npm)
239
-
240
- Versioned publish runs from CI on a GitHub Release:
241
-
242
- ```bash
243
- npm version patch # or minor / major — bumps package.json + tags
244
- git push --follow-tags
245
- gh release create v$(node -p "require('./package.json').version") --generate-notes
246
- ```
247
-
248
- The **Release** workflow (`.github/workflows/release.yml`) then publishes to the public
249
- npm registry over npm Trusted Publishing (OIDC) — there is no long-lived token. No
250
- manual `npm publish` needed. It runs in two jobs: `build` installs and runs `npm pack`,
251
- whose `prepare` rebuilds `react/dist` from the tagged commit, and `publish` — the only
252
- job that can mint an OIDC credential — just publishes that tarball, so no dependency
253
- or build script ever runs beside the credential. The packaging guard
254
- (`scripts/packaging.test.js`) fails CI if the React subpath isn't in the tarball, and
255
- the release itself re-checks the tarball before publishing it.
220
+ ## Contribute
221
+
222
+ Use Node 20 or newer. Install [jq](https://jqlang.github.io/jq/), then run `npm ci` at
223
+ the repository root. Start Storybook with `npm run storybook`. For React, use `npm run
224
+ storybook -w react`. Before opening a PR, run `npm test`, `npm test -w react`, `npm run
225
+ build-storybook`, and `node site/build.mjs`.
226
+
227
+ To add a component, put its token-based CSS in `src/styles/`. Include it in
228
+ `src/index.css` and in both the `styles` map and `cssText` in `src/inline.js`. Add the
229
+ HTML factory under `src/components/`, export it from `src/index.js`, and add a
230
+ playground and state examples under `stories/components/`. Put React components in
231
+ `react/src/`, with a test and story that use the shared classes and tokens. Read the
232
+ [guidelines](guidelines/overview.md) for the design rules.
233
+
234
+ Open an issue, branch from `main`, and link the issue in your PR. Changes to published
235
+ files, including this README, require a version bump in `package.json` and
236
+ `package-lock.json`, plus an entry in `site/changelog.mjs`. Merging the bump starts the
237
+ release workflow. Do not push a tag or publish by hand.
238
+
239
+ [Agent rules](AGENTS.md) cover review, data handling, and release checks.
256
240
 
257
241
  ## Deploy (ui.apli.tech)
258
242
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.43.0",
3
+ "version": "0.43.1",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -7,7 +7,7 @@
7
7
  // iconCategories drives the Storybook grid.
8
8
  //
9
9
  // Naming, grouping and provenance, and the gates that hold them:
10
- // why: CONTRIBUTING.md#add-a-glyph
10
+ // Use Lucide paths and name each glyph for what it depicts.
11
11
  import { esc } from '../html.js';
12
12
  const NAV = {
13
13
  chevronDown: '<path d="M6 9l6 6 6-6" stroke-linecap="round" stroke-linejoin="round"/>',
@@ -241,7 +241,7 @@ export function pagination({
241
241
  *
242
242
  * @returns {() => void} a function that removes the listeners.
243
243
  *
244
- * why: CONTRIBUTING.md#pagination-event-wiring
244
+ * Delegate pager events from the root so handlers survive rerenders.
245
245
  */
246
246
  export function wirePagination(root = document, { onPage, onPageSize } = {}) {
247
247
  const scope = typeof root === 'string' ? document.querySelector(root) : root;
@@ -310,7 +310,7 @@ export function wirePagination(root = document, { onPage, onPageSize } = {}) {
310
310
  * @returns {Element|null} the status element, or null when there is nothing to
311
311
  * update — safe against a torn-down view.
312
312
  *
313
- * why: CONTRIBUTING.md#pagination-status-updates
313
+ * Update the existing live region so screen readers can announce it.
314
314
  */
315
315
  export function setPagerStatus(root, text) {
316
316
  const el = typeof root === 'string' ? document.querySelector(root) : root;
@@ -17,7 +17,7 @@ import { esc } from './index.js';
17
17
  const cx = (...a) => a.filter(Boolean).join(' ');
18
18
  /* classes: ui-tip__label ui-tip__value ui-tip__detail — built from `k` below, so
19
19
  a sweep reading class names off the source cannot see them.
20
- why: CONTRIBUTING.md#a-spelling-the-sweep-cannot-see-costs-coverage-in-silence */
20
+ */
21
21
  const PARTS = ['label', 'value', 'detail'];
22
22
  const px = (n) => (typeof n === 'number' && Number.isFinite(n) ? `${n}px` : null);
23
23
  let seq = 0;
@@ -128,7 +128,7 @@ strong {
128
128
  so this weighs (0,0,1) and any component rule that sizes an icon outranks it.
129
129
  The count of those rules is deliberately not written here — it moved once
130
130
  already, and two gates hold it over the ground each actually sweeps.
131
- why: CONTRIBUTING.md#the-reset-is-a-floor-and-its-specificity-is-the-whole-of-that */
131
+ */
132
132
  svg:where(:not([width]):not([height])) {
133
133
  width: 1.1em;
134
134
  height: 1.1em;
@@ -114,7 +114,7 @@
114
114
  /* Literal px, and a line-height it does not inherit: the target-size gate
115
115
  reads declarations rather than a laid-out box, and `var()` inside a padding
116
116
  shorthand measures as nothing there.
117
- why: CONTRIBUTING.md#an-unresolved-var-measures-nothing-and-reports-green */
117
+ */
118
118
  padding: 16px 0;
119
119
  line-height: 1.5;
120
120
  font-family: inherit;
@@ -62,7 +62,7 @@
62
62
  /* The rail's hover WAS --surface-2, so moving the rail onto it would have made
63
63
  hovering a row do nothing. The danger row and the current row are left out by
64
64
  name, because this rule outranks the states nav.css writes for them.
65
- why: CONTRIBUTING.md#a-rule-that-outranks-another-cancels-every-state-that-other-one-writes */
65
+ */
66
66
  .ui-app__rail .ui-nav__item:not(.is-danger):not(.is-active):hover { background: var(--surface-3); /* ring-gap: inherit — control paint; its focus indicator uses the containing surface. */ }
67
67
  .ui-app__brand {
68
68
  display: flex;
@@ -118,7 +118,7 @@
118
118
  /* A destructive row of the rail is a navigation row and rests like one; the danger
119
119
  intent is the step nav.css writes for it. Both of nav.css's danger states are
120
120
  named, not hover alone.
121
- why: CONTRIBUTING.md#a-rule-that-outranks-another-cancels-every-state-that-other-one-writes */
121
+ */
122
122
  .ui-app__rail .ui-nav__item.is-danger:not(:hover):not(:focus-visible) { color: var(--text); }
123
123
 
124
124
  /* One rule closes the rail, and it is this one: the nav's footer slot is empty now
@@ -176,7 +176,7 @@
176
176
  /* As tall as the mark inside it plus its own padding — 30 + 4 + 4, written out
177
177
  rather than as the calc() it comes from, and held to that arithmetic by
178
178
  stories/apps/shell-states.test.js.
179
- why: CONTRIBUTING.md#an-unresolved-var-measures-nothing-and-reports-green */
179
+ */
180
180
  min-height: 38px;
181
181
  padding: var(--space-1) 0;
182
182
  border: 0;
@@ -347,7 +347,7 @@
347
347
  min-width: 0;
348
348
  padding: 7px 10px;
349
349
  /* A family alone leaves the browser's leading behind: `font: inherit` first, then
350
- the one step this row takes. why: CONTRIBUTING.md#button-chrome-ledgers */
350
+ the one step this row takes. */
351
351
  font: inherit;
352
352
  font-size: var(--text-sm);
353
353
  text-align: start;
@@ -4,7 +4,7 @@
4
4
  * --single one page of content: the size control alone, no steps
5
5
  * The controls are .ui-btn ghost/sm and the size control is a .ui-select, so
6
6
  * everything here is layout and the two states those sheets do not own.
7
- * why: CONTRIBUTING.md#pagination-layout
7
+ * Keep the status at the start and controls together at the far end.
8
8
  * ========================================================================== */
9
9
 
10
10
  .ui-pager {
@@ -86,7 +86,7 @@
86
86
  * vocabulary; the fallbacks keep tokens.css self-sufficient when imported
87
87
  * without brand.generated.css. Delays are the kit's own, and the reusable
88
88
  * effect layer lives in styles/motion.css.
89
- * why: CONTRIBUTING.md#brand-tokens-synced-from-design-system */
89
+ * Change generated brand tokens upstream in apliteni/design-system. */
90
90
  --ease: var(--easing-ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));
91
91
  --ease-out: var(--easing-ease-out, cubic-bezier(0, 0, 0.2, 1));
92
92
  --ease-in: var(--easing-ease-in, cubic-bezier(0.4, 0, 1, 1));