@stridge/noctis-design-tokens 1.0.0-beta.3 → 1.0.0-beta.5

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.
@@ -1365,6 +1365,84 @@ const toolbar = {
1365
1365
  }, "5rem", "Default width of a toolbar input field.", "The resting width of a `Toolbar.Input` — sized for a short value like a zoom percentage; override per use.")
1366
1366
  ]
1367
1367
  };
1368
+ const pagination = {
1369
+ component: "pagination",
1370
+ category: "navigation",
1371
+ slotPrefix: "noctis",
1372
+ anatomy: [
1373
+ "pagination",
1374
+ "pagination-info",
1375
+ "pagination-page-size",
1376
+ "pagination-page",
1377
+ "pagination-controls",
1378
+ "pagination-separator"
1379
+ ],
1380
+ options: { size: ["sm", "md"] },
1381
+ states: [],
1382
+ consumes: [],
1383
+ optionSlots: { size: "pagination" },
1384
+ mints: [
1385
+ raw("0cbc4655-bb4e-4fd5-9c04-057351efe727", {
1386
+ kind: "component",
1387
+ component: "pagination",
1388
+ property: "gap"
1389
+ }, "var(--noctis-space-3)", "Gap between the pagination's clusters.", "The spacing the pagination row holds between its info line, page-size picker, separator, page field, and controls."),
1390
+ raw("41dfe2e5-18e2-4197-a956-8ff5b4fe0e41", {
1391
+ kind: "component",
1392
+ component: "pagination",
1393
+ anatomy: "info",
1394
+ property: "font-size"
1395
+ }, "var(--noctis-text-small)", "Info line font size.", "The type size of the “Showing X–Y of Z” status line."),
1396
+ aliased("72cd3ff8-3ebe-4c30-9fdd-6130842a3274", {
1397
+ kind: "component",
1398
+ component: "pagination",
1399
+ anatomy: "info",
1400
+ property: "color"
1401
+ }, { role: "muted" }, "Info line text colour.", "The colour of the status line — the quieter muted role, since it is secondary to the controls."),
1402
+ raw("1282b0be-d667-4311-a247-bfb08e980d7b", {
1403
+ kind: "component",
1404
+ component: "pagination",
1405
+ anatomy: "page-size",
1406
+ property: "gap"
1407
+ }, "var(--noctis-space-2)", "Gap inside the page-size cluster.", "The spacing between the page-size label and its select."),
1408
+ raw("a907344a-4e70-4b2d-a92b-ad740a165f31", {
1409
+ kind: "component",
1410
+ component: "pagination",
1411
+ anatomy: "page",
1412
+ property: "gap"
1413
+ }, "var(--noctis-space-2)", "Gap inside the page field cluster.", "The spacing between the “Page” label, the page input, and the “of N” total."),
1414
+ raw("d501c15c-b399-4366-80fb-66b43511ca19", {
1415
+ kind: "component",
1416
+ component: "pagination",
1417
+ anatomy: "page",
1418
+ property: "inline-size"
1419
+ }, "3.5rem", "Width of the editable page input.", "The resting width of the page-number field, sized for a few digits; override per use for larger page counts."),
1420
+ aliased("d8abfead-9e96-437c-9af1-dbccf3fd34b9", {
1421
+ kind: "component",
1422
+ component: "pagination",
1423
+ anatomy: "page",
1424
+ property: "block-size"
1425
+ }, { raw: "var(--noctis-size-control-md)" }, "Height of the welded page input.", "The control height of the page field per size, kept level with the nav buttons beside it (the `Input` shell itself floors at `md`, so the welded field's height is pinned here); `sm` drops to `control-sm`.", { size: { sm: { raw: "var(--noctis-size-control-sm)" } } }),
1426
+ aliased("d5bbc9bc-de84-4050-a437-d0d864c6c2ba", {
1427
+ kind: "component",
1428
+ component: "pagination",
1429
+ anatomy: "separator",
1430
+ property: "color"
1431
+ }, { role: "border" }, "Colour of the divider between pagination clusters.", "The hairline separator's colour — the default border role, so it reads as a quiet rule."),
1432
+ raw("3f5f5f70-1e70-40e7-a05c-9b6ba5892b70", {
1433
+ kind: "component",
1434
+ component: "pagination",
1435
+ anatomy: "separator",
1436
+ property: "inline-size"
1437
+ }, "1px", "Thickness of the divider between pagination clusters.", "The thickness of the vertical hairline separator."),
1438
+ raw("9fcd3857-34b8-42e4-95af-14e2c3e65744", {
1439
+ kind: "component",
1440
+ component: "pagination",
1441
+ anatomy: "separator",
1442
+ property: "block-size"
1443
+ }, "1.5rem", "Height of the divider between pagination clusters.", "The height of the vertical hairline separator within the centred row.")
1444
+ ]
1445
+ };
1368
1446
  const accordion = {
1369
1447
  component: "accordion",
1370
1448
  category: "surfaces",
@@ -3230,7 +3308,7 @@ const radio = {
3230
3308
  * The avatar mints its box edge and its initials type, both retuned per the `size` axis (`xs`…`xl`),
3231
3309
  * plus the corner radius the `square` shape reads (the default `circle` shape is the literal
3232
3310
  * `--noctis-radius-full` extreme, never minted). Avatars are static-identity and accent-independent:
3233
- * the fallback fill is a `--noctis-color-avatar-N` role chosen by a stable hash, so it carries its own
3311
+ * the fallback fill is a `--noctis-color-palette-N` role chosen by a stable hash, so it carries its own
3234
3312
  * light/dark values and never re-themes on the accent. Its sizes are a deliberate own scale (not the
3235
3313
  * control-height ladder) — an avatar is an image footprint, not a control.
3236
3314
  */
@@ -3340,6 +3418,87 @@ const avatar = {
3340
3418
  }, "0px", "Corner inset of the presence/status indicator.", "How far the indicator is pulled in from the avatar's corner (logical); zero sits it flush against the edge, where the round box curves away from it.")
3341
3419
  ]
3342
3420
  };
3421
+ const badge = {
3422
+ component: "badge",
3423
+ category: "data",
3424
+ slotPrefix: "noctis",
3425
+ anatomy: [
3426
+ "badge",
3427
+ "badge-dot",
3428
+ "badge-icon"
3429
+ ],
3430
+ options: {
3431
+ variant: [
3432
+ "solid",
3433
+ "soft",
3434
+ "outline",
3435
+ "dot"
3436
+ ],
3437
+ tone: [
3438
+ "neutral",
3439
+ "accent",
3440
+ "success",
3441
+ "warning",
3442
+ "danger",
3443
+ "info",
3444
+ "red",
3445
+ "orange",
3446
+ "amber",
3447
+ "green",
3448
+ "teal",
3449
+ "blue",
3450
+ "purple",
3451
+ "pink"
3452
+ ],
3453
+ size: ["sm", "md"]
3454
+ },
3455
+ states: [],
3456
+ consumes: [],
3457
+ optionSlots: {
3458
+ variant: "badge",
3459
+ tone: "badge",
3460
+ size: "badge"
3461
+ },
3462
+ mints: [
3463
+ aliased("dbb503f3-d915-428f-a2ba-c6bad40ae7d5", {
3464
+ kind: "component",
3465
+ component: "badge",
3466
+ property: "padding-inline"
3467
+ }, { raw: "0.5rem" }, "Inline padding of the chip.", "The horizontal inset between the chip edge and its content, per size.", { size: { sm: { raw: "0.4375rem" } } }),
3468
+ aliased("aaecfaef-d3b1-4c85-a1bd-dde224acdbc6", {
3469
+ kind: "component",
3470
+ component: "badge",
3471
+ property: "padding-block"
3472
+ }, { raw: "0.1875rem" }, "Block padding of the chip.", "The vertical inset between the chip edge and its content, per size.", { size: { sm: { raw: "0.125rem" } } }),
3473
+ aliased("c3e686b3-1588-401e-ac41-4ab58c34b8cc", {
3474
+ kind: "component",
3475
+ component: "badge",
3476
+ property: "gap"
3477
+ }, { raw: "0.3125rem" }, "Gap between the chip's dot/icon and its label.", "The spacing the chip holds between a leading dot or icon and the label text, per size.", { size: { sm: { raw: "0.25rem" } } }),
3478
+ aliased("acd27e33-13ac-4d0e-a772-6ac25f34208c", {
3479
+ kind: "component",
3480
+ component: "badge",
3481
+ property: "font-size"
3482
+ }, { raw: "var(--noctis-text-mini)" }, "Label type size.", "The font size of the chip's label, per size; the 12px `mini` step at `md`, the 11px `micro` step at `sm`.", { size: { sm: { raw: "var(--noctis-text-micro)" } } }),
3483
+ raw("27e0ac6b-60dc-4179-9d7e-ecad248c2ee7", {
3484
+ kind: "component",
3485
+ component: "badge",
3486
+ property: "border-radius"
3487
+ }, "var(--noctis-radius-full)", "Chip corner radius.", "The rounding of the chip; the full-round pill extreme so the chip reads as a label, not a button — override the public var for a squarer chip."),
3488
+ aliased("d73ca89d-4d8c-4663-8f28-3ad69877ef92", {
3489
+ kind: "component",
3490
+ component: "badge",
3491
+ anatomy: "dot",
3492
+ property: "size"
3493
+ }, { raw: "0.375rem" }, "Edge length of the leading status dot.", "The diameter of the optional status dot, per size; the dot inherits the label colour via `currentColor`, so it stays legible in every variant.", { size: { sm: { raw: "0.3125rem" } } }),
3494
+ aliased("0fcef652-7887-4bc4-a85f-08137936f1c0", {
3495
+ kind: "component",
3496
+ component: "badge",
3497
+ anatomy: "icon",
3498
+ property: "size"
3499
+ }, { raw: "0.875rem" }, "Edge length of a leading icon glyph.", "The width and height the chip clamps a leading icon to, per size, so the glyph tracks the label.", { size: { sm: { raw: "0.75rem" } } })
3500
+ ]
3501
+ };
3343
3502
  const colorSwatch = {
3344
3503
  component: "color-swatch",
3345
3504
  category: "fields",
@@ -4239,6 +4398,7 @@ const COMPONENT_DECLARATIONS = [
4239
4398
  buttonGroup,
4240
4399
  tabs,
4241
4400
  toolbar,
4401
+ pagination,
4242
4402
  accordion,
4243
4403
  toggle,
4244
4404
  numberField,
@@ -4260,6 +4420,7 @@ const COMPONENT_DECLARATIONS = [
4260
4420
  slider,
4261
4421
  checkbox,
4262
4422
  avatar,
4423
+ badge,
4263
4424
  otpField,
4264
4425
  switchControl,
4265
4426
  progress,
@@ -24,7 +24,7 @@ type TokenBridge = {
24
24
  readonly name: string;
25
25
  };
26
26
  /** How a token is grouped in the reference view (display metadata, not the structural category). */
27
- type TokenGroup = "surface" | "text" | "border" | "accent" | "control" | "status" | "utility" | "chart" | "avatar";
27
+ type TokenGroup = "surface" | "text" | "border" | "accent" | "control" | "status" | "utility" | "chart" | "palette";
28
28
  /**
29
29
  * A structured token name. The flat form carries an id verbatim (seed, foundation, and semantic
30
30
  * tokens — the category segment comes from `tier`/`category` at serialization, never the id);
@@ -55,7 +55,7 @@ const groupSchema = z.enum([
55
55
  "status",
56
56
  "utility",
57
57
  "chart",
58
- "avatar"
58
+ "palette"
59
59
  ]);
60
60
  const tokenBridgeSchema = z.discriminatedUnion("kind", [
61
61
  z.object({ kind: z.literal("color") }).strict(),
@@ -202,19 +202,19 @@ const STATIC_SEMANTIC_TOKENS = [
202
202
  tier: "semantic",
203
203
  name: {
204
204
  kind: "flat",
205
- id: "avatar-1"
205
+ id: "palette-1"
206
206
  },
207
207
  value: {
208
208
  raw: "oklch(0.62 0.17 264)",
209
209
  rawLight: "oklch(0.58 0.18 264)"
210
210
  },
211
- description: "Generative avatar swatch 1.",
212
- usage: "Avatar / initials background, indexed by a stable id hash.",
211
+ description: "Categorical palette swatch 1.",
212
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
213
213
  introduced: "0.0.0",
214
- label: "Avatar 1",
214
+ label: "Palette 1",
215
215
  category: "color",
216
- group: "avatar",
217
- utility: "bg-avatar-1",
216
+ group: "palette",
217
+ utility: "bg-palette-1",
218
218
  bridge: { kind: "color" }
219
219
  },
220
220
  {
@@ -222,19 +222,19 @@ const STATIC_SEMANTIC_TOKENS = [
222
222
  tier: "semantic",
223
223
  name: {
224
224
  kind: "flat",
225
- id: "avatar-2"
225
+ id: "palette-2"
226
226
  },
227
227
  value: {
228
228
  raw: "oklch(0.62 0.15 196)",
229
229
  rawLight: "oklch(0.56 0.15 196)"
230
230
  },
231
- description: "Generative avatar swatch 2.",
232
- usage: "Avatar / initials background, indexed by a stable id hash.",
231
+ description: "Categorical palette swatch 2.",
232
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
233
233
  introduced: "0.0.0",
234
- label: "Avatar 2",
234
+ label: "Palette 2",
235
235
  category: "color",
236
- group: "avatar",
237
- utility: "bg-avatar-2",
236
+ group: "palette",
237
+ utility: "bg-palette-2",
238
238
  bridge: { kind: "color" }
239
239
  },
240
240
  {
@@ -242,19 +242,19 @@ const STATIC_SEMANTIC_TOKENS = [
242
242
  tier: "semantic",
243
243
  name: {
244
244
  kind: "flat",
245
- id: "avatar-3"
245
+ id: "palette-3"
246
246
  },
247
247
  value: {
248
248
  raw: "oklch(0.62 0.16 152)",
249
249
  rawLight: "oklch(0.56 0.16 152)"
250
250
  },
251
- description: "Generative avatar swatch 3.",
252
- usage: "Avatar / initials background, indexed by a stable id hash.",
251
+ description: "Categorical palette swatch 3.",
252
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
253
253
  introduced: "0.0.0",
254
- label: "Avatar 3",
254
+ label: "Palette 3",
255
255
  category: "color",
256
- group: "avatar",
257
- utility: "bg-avatar-3",
256
+ group: "palette",
257
+ utility: "bg-palette-3",
258
258
  bridge: { kind: "color" }
259
259
  },
260
260
  {
@@ -262,19 +262,19 @@ const STATIC_SEMANTIC_TOKENS = [
262
262
  tier: "semantic",
263
263
  name: {
264
264
  kind: "flat",
265
- id: "avatar-4"
265
+ id: "palette-4"
266
266
  },
267
267
  value: {
268
268
  raw: "oklch(0.64 0.15 130)",
269
269
  rawLight: "oklch(0.58 0.15 130)"
270
270
  },
271
- description: "Generative avatar swatch 4.",
272
- usage: "Avatar / initials background, indexed by a stable id hash.",
271
+ description: "Categorical palette swatch 4.",
272
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
273
273
  introduced: "0.0.0",
274
- label: "Avatar 4",
274
+ label: "Palette 4",
275
275
  category: "color",
276
- group: "avatar",
277
- utility: "bg-avatar-4",
276
+ group: "palette",
277
+ utility: "bg-palette-4",
278
278
  bridge: { kind: "color" }
279
279
  },
280
280
  {
@@ -282,19 +282,19 @@ const STATIC_SEMANTIC_TOKENS = [
282
282
  tier: "semantic",
283
283
  name: {
284
284
  kind: "flat",
285
- id: "avatar-5"
285
+ id: "palette-5"
286
286
  },
287
287
  value: {
288
288
  raw: "oklch(0.66 0.16 70)",
289
289
  rawLight: "oklch(0.62 0.16 70)"
290
290
  },
291
- description: "Generative avatar swatch 5.",
292
- usage: "Avatar / initials background, indexed by a stable id hash.",
291
+ description: "Categorical palette swatch 5.",
292
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
293
293
  introduced: "0.0.0",
294
- label: "Avatar 5",
294
+ label: "Palette 5",
295
295
  category: "color",
296
- group: "avatar",
297
- utility: "bg-avatar-5",
296
+ group: "palette",
297
+ utility: "bg-palette-5",
298
298
  bridge: { kind: "color" }
299
299
  },
300
300
  {
@@ -302,19 +302,19 @@ const STATIC_SEMANTIC_TOKENS = [
302
302
  tier: "semantic",
303
303
  name: {
304
304
  kind: "flat",
305
- id: "avatar-6"
305
+ id: "palette-6"
306
306
  },
307
307
  value: {
308
308
  raw: "oklch(0.62 0.18 40)",
309
309
  rawLight: "oklch(0.58 0.19 40)"
310
310
  },
311
- description: "Generative avatar swatch 6.",
312
- usage: "Avatar / initials background, indexed by a stable id hash.",
311
+ description: "Categorical palette swatch 6.",
312
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
313
313
  introduced: "0.0.0",
314
- label: "Avatar 6",
314
+ label: "Palette 6",
315
315
  category: "color",
316
- group: "avatar",
317
- utility: "bg-avatar-6",
316
+ group: "palette",
317
+ utility: "bg-palette-6",
318
318
  bridge: { kind: "color" }
319
319
  },
320
320
  {
@@ -322,19 +322,19 @@ const STATIC_SEMANTIC_TOKENS = [
322
322
  tier: "semantic",
323
323
  name: {
324
324
  kind: "flat",
325
- id: "avatar-7"
325
+ id: "palette-7"
326
326
  },
327
327
  value: {
328
328
  raw: "oklch(0.6 0.2 18)",
329
329
  rawLight: "oklch(0.56 0.21 18)"
330
330
  },
331
- description: "Generative avatar swatch 7.",
332
- usage: "Avatar / initials background, indexed by a stable id hash.",
331
+ description: "Categorical palette swatch 7.",
332
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
333
333
  introduced: "0.0.0",
334
- label: "Avatar 7",
334
+ label: "Palette 7",
335
335
  category: "color",
336
- group: "avatar",
337
- utility: "bg-avatar-7",
336
+ group: "palette",
337
+ utility: "bg-palette-7",
338
338
  bridge: { kind: "color" }
339
339
  },
340
340
  {
@@ -342,19 +342,19 @@ const STATIC_SEMANTIC_TOKENS = [
342
342
  tier: "semantic",
343
343
  name: {
344
344
  kind: "flat",
345
- id: "avatar-8"
345
+ id: "palette-8"
346
346
  },
347
347
  value: {
348
348
  raw: "oklch(0.6 0.18 330)",
349
349
  rawLight: "oklch(0.56 0.19 330)"
350
350
  },
351
- description: "Generative avatar swatch 8.",
352
- usage: "Avatar / initials background, indexed by a stable id hash.",
351
+ description: "Categorical palette swatch 8.",
352
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
353
353
  introduced: "0.0.0",
354
- label: "Avatar 8",
354
+ label: "Palette 8",
355
355
  category: "color",
356
- group: "avatar",
357
- utility: "bg-avatar-8",
356
+ group: "palette",
357
+ utility: "bg-palette-8",
358
358
  bridge: { kind: "color" }
359
359
  },
360
360
  {
@@ -362,19 +362,19 @@ const STATIC_SEMANTIC_TOKENS = [
362
362
  tier: "semantic",
363
363
  name: {
364
364
  kind: "flat",
365
- id: "avatar-9"
365
+ id: "palette-9"
366
366
  },
367
367
  value: {
368
368
  raw: "oklch(0.6 0.18 300)",
369
369
  rawLight: "oklch(0.56 0.19 300)"
370
370
  },
371
- description: "Generative avatar swatch 9.",
372
- usage: "Avatar / initials background, indexed by a stable id hash.",
371
+ description: "Categorical palette swatch 9.",
372
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
373
373
  introduced: "0.0.0",
374
- label: "Avatar 9",
374
+ label: "Palette 9",
375
375
  category: "color",
376
- group: "avatar",
377
- utility: "bg-avatar-9",
376
+ group: "palette",
377
+ utility: "bg-palette-9",
378
378
  bridge: { kind: "color" }
379
379
  },
380
380
  {
@@ -382,19 +382,19 @@ const STATIC_SEMANTIC_TOKENS = [
382
382
  tier: "semantic",
383
383
  name: {
384
384
  kind: "flat",
385
- id: "avatar-10"
385
+ id: "palette-10"
386
386
  },
387
387
  value: {
388
388
  raw: "oklch(0.6 0.15 285)",
389
389
  rawLight: "oklch(0.56 0.16 285)"
390
390
  },
391
- description: "Generative avatar swatch 10.",
392
- usage: "Avatar / initials background, indexed by a stable id hash.",
391
+ description: "Categorical palette swatch 10.",
392
+ usage: "Accent-independent categorical fill avatar initials (chosen by id hash) and Badge decorative tones.",
393
393
  introduced: "0.0.0",
394
- label: "Avatar 10",
394
+ label: "Palette 10",
395
395
  category: "color",
396
- group: "avatar",
397
- utility: "bg-avatar-10",
396
+ group: "palette",
397
+ utility: "bg-palette-10",
398
398
  bridge: { kind: "color" }
399
399
  },
400
400
  {
@@ -402,16 +402,16 @@ const STATIC_SEMANTIC_TOKENS = [
402
402
  tier: "semantic",
403
403
  name: {
404
404
  kind: "flat",
405
- id: "avatar-foreground"
405
+ id: "palette-foreground"
406
406
  },
407
407
  value: { raw: "oklch(0.99 0 0)" },
408
- description: "Initials text on an avatar background.",
409
- usage: "Initials text on an avatarthe page background as a knockout.",
408
+ description: "Knockout text on a saturated palette swatch.",
409
+ usage: "Knockout text that reads on any saturated palette swatch avatar initials, solid Badge labels.",
410
410
  introduced: "0.0.0",
411
- label: "Avatar foreground",
411
+ label: "Palette foreground",
412
412
  category: "color",
413
- group: "avatar",
414
- utility: "text-avatar-foreground",
413
+ group: "palette",
414
+ utility: "text-palette-foreground",
415
415
  bridge: { kind: "color" }
416
416
  }
417
417
  ];
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { ComponentDeclaration, DesignToken, GraphValidationError, TokenBridge, T
5
5
  import { COMPONENT_DECLARATIONS } from "./graph/components.js";
6
6
  import { DESIGN_TOKENS, SemanticRoleId } from "./graph/index.js";
7
7
  import { internalVar, serializeTokenName } from "./graph/serialize.js";
8
- import { AVATAR_FOREGROUND, AVATAR_PALETTE, AVATAR_SWATCH_COUNT, CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, ModePalette, avatarIndex } from "./palettes.js";
8
+ import { CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, ModePalette, PALETTE, PALETTE_FOREGROUND, PALETTE_SWATCH_COUNT, avatarIndex } from "./palettes.js";
9
9
  import { BREAKPOINTS, DENSITY_VAR, EASINGS, FONT_SCALE_VAR, FONT_SIZES, FONT_WEIGHTS, RADII, RADIUS_VAR, SPEEDS, Z_INDEX } from "./scales.js";
10
10
  import { ACCENT_SWATCHES, BACKGROUND_SWATCHES, ThemeSwatch } from "./swatches.js";
11
11
  import { ELEVATION_SCOPES, ElevationScope, SEMANTIC_ROLES, STATIC_TOKENS, SemanticRole, StaticToken } from "./semantic.js";
@@ -23,4 +23,4 @@ import { ThemeOverrides, ThemePreset, defaultPreset, presets } from "@stridge/no
23
23
  /** Package identifier — the workspace-resolution marker consumed by the app scaffold. */
24
24
  declare const DESIGN_TOKENS_PACKAGE: "@stridge/noctis-design-tokens";
25
25
  //#endregion
26
- export { ACCENT_SWATCHES, AVATAR_FOREGROUND, AVATAR_PALETTE, AVATAR_SWATCH_COUNT, BACKGROUND_SWATCHES, BREAKPOINTS, CATEGORY_REGISTRY, CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, COMPONENT_DECLARATIONS, COMPOSITE_PROPERTIES, type ComponentCategory, type ComponentDeclaration, type CompositeProperty, DENSITY_VAR, DESIGN_TOKENS, DESIGN_TOKENS_PACKAGE, type DesignToken, EASINGS, ELEVATION_SCOPES, type ElevationScope, FONT_SCALE_VAR, FONT_SIZES, FONT_WEIGHTS, GraphValidationError, type ModePalette, RADII, RADIUS_VAR, ROLE_VAR_PREFIX, SEMANTIC_ROLES, SPEEDS, STATE_REGISTRY, STATIC_TOKENS, type SemanticRole, type SemanticRoleId, type StaticToken, TOKEN_CATEGORIES, TOKEN_TIERS, type ThemeOverrides, type ThemePreset, type ThemeSwatch, type TokenBridge, type TokenCategory, type TokenDeprecation, type TokenGroup, type TokenName, type TokenState, type TokenTier, type TokenValue, Z_INDEX, applyThemeWithScopes, avatarIndex, bridgeVarName, componentDeclarationSchema, cssVarName, defaultPreset, defaultThemeCss, designTokenSchema, internalVar, presets, serializeTokenName, validateGraph };
26
+ export { ACCENT_SWATCHES, BACKGROUND_SWATCHES, BREAKPOINTS, CATEGORY_REGISTRY, CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, COMPONENT_DECLARATIONS, COMPOSITE_PROPERTIES, type ComponentCategory, type ComponentDeclaration, type CompositeProperty, DENSITY_VAR, DESIGN_TOKENS, DESIGN_TOKENS_PACKAGE, type DesignToken, EASINGS, ELEVATION_SCOPES, type ElevationScope, FONT_SCALE_VAR, FONT_SIZES, FONT_WEIGHTS, GraphValidationError, type ModePalette, PALETTE, PALETTE_FOREGROUND, PALETTE_SWATCH_COUNT, RADII, RADIUS_VAR, ROLE_VAR_PREFIX, SEMANTIC_ROLES, SPEEDS, STATE_REGISTRY, STATIC_TOKENS, type SemanticRole, type SemanticRoleId, type StaticToken, TOKEN_CATEGORIES, TOKEN_TIERS, type ThemeOverrides, type ThemePreset, type ThemeSwatch, type TokenBridge, type TokenCategory, type TokenDeprecation, type TokenGroup, type TokenName, type TokenState, type TokenTier, type TokenValue, Z_INDEX, applyThemeWithScopes, avatarIndex, bridgeVarName, componentDeclarationSchema, cssVarName, defaultPreset, defaultThemeCss, designTokenSchema, internalVar, presets, serializeTokenName, validateGraph };
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { CATEGORY_REGISTRY, COMPOSITE_PROPERTIES, ROLE_VAR_PREFIX, STATE_REGISTR
5
5
  import { internalVar, serializeTokenName } from "./graph/serialize.js";
6
6
  import { GraphValidationError, bridgeVarName, componentDeclarationSchema, cssVarName, designTokenSchema, validateGraph } from "./graph/model.js";
7
7
  import { DESIGN_TOKENS } from "./graph/index.js";
8
- import { AVATAR_FOREGROUND, AVATAR_PALETTE, AVATAR_SWATCH_COUNT, CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, avatarIndex } from "./palettes.js";
8
+ import { CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, PALETTE, PALETTE_FOREGROUND, PALETTE_SWATCH_COUNT, avatarIndex } from "./palettes.js";
9
9
  import { BREAKPOINTS, DENSITY_VAR, EASINGS, FONT_SCALE_VAR, FONT_SIZES, FONT_WEIGHTS, RADII, RADIUS_VAR, SPEEDS, Z_INDEX } from "./scales.js";
10
10
  import { ACCENT_SWATCHES, BACKGROUND_SWATCHES } from "./swatches.js";
11
11
  import { ELEVATION_SCOPES, SEMANTIC_ROLES, STATIC_TOKENS } from "./semantic.js";
@@ -22,4 +22,4 @@ import { defaultPreset, presets } from "@stridge/noctis-theme-engine";
22
22
  /** Package identifier — the workspace-resolution marker consumed by the app scaffold. */
23
23
  const DESIGN_TOKENS_PACKAGE = "@stridge/noctis-design-tokens";
24
24
  //#endregion
25
- export { ACCENT_SWATCHES, AVATAR_FOREGROUND, AVATAR_PALETTE, AVATAR_SWATCH_COUNT, BACKGROUND_SWATCHES, BREAKPOINTS, CATEGORY_REGISTRY, CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, COMPONENT_DECLARATIONS, COMPOSITE_PROPERTIES, DENSITY_VAR, DESIGN_TOKENS, DESIGN_TOKENS_PACKAGE, EASINGS, ELEVATION_SCOPES, FONT_SCALE_VAR, FONT_SIZES, FONT_WEIGHTS, GraphValidationError, RADII, RADIUS_VAR, ROLE_VAR_PREFIX, SEMANTIC_ROLES, SPEEDS, STATE_REGISTRY, STATIC_TOKENS, TOKEN_CATEGORIES, TOKEN_TIERS, Z_INDEX, applyThemeWithScopes, avatarIndex, bridgeVarName, componentDeclarationSchema, cssVarName, defaultPreset, defaultThemeCss, designTokenSchema, internalVar, presets, serializeTokenName, validateGraph };
25
+ export { ACCENT_SWATCHES, BACKGROUND_SWATCHES, BREAKPOINTS, CATEGORY_REGISTRY, CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, COMPONENT_DECLARATIONS, COMPOSITE_PROPERTIES, DENSITY_VAR, DESIGN_TOKENS, DESIGN_TOKENS_PACKAGE, EASINGS, ELEVATION_SCOPES, FONT_SCALE_VAR, FONT_SIZES, FONT_WEIGHTS, GraphValidationError, PALETTE, PALETTE_FOREGROUND, PALETTE_SWATCH_COUNT, RADII, RADIUS_VAR, ROLE_VAR_PREFIX, SEMANTIC_ROLES, SPEEDS, STATE_REGISTRY, STATIC_TOKENS, TOKEN_CATEGORIES, TOKEN_TIERS, Z_INDEX, applyThemeWithScopes, avatarIndex, bridgeVarName, componentDeclarationSchema, cssVarName, defaultPreset, defaultThemeCss, designTokenSchema, internalVar, presets, serializeTokenName, validateGraph };
@@ -2,10 +2,11 @@
2
2
  /**
3
3
  * Static, accent-independent palettes the engine does not generate.
4
4
  *
5
- * Charts and avatars need **categorical distinctness that stays stable** regardless of the
6
- * active theme accent, so these are authored in OKLCH (not derived from the seed) with
7
- * explicit light and dark values. They are emitted as Tailwind colors (`bg-chart-1`,
8
- * `bg-avatar-3`, `text-chart-positive`) and switch on the resolved mode via `data-theme`.
5
+ * Charts and categorical UI (avatar swatches, badge decorative tones) need **categorical
6
+ * distinctness that stays stable** regardless of the active theme accent, so these are authored in
7
+ * OKLCH (not derived from the seed) with explicit light and dark values. They are emitted as Tailwind
8
+ * colors (`bg-chart-1`, `bg-palette-3`, `text-chart-positive`) and switch on the resolved mode via
9
+ * `data-theme`.
9
10
  *
10
11
  * Hue choices are spread across the wheel and separated in lightness as well as hue, so the
11
12
  * series remain distinguishable under the common forms of color-vision deficiency (the worst
@@ -22,18 +23,19 @@ interface ModePalette {
22
23
  */
23
24
  declare const CHART_PALETTE: ModePalette;
24
25
  /**
25
- * Avatar / identity backgrounds (10). Saturated mid-lightness colors chosen so white initials
26
- * read clearly on every swatch; picked deterministically by hashing a stable id.
26
+ * The categorical palette (10). Saturated mid-lightness colors chosen so a white knockout reads
27
+ * clearly on every swatch shared by Avatar fallback backgrounds (picked by hashing a stable id) and
28
+ * Badge decorative tones (mapped by name). Accent-independent, so categorical identity stays stable.
27
29
  */
28
- declare const AVATAR_PALETTE: ModePalette;
29
- /** Number of distinct chart series and avatar swatches. */
30
+ declare const PALETTE: ModePalette;
31
+ /** Number of distinct chart series and categorical palette swatches. */
30
32
  declare const CHART_SERIES_COUNT: number;
31
- declare const AVATAR_SWATCH_COUNT: number;
32
- /** On-avatar text — a fixed knockout that reads on every (saturated) avatar swatch. */
33
- declare const AVATAR_FOREGROUND: "oklch(0.99 0 0)";
33
+ declare const PALETTE_SWATCH_COUNT: number;
34
+ /** Knockout text on a palette swatch — a fixed near-white that reads on every (saturated) swatch. */
35
+ declare const PALETTE_FOREGROUND: "oklch(0.99 0 0)";
34
36
  /**
35
- * Pick a stable avatar swatch index (1-based, matching `bg-avatar-N`) for an id. A small FNV-1a
36
- * hash keeps the mapping deterministic across renders and sessions.
37
+ * Pick a stable palette swatch index (1-based, matching `bg-palette-N`) for an id Avatar's identity
38
+ * hash. A small FNV-1a hash keeps the mapping deterministic across renders and sessions.
37
39
  */
38
40
  declare function avatarIndex(id: string): number;
39
41
  /** Chart roles that alias engine semantics (kept here so the swatch/reference lists them together). */
@@ -67,4 +69,4 @@ declare const CHART_SEMANTIC_ROLES: readonly [{
67
69
  readonly description: "Chart tooltip surface.";
68
70
  }];
69
71
  //#endregion
70
- export { AVATAR_FOREGROUND, AVATAR_PALETTE, AVATAR_SWATCH_COUNT, CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, ModePalette, avatarIndex };
72
+ export { CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, ModePalette, PALETTE, PALETTE_FOREGROUND, PALETTE_SWATCH_COUNT, avatarIndex };
package/dist/palettes.js CHANGED
@@ -26,10 +26,11 @@ const CHART_PALETTE = {
26
26
  ]
27
27
  };
28
28
  /**
29
- * Avatar / identity backgrounds (10). Saturated mid-lightness colors chosen so white initials
30
- * read clearly on every swatch; picked deterministically by hashing a stable id.
29
+ * The categorical palette (10). Saturated mid-lightness colors chosen so a white knockout reads
30
+ * clearly on every swatch shared by Avatar fallback backgrounds (picked by hashing a stable id) and
31
+ * Badge decorative tones (mapped by name). Accent-independent, so categorical identity stays stable.
31
32
  */
32
- const AVATAR_PALETTE = {
33
+ const PALETTE = {
33
34
  dark: [
34
35
  "oklch(0.62 0.17 264)",
35
36
  "oklch(0.62 0.15 196)",
@@ -55,14 +56,14 @@ const AVATAR_PALETTE = {
55
56
  "oklch(0.56 0.16 285)"
56
57
  ]
57
58
  };
58
- /** Number of distinct chart series and avatar swatches. */
59
+ /** Number of distinct chart series and categorical palette swatches. */
59
60
  const CHART_SERIES_COUNT = CHART_PALETTE.dark.length;
60
- const AVATAR_SWATCH_COUNT = AVATAR_PALETTE.dark.length;
61
- /** On-avatar text — a fixed knockout that reads on every (saturated) avatar swatch. */
62
- const AVATAR_FOREGROUND = "oklch(0.99 0 0)";
61
+ const PALETTE_SWATCH_COUNT = PALETTE.dark.length;
62
+ /** Knockout text on a palette swatch — a fixed near-white that reads on every (saturated) swatch. */
63
+ const PALETTE_FOREGROUND = "oklch(0.99 0 0)";
63
64
  /**
64
- * Pick a stable avatar swatch index (1-based, matching `bg-avatar-N`) for an id. A small FNV-1a
65
- * hash keeps the mapping deterministic across renders and sessions.
65
+ * Pick a stable palette swatch index (1-based, matching `bg-palette-N`) for an id Avatar's identity
66
+ * hash. A small FNV-1a hash keeps the mapping deterministic across renders and sessions.
66
67
  */
67
68
  function avatarIndex(id) {
68
69
  let hash = 2166136261;
@@ -70,7 +71,7 @@ function avatarIndex(id) {
70
71
  hash ^= id.charCodeAt(i);
71
72
  hash = Math.imul(hash, 16777619);
72
73
  }
73
- return (hash >>> 0) % AVATAR_SWATCH_COUNT + 1;
74
+ return (hash >>> 0) % PALETTE_SWATCH_COUNT + 1;
74
75
  }
75
76
  /** Chart roles that alias engine semantics (kept here so the swatch/reference lists them together). */
76
77
  const CHART_SEMANTIC_ROLES = [
@@ -111,4 +112,4 @@ const CHART_SEMANTIC_ROLES = [
111
112
  }
112
113
  ];
113
114
  //#endregion
114
- export { AVATAR_FOREGROUND, AVATAR_PALETTE, AVATAR_SWATCH_COUNT, CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, avatarIndex };
115
+ export { CHART_PALETTE, CHART_SEMANTIC_ROLES, CHART_SERIES_COUNT, PALETTE, PALETTE_FOREGROUND, PALETTE_SWATCH_COUNT, avatarIndex };