@milesroxas/create-design-hub 0.9.0 → 0.10.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milesroxas/create-design-hub",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Create a Design Hub project: the thin folder of prototypes, kit materials and docs that installs the @milesroxas/design-hub package. Runs as `npm create @milesroxas/design-hub`.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "devDependencies": {
34
34
  "@biomejs/biome": "2.6.3",
35
- "@milesroxas/design-hub": "0.9.0"
35
+ "@milesroxas/design-hub": "0.10.0"
36
36
  },
37
37
  "scripts": {
38
38
  "check": "biome check --config-path ../design-hub/configs/biome .",
@@ -89,6 +89,7 @@ The README's `## States` table lists every state the prototype holds and how to
89
89
  - Never reach into another prototype's files (an import, a CSS `@import` or `url()`, a `new URL`): the build refuses it, naming both. No web worker in a prototype either: the build refuses it (a worker in `kit/` that uses no prototype's files is fine). Run `pnpm build` before you share: it checks more than `pnpm dev` does. Never put shared code directly in `prototypes/` or in a folder there without a README: the build refuses it; shared code belongs in `kit/`. Write styles in plain CSS (or `.pcss`): Sass, Less and Stylus are refused in prototypes and in `kit/`, in `pnpm dev` and `pnpm build`, because their own imports resolve where no check sees them. The build also fails when a file outside a prototype's folder is one of that prototype's files whole (the same bytes, a `data:` URI of it, or its whole text as a string), however it got there; it does not look for part of a file, so shared lines and rules build. A `new URL` whose path is built at run time is not seen until its content lands outside the folder.
90
90
  - A prototype's small images and SVGs are files of their own, never `data:` URIs, so the site can refuse them to a Client while the prototype is internal.
91
91
  - `kit/` is shared with every signed-in person, clients included: nothing client-secret goes there, and nothing in it may point into a prototype's folder (the build refuses it). A link from one prototype's page to another's is fine.
92
+ - A dial is **Internal** too: a client's Controls panel has only the View tools until a dial is marked client-facing. Mark one in code with `client(...)` from `@kit/dials` only when the user asks for clients to have it; otherwise leave it, and Studio marks it with the eye beside its row in the Controls panel, which overrules the code on that site. Never mark fixtures, roles or scenarios: they are how the studio tests. An internal dial's name, range and default are still in the page's code a client's browser loads, so a dial's name never says what a client must not read. A client reads an internal dial's default, so the default is the value to present.
92
93
  - Walkthrough text (`docs/sprints/<feature>/guide.md`) and feature names go to every signed-in person, clients included, whether or not the feature's prototypes are client-facing: a walkthrough must not name or describe internal work until the client may see it.
93
94
  - `guide`, `api` and `assets` are the hub's paths, never a slug (`pnpm new` refuses them).
94
95
 
@@ -103,13 +104,13 @@ One slug in two places: `docs/sprints/<feature>/` and the `feature:` line of eve
103
104
  | Import | What |
104
105
  | --- | --- |
105
106
  | `@kit/shell` | `BRAND`, `PRODUCT` (nav, workspace, user), `SITE` (nav, footer): the one place the chrome is written. |
106
- | `@kit/AppShell`, `@kit/SiteShell` | The disposable shells. Mount the dialog, sheet and toast hosts and the View dials. `PageHead({ title, desc, back, actions })`. |
107
- | `@kit/Space` | `<Space title lede width>`: the low-gravity canvas. |
108
- | `@kit/Artboard` | `<Board title lede>` holding `<Artboard format name>`s: collateral at real pixel size, scaled to fit on screen, written to files by `pnpm export`. `FORMATS` lists the sizes. |
107
+ | `@kit/AppShell`, `@kit/SiteShell` | The disposable shells. Mount the dialog, sheet and toast hosts and the View dials (theme, reduce motion, speed). A prototype never mounts `ViewTools` itself. `PageHead({ title, desc, back, actions })`. |
108
+ | `@kit/Space` | `<Space title lede width tools?>`: the low-gravity canvas. `tools` narrows the View panel to what changes something here: `['theme']` when nothing moves, `['motion']` when there is one theme, `false` for neither. |
109
+ | `@kit/Artboard` | `<Board title lede>` holding `<Artboard format name>`s: collateral at real pixel size, scaled to fit on screen, written to files by `pnpm export`. `FORMATS` lists the sizes. A board has no View panel and is held to the light look it exports in: no motion, no theme styles, no `ViewTools`; a dark version is a `tone` dial. |
109
110
  | `@kit/ui` | `Button`, `Chevron`, `Segmented`, `Badge`, `Checkbox`, `useMenu`, `Select`, `openDialog`, `confirmDialog`, `openSheet`, `toast()`, `notInPrototype(what)`. Card, table and empty-state classes in `ui.css`. |
110
111
  | `@kit/fixtures` | `fixtureSets({ real, missing }, { max, text })` returns `{ real, longest, empty, max, missing }`; `SET_NAMES` for the dial. |
111
- | `@kit/Variants` | `<Variants options={{ Quiet, Editorial }}>`: the picker. Keys 1-N, arrows, R; `?v=N`. |
112
- | `@kit/dials` | `useDials(name, config, { hints })` for values JS reads; `<DialVars name config target?>` writes CSS variables without re-rendering. Every dial carries a hint. |
112
+ | `@kit/Variants` | `<Variants options={{ Quiet, Editorial }}>`: the picker. Keys 1-N, arrows, R; `?v=N`. A client gets only the variants Studio marks with the picker's eye, the first when none is marked, and no picker when there is one. |
113
+ | `@kit/dials` | `useDials(name, config, { hints })` for values JS reads; `<DialVars name config target?>` writes CSS variables without re-rendering. Every dial carries a hint. `client(dial)` around a dial, or a folder of them, marks it client-facing. |
113
114
  | `@kit/Icon`, `@kit/icons` | `<Icon name size label?>`. Add a glyph in `kit/icons.ts`. |
114
115
  | `@kit/prefs`, `@kit/hooks`, `@kit/format`, `@kit/motion` | Theme and motion preferences; `useHashRoute`, `useStoredState`; `fmtDate`, `plural`; `ease.*` and `spring.*`. |
115
116
  | `@kit/tokens.css` | The design's tokens, light and `.dark-mode`. Loaded globally. |
@@ -1,5 +1,5 @@
1
1
  import { AppShell, PageHead } from '@kit/AppShell';
2
- import { DialVars, useDials } from '@kit/dials';
2
+ import { client, DialVars, useDials } from '@kit/dials';
3
3
  import { type FixtureSets, fixtureSets, SET_NAMES, type SetName } from '@kit/fixtures';
4
4
  import { fmtDate, plural } from '@kit/format';
5
5
  import { useHashRoute } from '@kit/hooks';
@@ -36,7 +36,8 @@ function ItemsPage() {
36
36
  'Review',
37
37
  {
38
38
  fixtures: { type: 'select', options: [...SET_NAMES], default: 'real' },
39
- density: { type: 'select', options: ['comfortable', 'compact'], default: 'comfortable' },
39
+ // client(): a client gets this dial too. Every other dial is internal until Studio's eye marks it.
40
+ density: client({ type: 'select', options: ['comfortable', 'compact'], default: 'comfortable' }),
40
41
  },
41
42
  {
42
43
  hints: {
@@ -1,18 +0,0 @@
1
- {
2
- "version": "0.0.1",
3
- "configurations": [
4
- {
5
- "name": "prototypes",
6
- "runtimeExecutable": "pnpm",
7
- "runtimeArgs": [
8
- "dev"
9
- ],
10
- "port": 3105
11
- },
12
- {
13
- "name": "prototypes-attach",
14
- "url": "http://localhost:3105",
15
- "port": 3105
16
- }
17
- ]
18
- }