@oneli8/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.
Files changed (40) hide show
  1. package/AGENTS.md +12 -0
  2. package/FONTS-LICENSE.txt +113 -0
  3. package/PRINCIPLES.md +48 -0
  4. package/README.md +34 -15
  5. package/ai-context.json +53 -0
  6. package/build/css/tokens.css +846 -0
  7. package/build/figma/variables.json +7535 -0
  8. package/build/manifest.json +22 -0
  9. package/build/status/components.json +235 -0
  10. package/build/tailwind/preset.mjs +258 -0
  11. package/build/tailwind/theme.css +125 -0
  12. package/build/typescript/index.d.ts +10 -0
  13. package/build/typescript/index.js +6933 -0
  14. package/fonts/ar-one-sans-latin-ext.woff2 +0 -0
  15. package/fonts/ar-one-sans-latin.woff2 +0 -0
  16. package/fonts/ar-one-sans-vietnamese.woff2 +0 -0
  17. package/fonts/syne-greek.woff2 +0 -0
  18. package/fonts/syne-latin-ext.woff2 +0 -0
  19. package/fonts/syne-latin.woff2 +0 -0
  20. package/fonts.css +63 -0
  21. package/overrides.example.css +53 -0
  22. package/package.json +30 -16
  23. package/schema/component-status.schema.json +32 -0
  24. package/schema/token-file.schema.json +31 -0
  25. package/scripts/build.mjs +246 -0
  26. package/scripts/test.mjs +96 -0
  27. package/src/component.json +1011 -0
  28. package/src/figma-code-syntax.txt +551 -0
  29. package/src/primitive.json +1105 -0
  30. package/src/semantic.json +1998 -0
  31. package/src/themes.json +823 -0
  32. package/status/components.json +16 -0
  33. package/dist/figma/variables.json +0 -3682
  34. package/dist/status/components.json +0 -158
  35. package/dist/tailwind/preset.mjs +0 -335
  36. package/dist/tailwind/theme.css +0 -303
  37. package/dist/tokens.css +0 -597
  38. package/dist/tokens.d.ts +0 -391
  39. package/dist/tokens.js +0 -387
  40. package/src/tokens.json +0 -1936
package/AGENTS.md ADDED
@@ -0,0 +1,12 @@
1
+ # OneLi8 public beta usage
2
+
3
+ Read README.md and PRINCIPLES.md first. Public React exports are limited to Icon,
4
+ iconNames, Button, IconButton and Link. Do not treat unused token families as
5
+ available components. Use skills/oneli8-ui/SKILL.md for composition,
6
+ skills/oneli8-icons/SKILL.md for icon work, and
7
+ skills/oneli8-figma-to-code/SKILL.md for mapping work.
8
+
9
+ Reuse canonical code and semantic tokens. Do not create consumer-local copies
10
+ of existing icons, component skins or state geometry. Ask the maintainer about
11
+ missing design decisions. This public beta does not enforce arbitrary downstream
12
+ code automatically and does not claim complete Figma parity.
@@ -0,0 +1,113 @@
1
+ OneLi8 bundles two typefaces. Neither is OneLi8's work and neither is covered by
2
+ the Apache 2.0 licence that applies to the rest of this package.
3
+
4
+ Syne Copyright (c) 2017 Bonjour Monde, with Reserved Font Name "Syne"
5
+ https://fonts.google.com/specimen/Syne
6
+
7
+ AR One Sans Copyright (c) 2023 The AR One Sans Project Authors
8
+ https://fonts.google.com/specimen/AR+One+Sans
9
+
10
+ Both are licensed under the SIL Open Font License, Version 1.1, reproduced in
11
+ full below. The OFL permits bundling and redistribution with software. It does
12
+ not permit selling the fonts on their own, and it requires that this notice
13
+ travel with them.
14
+
15
+ --------------------------------------------------------------------------------
16
+
17
+ Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
18
+ with Reserved Font Name <Reserved Font Name>.
19
+ Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
20
+ with Reserved Font Name <additional Reserved Font Name>.
21
+ Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).
22
+
23
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
24
+ This license is copied below, and is also available with a FAQ at:
25
+ https://openfontlicense.org
26
+
27
+
28
+ -----------------------------------------------------------
29
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
30
+ -----------------------------------------------------------
31
+
32
+ PREAMBLE
33
+ The goals of the Open Font License (OFL) are to stimulate worldwide
34
+ development of collaborative font projects, to support the font creation
35
+ efforts of academic and linguistic communities, and to provide a free and
36
+ open framework in which fonts may be shared and improved in partnership
37
+ with others.
38
+
39
+ The OFL allows the licensed fonts to be used, studied, modified and
40
+ redistributed freely as long as they are not sold by themselves. The
41
+ fonts, including any derivative works, can be bundled, embedded,
42
+ redistributed and/or sold with any software provided that any reserved
43
+ names are not used by derivative works. The fonts and derivatives,
44
+ however, cannot be released under any other type of license. The
45
+ requirement for fonts to remain under this license does not apply
46
+ to any document created using the fonts or their derivatives.
47
+
48
+ DEFINITIONS
49
+ "Font Software" refers to the set of files released by the Copyright
50
+ Holder(s) under this license and clearly marked as such. This may
51
+ include source files, build scripts and documentation.
52
+
53
+ "Reserved Font Name" refers to any names specified as such after the
54
+ copyright statement(s).
55
+
56
+ "Original Version" refers to the collection of Font Software components as
57
+ distributed by the Copyright Holder(s).
58
+
59
+ "Modified Version" refers to any derivative made by adding to, deleting,
60
+ or substituting -- in part or in whole -- any of the components of the
61
+ Original Version, by changing formats or by porting the Font Software to a
62
+ new environment.
63
+
64
+ "Author" refers to any designer, engineer, programmer, technical
65
+ writer or other person who contributed to the Font Software.
66
+
67
+ PERMISSION & CONDITIONS
68
+ Permission is hereby granted, free of charge, to any person obtaining
69
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
70
+ redistribute, and sell modified and unmodified copies of the Font
71
+ Software, subject to the following conditions:
72
+
73
+ 1) Neither the Font Software nor any of its individual components,
74
+ in Original or Modified Versions, may be sold by itself.
75
+
76
+ 2) Original or Modified Versions of the Font Software may be bundled,
77
+ redistributed and/or sold with any software, provided that each copy
78
+ contains the above copyright notice and this license. These can be
79
+ included either as stand-alone text files, human-readable headers or
80
+ in the appropriate machine-readable metadata fields within text or
81
+ binary files as long as those fields can be easily viewed by the user.
82
+
83
+ 3) No Modified Version of the Font Software may use the Reserved Font
84
+ Name(s) unless explicit written permission is granted by the corresponding
85
+ Copyright Holder. This restriction only applies to the primary font name as
86
+ presented to the users.
87
+
88
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
89
+ Software shall not be used to promote, endorse or advertise any
90
+ Modified Version, except to acknowledge the contribution(s) of the
91
+ Copyright Holder(s) and the Author(s) or with their explicit written
92
+ permission.
93
+
94
+ 5) The Font Software, modified or unmodified, in part or in whole,
95
+ must be distributed entirely under this license, and must not be
96
+ distributed under any other license. The requirement for fonts to
97
+ remain under this license does not apply to any document created
98
+ using the Font Software.
99
+
100
+ TERMINATION
101
+ This license becomes null and void if any of the above conditions are
102
+ not met.
103
+
104
+ DISCLAIMER
105
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
106
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
107
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
108
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
109
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
110
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
111
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
112
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
113
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/PRINCIPLES.md ADDED
@@ -0,0 +1,48 @@
1
+ # OneLi8 principles
2
+
3
+ OneLi8 is intended for broad human benefit and conceived as service to Guruji
4
+ Shrii Arnav. His teachings inspire the project; implementation specifications
5
+ are OneLi8's own work. Service, clarity, harmony, proportion, restraint and
6
+ evolution guide its decisions.
7
+
8
+ ## Three distinct operating laws
9
+
10
+ 1. Atomic Design governs composition: atoms → molecules → organisms → templates
11
+ → pages. Icon plus label is a molecule, not a new atom. Private vector pieces
12
+ and layout wrappers need not become public components.
13
+ 2. OneLi8 Modularity governs ownership, reuse, semantic token dependencies,
14
+ optional-slot collapse and independent updates. Reuse an existing owner,
15
+ extend its API, or compose it before inventing another owner.
16
+ 3. Numerical atomicity governs the 3px construction rhythm and approved optical
17
+ exceptions, including the shared 1.8 icon stroke. Do not invent per-size strokes.
18
+
19
+ An optional sixth level, Spatial Experience, follows Page; it is not an extra
20
+ layer inside a button. Spatial ambition does not imply physical-device validation.
21
+
22
+ ## Materials and color
23
+
24
+ Gem Morphism is a transparent material skin, not a separate component anatomy.
25
+ Its four guiding qualities are Cut (bezel/edge), Color (semantic tint), Clarity
26
+ (legibility), and Carat/weight (appropriate visual presence). Facets are rare
27
+ accents, not mandatory decoration. Preserve near-white Gem content and test
28
+ contrast on the actual backdrop; do not promise automatic background sensing.
29
+
30
+ Regular and Gem reuse structure, measurements and behavior. Theme and primary
31
+ color are independent. Product colors consume semantic/component roles rather
32
+ than copied palette values. Use approved inward focus treatment without clipping
33
+ or changing a control's outer dimensions.
34
+
35
+ ## Structural space
36
+
37
+ Declare Fill, Hug or governed Fixed sizing. State surfaces share their owner's
38
+ boundary. Parent inset plus child inset is intentional, not accidental duplicated
39
+ padding. Removing an optional icon removes its gap. Preserve canonical spacing,
40
+ radius relationships, typography and icon pool rather than drawing lookalikes.
41
+
42
+ ## Evidence before claims
43
+
44
+ For new patterns, inspect Mobbin examples and relevant official interaction
45
+ guidance, then apply OneLi8's own identity. For repairs, approved decisions and
46
+ canonical owners come first. Record property, structural/token, visual and
47
+ runtime evidence separately. Changes require a Figma/code impact assessment;
48
+ no access or missing mapping means an explicit gap, not assumed synchronization.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @oneli8/tokens
2
2
 
3
- OneLi8 Design System design tokens compiled from Figma.
3
+ OneLi8 Design System, design tokens compiled from Figma.
4
4
 
5
5
  ```sh
6
6
  npm install @oneli8/tokens
@@ -12,13 +12,13 @@ import { tokens } from '@oneli8/tokens'; // flat { 'color-text-primary': '#1518
12
12
  ```
13
13
 
14
14
  Every value is generated from `src/tokens.json`, which is verified against the
15
- Figma file rather than hand-maintained. Do not edit `dist/` edit the source and
15
+ Figma file rather than maintained by hand. Do not edit `dist/`, edit the source and
16
16
  rebuild.
17
17
 
18
18
  ## What the vocabulary contains
19
19
 
20
20
  99 colour primitives across 9 ramps, 68 semantic colour roles, 45 Gem material
21
- roles, 27 control-material roles, a 3px-atomic dimension scale, 9 radii, 9
21
+ roles, 27 control material roles, a 3px atomic dimension scale, 9 radii, 9
22
22
  composite typography roles and 5 elevations.
23
23
 
24
24
  Two rules matter when consuming it:
@@ -27,18 +27,18 @@ Two rules matter when consuming it:
27
27
  `color-actionprimary-default` is a decision. Primitives are hidden from Figma
28
28
  pickers for the same reason.
29
29
  - **Use the `.ol8-type-<role>` class, not individual font variables.** Typography
30
- is composite in Figma a role bundles family, size, line height, weight and
31
- tracking and the class applies all of them together.
30
+ is composite in Figma, a role bundles family, size, line height, weight and
31
+ tracking, and the class applies all of them together.
32
32
 
33
33
  ## Entry points
34
34
 
35
35
  | Import | What it gives you |
36
36
  |---|---|
37
- | `@oneli8/tokens` | flat `{ name: value }` map, with a literal-union key type |
37
+ | `@oneli8/tokens` | flat `{ name: value }` map, with a literal union key type |
38
38
  | `@oneli8/tokens/css` | the custom properties and `.ol8-type-*` classes |
39
39
  | `@oneli8/tokens/tailwind` | Tailwind v3 preset |
40
40
  | `@oneli8/tokens/tailwind.css` | Tailwind v4 `@theme` bridge |
41
- | `@oneli8/tokens/figma` | round-trip payload: collections, theme modes, type and elevation styles |
41
+ | `@oneli8/tokens/figma` | round trip payload: collections, theme modes, type and elevation styles |
42
42
  | `@oneli8/tokens/status` | component maturity records |
43
43
  | `@oneli8/tokens/source` | the editable `tokens.json` |
44
44
 
@@ -62,17 +62,36 @@ primary family; it does not bake a blue at build time.
62
62
  The JS map is the exception: it holds resolved literals, because code that reads
63
63
  it wants an actual colour, not a `var()` string.
64
64
 
65
+ ## Why this exists
66
+
67
+ OneLi8 means One Light. It was created by Akshay Dhore, intended for broad human
68
+ benefit and conceived as service to Guruji Shrii Arnav, whose teachings inspire
69
+ it. Service, clarity, harmony, proportion, restraint and evolution guide its
70
+ decisions. `PRINCIPLES.md` ships inside this package and sets them out in full.
71
+
72
+ The practical intention: most design systems hand you components and hope you
73
+ stay inside them. This one hands you the reasoning too, so when you need
74
+ something it does not ship you can build it and have it still belong.
75
+
65
76
  ## Naming
66
77
 
67
- Hyphens separate hierarchy levels; compound words inside a level run together.
68
- So `--ol8-focus-ring-innerwidth`, not `inner-width` — and likewise
69
- `surfacedefault`, `disabledcontent`, `paddinginline`, `cutedge`,
70
- `opaqueequivalent`. This mirrors the Figma variable names exactly.
78
+ The structure is borrowed from Sanskrit grammar rather than a CSS convention.
79
+
80
+ **A compound naming one thing is one word.** `actionprimary` is not action plus
81
+ primary, it is a single role. `cutedge` is one feature of the Gem material.
82
+
83
+ **A qualifier stays separate from what it qualifies.** In
84
+ `--ol8-material-control-gem--primary-hover-start`, `hover` is a state applied to
85
+ `start`, so it keeps its hyphen. That is why `disabledcontent` is joined and
86
+ `hover-start` is not.
87
+
88
+ Hyphens separate levels of the hierarchy, never words inside a level. The words
89
+ themselves stay readable: no abbreviations and no truncation.
71
90
 
72
91
  ## Theming
73
92
 
74
- Three independent axes, each an attribute. They compose set two at once and you
75
- get both; there is no Cartesian product of pre-baked modes.
93
+ Three independent axes, each an attribute. They compose, set two at once and you
94
+ get both; there is no Cartesian product of pre baked modes.
76
95
 
77
96
  ```html
78
97
  <html data-ol8-color-scheme="dark" data-ol8-primary="orange">
@@ -92,9 +111,9 @@ primitive, or your UI will not follow the theme.
92
111
  Not yet ported from the Figma theme source: the `typographyViewport` axis
93
112
  (`medium` / `expanded`), which needs `font.size.090`, `font.line.096` and a
94
113
  `font.tracking.*` scale this tree has never synced; dark overrides for the five
95
- `elevation-*` composites; and dark link-state and icon-button-surface roles,
114
+ `elevation-*` composites; and dark link state and icon button surface roles,
96
115
  which have no token in this vocabulary yet.
97
116
 
98
117
  ## Licence
99
118
 
100
- Apache-2.0. Created by Akshay Dhore. See `LICENSE` and `NOTICE`.
119
+ Apache 2.0. Created by Akshay Dhore. See `LICENSE` and `NOTICE`.
@@ -0,0 +1,53 @@
1
+ {
2
+ "$comment": "GENERATED by packages/sync/src/build-package-context.mjs — do not edit.",
3
+ "system": "OneLi8",
4
+ "version": "1.0.0-beta.5",
5
+ "meaning": "OneLi8 means One Light.",
6
+ "foundations": {
7
+ "package": "@oneli8/tokens",
8
+ "css": "@oneli8/tokens/css",
9
+ "tokenPrefix": "--ol8-",
10
+ "namingAuthority": "Figma. Every variable carries an explicit codeSyntax, recorded verbatim in packages/tokens/src/figma-code-syntax.txt. Names are never derived from a rule.",
11
+ "rules": [
12
+ "Components consume SEMANTIC roles only. Primitives (color-<family>-<step>) are hidden from pickers in Figma and must not appear in component code.",
13
+ "color-primary-* is an alias ramp onto color-blue-* — identical values, distinct names. Prefer the semantic role over either.",
14
+ "Dimension scale is 3px-atomic. Even multiples for structural layout; odd multiples are deliberate optical or micro-gap choices.",
15
+ "Elevation ink is cyan-840 rgb(22,63,75) — never default black.",
16
+ "Typography roles are composite. Use the .ol8-type-<role> class, not the individual font vars.",
17
+ "shape-radius-full (999px) is reserved for pills and circles. Soft hexagons are component-specific recipes, not a radius token."
18
+ ]
19
+ },
20
+ "readFirst": [
21
+ "PRINCIPLES.md",
22
+ "README.md"
23
+ ],
24
+ "scope": "Design decisions only. No markup and no components, so nothing here can conflict with a framework.",
25
+ "usingTheseTokens": {
26
+ "steps": [
27
+ "Reach for a SEMANTIC token, never a primitive and never a literal. color-actionprimary-default, not color-blue-600 and not #2c438b.",
28
+ "Every dimension sits on the 3px grid. An exception needs an approval record, not a rounded number.",
29
+ "Icons come from the pool. To draw a new one follow skills/oneli8-icons: a 24px neutral source on the shared 1.8 stroke."
30
+ ],
31
+ "forbidden": [
32
+ "A literal colour, size or font value anywhere in a component.",
33
+ "A primitive token in a component. Primitives are hidden from the Figma pickers for the same reason."
34
+ ]
35
+ },
36
+ "themeAxes": {
37
+ "data-ol8-color-scheme": [
38
+ "light",
39
+ "dark"
40
+ ],
41
+ "data-ol8-primary": [
42
+ "blue",
43
+ "orange",
44
+ "green"
45
+ ],
46
+ "data-ol8-type-mode": [
47
+ "compact",
48
+ "medium",
49
+ "expanded"
50
+ ],
51
+ "note": "Independent axes. Set two and you get both; there is no combined mode."
52
+ }
53
+ }