@polyxd/ds-kit 0.1.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/LICENSE +202 -0
- package/NOTICE +177 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +216 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.js +274 -0
- package/dist/index.js.map +1 -0
- package/dist/infer.d.ts +27 -0
- package/dist/infer.js +201 -0
- package/dist/infer.js.map +1 -0
- package/dist/polyxd.d.ts +2 -0
- package/dist/polyxd.js +45 -0
- package/dist/polyxd.js.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
package/NOTICE
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Polyxd
|
|
2
|
+
Copyright 2026 the Polyxd authors
|
|
3
|
+
|
|
4
|
+
This product includes software developed at Polyxd, licensed under the Apache
|
|
5
|
+
License, Version 2.0 (see LICENSE).
|
|
6
|
+
|
|
7
|
+
It also includes material from the projects below. Each is used under its own
|
|
8
|
+
licence, and each licence is included in full beside the material it covers.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Design-system packs
|
|
12
|
+
|
|
13
|
+
A pack reads a design system's published tokens and maps them onto Polyxd's
|
|
14
|
+
semantic token contract. The upstream token files are vendored verbatim — so a
|
|
15
|
+
pack can be regenerated and audited without a network — under that pack's
|
|
16
|
+
`scripts/sources/` directory, together with the upstream licence.
|
|
17
|
+
|
|
18
|
+
The packs are Polyxd's work, not the work of the design systems they read. The
|
|
19
|
+
names below identify whose tokens a pack reads. Polyxd is not affiliated with,
|
|
20
|
+
endorsed by, or sponsored by any of these projects or their owners, and each
|
|
21
|
+
name is the trademark of its owner.
|
|
22
|
+
|
|
23
|
+
### Ant Design (`@polyxd/ds-antd`)
|
|
24
|
+
|
|
25
|
+
Upstream: https://github.com/ant-design/ant-design
|
|
26
|
+
|
|
27
|
+
- npm:antd 6.6.4 — MIT
|
|
28
|
+
- npm:@ant-design/colors 8.0.1 — MIT
|
|
29
|
+
|
|
30
|
+
Vendored under `packages/ds-antd/scripts/sources/`, with the upstream licence file beside it.
|
|
31
|
+
|
|
32
|
+
### Bootstrap 5 (`@polyxd/ds-bootstrap`)
|
|
33
|
+
|
|
34
|
+
Upstream: https://github.com/twbs/bootstrap
|
|
35
|
+
|
|
36
|
+
- npm:bootstrap dist/css/bootstrap.css 5.3.8 — MIT
|
|
37
|
+
|
|
38
|
+
Vendored under `packages/ds-bootstrap/scripts/sources/`, with the upstream licence file beside it.
|
|
39
|
+
|
|
40
|
+
### IBM Carbon (`@polyxd/ds-carbon`)
|
|
41
|
+
|
|
42
|
+
Upstream: https://github.com/carbon-design-system/carbon
|
|
43
|
+
|
|
44
|
+
- npm:@carbon/colors 11.58.0 — Apache-2.0
|
|
45
|
+
- npm:@carbon/themes 11.81.0 — Apache-2.0
|
|
46
|
+
- npm:@carbon/layout 11.59.0 — Apache-2.0
|
|
47
|
+
- npm:@carbon/type 11.67.0 — Apache-2.0
|
|
48
|
+
- npm:@carbon/motion 11.52.0 — Apache-2.0
|
|
49
|
+
- npm:@carbon/charts scss/_color-palette.scss 1.27.20 — Apache-2.0
|
|
50
|
+
- npm:@carbon/styles scss/utilities/_box-shadow.scss and _focus-outline.scss 1.115.0 — Apache-2.0
|
|
51
|
+
|
|
52
|
+
Vendored under `packages/ds-carbon/scripts/sources/`, with the upstream licence file beside it.
|
|
53
|
+
|
|
54
|
+
### Chakra UI 3 (`@polyxd/ds-chakra`)
|
|
55
|
+
|
|
56
|
+
Upstream: https://github.com/chakra-ui/chakra-ui
|
|
57
|
+
|
|
58
|
+
- npm:@chakra-ui/react defaultSystem.getTokenCss 3.37.0 — MIT
|
|
59
|
+
|
|
60
|
+
Vendored under `packages/ds-chakra/scripts/sources/`, with the upstream licence file beside it.
|
|
61
|
+
|
|
62
|
+
### Microsoft Fluent 2 (`@polyxd/ds-fluent`)
|
|
63
|
+
|
|
64
|
+
Upstream: https://github.com/microsoft/fluentui
|
|
65
|
+
|
|
66
|
+
- npm:@fluentui/tokens 1.0.0-alpha.24 — MIT
|
|
67
|
+
|
|
68
|
+
Vendored under `packages/ds-fluent/scripts/sources/`, with the upstream licence file beside it.
|
|
69
|
+
|
|
70
|
+
### GOV.UK Frontend (`@polyxd/ds-govuk`)
|
|
71
|
+
|
|
72
|
+
Upstream: https://github.com/alphagov/govuk-frontend
|
|
73
|
+
|
|
74
|
+
- npm:govuk-frontend dist/govuk/settings 6.5.1 — MIT
|
|
75
|
+
|
|
76
|
+
Vendored under `packages/ds-govuk/scripts/sources/`, with the upstream licence file beside it.
|
|
77
|
+
|
|
78
|
+
### Mantine 8 (`@polyxd/ds-mantine`)
|
|
79
|
+
|
|
80
|
+
Upstream: https://github.com/mantinedev/mantine
|
|
81
|
+
|
|
82
|
+
- npm:@mantine/core styles.css 8.4.2 — MIT
|
|
83
|
+
|
|
84
|
+
Vendored under `packages/ds-mantine/scripts/sources/`, with the upstream licence file beside it.
|
|
85
|
+
|
|
86
|
+
### Material 3 (`@polyxd/ds-material3`)
|
|
87
|
+
|
|
88
|
+
Upstream: https://github.com/material-components/material-web
|
|
89
|
+
|
|
90
|
+
- npm:@material/material-color-utilities 0.4.0 — Apache-2.0
|
|
91
|
+
- github:material-components/material-web tokens/versions/v0_192/_md-ref-typeface.scss, _md-sys-typescale.scss, _md-sys-shape.scss, _md-sys-motion.scss, _md-sys-state.scss, _md-sys-elevation.scss v2.5.0 (commit b4de401eb665ec63474f39319a4ba8f2145974cc) — Apache-2.0
|
|
92
|
+
- github:material-components/material-web tokens/versions/v0_192/_md-comp-scrim.scss, _md-comp-filled-button.scss, _md-comp-icon-button.scss, _md-comp-outlined-text-field.scss v2.5.0 (commit b4de401eb665ec63474f39319a4ba8f2145974cc) — Apache-2.0
|
|
93
|
+
- github:material-components/material-web tokens/_md-comp-focus-ring.scss and elevation/internal/_elevation.scss v2.5.0 (commit b4de401eb665ec63474f39319a4ba8f2145974cc) — Apache-2.0
|
|
94
|
+
|
|
95
|
+
Vendored under `packages/ds-material3/scripts/sources/`, with the upstream licence file beside it.
|
|
96
|
+
|
|
97
|
+
### Shopify Polaris (`@polyxd/ds-polaris`)
|
|
98
|
+
|
|
99
|
+
Upstream: https://github.com/Shopify/polaris
|
|
100
|
+
|
|
101
|
+
- npm:@shopify/polaris-tokens dist/css/styles.css 9.4.2 — MIT
|
|
102
|
+
|
|
103
|
+
Vendored under `packages/ds-polaris/scripts/sources/`, with the upstream licence file beside it.
|
|
104
|
+
|
|
105
|
+
### GitHub Primer (`@polyxd/ds-primer`)
|
|
106
|
+
|
|
107
|
+
Upstream: https://github.com/primer/primitives
|
|
108
|
+
|
|
109
|
+
- npm:@primer/primitives dist/css 11.10.0 — MIT
|
|
110
|
+
|
|
111
|
+
Vendored under `packages/ds-primer/scripts/sources/`, with the upstream licence file beside it.
|
|
112
|
+
|
|
113
|
+
### Radix Themes 3 (`@polyxd/ds-radix`)
|
|
114
|
+
|
|
115
|
+
Upstream: https://github.com/radix-ui/themes
|
|
116
|
+
|
|
117
|
+
- npm:@radix-ui/themes styles.css 3.3.0 — MIT
|
|
118
|
+
|
|
119
|
+
Vendored under `packages/ds-radix/scripts/sources/`, with the upstream licence file beside it.
|
|
120
|
+
|
|
121
|
+
### shadcn/ui on Tailwind CSS (`@polyxd/ds-shadcn`)
|
|
122
|
+
|
|
123
|
+
Upstream: https://github.com/shadcn-ui/ui
|
|
124
|
+
|
|
125
|
+
- shadcn/ui default theme main @ 2026-09-20 — MIT
|
|
126
|
+
- npm:tailwindcss theme.css 4.3.3 — MIT
|
|
127
|
+
|
|
128
|
+
Vendored under `packages/ds-shadcn/scripts/sources/`, with the upstream licence file beside it.
|
|
129
|
+
|
|
130
|
+
### Adobe Spectrum 2 (`@polyxd/ds-spectrum`)
|
|
131
|
+
|
|
132
|
+
Upstream: https://github.com/adobe/spectrum-tokens
|
|
133
|
+
|
|
134
|
+
- npm:@adobe/spectrum-tokens dist/json/variables.json 15.4.1 — Apache-2.0
|
|
135
|
+
|
|
136
|
+
Vendored under `packages/ds-spectrum/scripts/sources/`, with the upstream licence file beside it.
|
|
137
|
+
|
|
138
|
+
## Specification
|
|
139
|
+
|
|
140
|
+
### A2UI
|
|
141
|
+
|
|
142
|
+
- `packages/a2ui/vendor/a2ui/v1_0-04e6f07/` — Apache-2.0
|
|
143
|
+
|
|
144
|
+
Vendored at a pinned commit so the component catalogue can be checked against
|
|
145
|
+
A2UI's schema without a network.
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## Dependencies
|
|
149
|
+
|
|
150
|
+
Everything Polyxd depends on at runtime or to build is fetched from npm rather
|
|
151
|
+
than vendored, so the licences below are recorded rather than reproduced.
|
|
152
|
+
|
|
153
|
+
Apache-2.0: playwright
|
|
154
|
+
MIT: react, react-dom, radix-ui, ajv, ajv-formats, vite, @vitejs/plugin-react,
|
|
155
|
+
marked, lenis, @types/react, @types/react-dom
|
|
156
|
+
MIT OR Apache-2.0: wrangler, @cloudflare/workers-types
|
|
157
|
+
|
|
158
|
+
Two need a word.
|
|
159
|
+
|
|
160
|
+
**axe-core** (Mozilla Public License 2.0) runs inside the verifier's rendered
|
|
161
|
+
audit. MPL-2.0 is file-level copyleft: it attaches to modified MPL files, and
|
|
162
|
+
axe-core is used unmodified, as a library. No Polyxd file is covered by it.
|
|
163
|
+
|
|
164
|
+
**GSAP** (https://gsap.com/standard-license) drives the motion on polyxd.com
|
|
165
|
+
only, and is not an OSI-approved licence. It is not used by the spec, the
|
|
166
|
+
renderer, the packs or the verifier, none of which it can reach; and no GSAP
|
|
167
|
+
file is committed to this repository — the site's build copies them out of
|
|
168
|
+
node_modules into its own output. Anyone building the site is therefore subject
|
|
169
|
+
to GSAP's licence, and anyone using the rest of Polyxd is not.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## Fonts
|
|
173
|
+
|
|
174
|
+
No font files are distributed. polyxd.com loads its typefaces from Google Fonts
|
|
175
|
+
at request time, and a design-system pack names the typeface its system
|
|
176
|
+
specifies without shipping it — a pack that asks for Adobe Clean, for example,
|
|
177
|
+
names an open metric-compatible fallback for anyone who does not have it.
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Makes a Polyxd design-system pack out of your own tokens.
|
|
4
|
+
*
|
|
5
|
+
* npx polyxd pack ./src/tokens.css draft a pack, and a mapping to correct
|
|
6
|
+
* npx polyxd pack ./tokens.css --dark ./dark.css when light and dark are separate files
|
|
7
|
+
* npx polyxd pack ./tokens.css --name acme --out ./ds
|
|
8
|
+
*
|
|
9
|
+
* Run it once and it writes two things: a pack, and `polyxd.mapping.json` recording every guess it
|
|
10
|
+
* made. Correct the wrong lines, fill the blank ones, run it again. It prints what is still missing
|
|
11
|
+
* and why each time, so the work is a list that gets shorter rather than a specification to read.
|
|
12
|
+
*
|
|
13
|
+
* It does not invent colours. Where the contract needs something your tokens don't have — a colour
|
|
14
|
+
* that carries 3:1 for a focus ring, say — it says so and names the closest thing you do have.
|
|
15
|
+
*/
|
|
16
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
17
|
+
import { existsSync } from "node:fs";
|
|
18
|
+
import { basename, join, resolve } from "node:path";
|
|
19
|
+
import { contrastRatio, loadContract } from "@polyxd/spec";
|
|
20
|
+
import { cssVars, resolveVars, length, duration, bezier, shadowLayers, writePack } from "./index.js";
|
|
21
|
+
import { inferMapping } from "./infer.js";
|
|
22
|
+
function parse(argv) {
|
|
23
|
+
const positional = argv.filter((a) => !a.startsWith("--"));
|
|
24
|
+
const flag = (name) => {
|
|
25
|
+
const i = argv.indexOf(`--${name}`);
|
|
26
|
+
return i > -1 ? argv[i + 1] : undefined;
|
|
27
|
+
};
|
|
28
|
+
const input = positional[0];
|
|
29
|
+
if (!input) {
|
|
30
|
+
console.log("usage: polyxd pack <tokens.css> [--dark <dark.css>] [--name <name>] [--out <dir>]");
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
const name = flag("name") ?? basename(input).replace(/\.(css|json)$/, "").replace(/[^a-z0-9-]/gi, "-").toLowerCase();
|
|
34
|
+
return { input: resolve(input), dark: flag("dark") ? resolve(flag("dark")) : undefined, name, out: resolve(flag("out") ?? `./ds-${name}`) };
|
|
35
|
+
}
|
|
36
|
+
/** Every custom property in a stylesheet, whatever selector it sits under. */
|
|
37
|
+
async function read(path) {
|
|
38
|
+
const text = await readFile(path, "utf8");
|
|
39
|
+
if (path.endsWith(".json")) {
|
|
40
|
+
// A flat DTCG-ish file: { "color.primary": "#123456" } or { "color": { "primary": { "$value": … } } }
|
|
41
|
+
const flat = {};
|
|
42
|
+
const walk = (node, trail) => {
|
|
43
|
+
if (node && typeof node === "object" && "$value" in node)
|
|
44
|
+
return void (flat[`--${trail.join("-")}`] = String(node.$value));
|
|
45
|
+
if (node && typeof node === "object")
|
|
46
|
+
for (const [k, v] of Object.entries(node))
|
|
47
|
+
walk(v, [...trail, k.replace(/\./g, "-")]);
|
|
48
|
+
else if (typeof node === "string")
|
|
49
|
+
flat[`--${trail.join("-")}`] = node;
|
|
50
|
+
};
|
|
51
|
+
walk(JSON.parse(text), []);
|
|
52
|
+
return flat;
|
|
53
|
+
}
|
|
54
|
+
return resolveVars(cssVars(text, () => true));
|
|
55
|
+
}
|
|
56
|
+
/** A contract token's value, converted to whatever DTCG type the contract says it is. */
|
|
57
|
+
function convert(type, raw) {
|
|
58
|
+
switch (type) {
|
|
59
|
+
case "dimension":
|
|
60
|
+
return length(raw);
|
|
61
|
+
case "duration":
|
|
62
|
+
return duration(raw);
|
|
63
|
+
case "cubicBezier":
|
|
64
|
+
return bezier(raw);
|
|
65
|
+
case "shadow":
|
|
66
|
+
return shadowLayers(raw);
|
|
67
|
+
case "number":
|
|
68
|
+
return Number.parseFloat(raw) || 0;
|
|
69
|
+
default:
|
|
70
|
+
return raw;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* What the contract needs that no token can supply, because it isn't a value a design system
|
|
75
|
+
* publishes: how long a state layer lasts, how wide a line of text runs, how big a touch target is.
|
|
76
|
+
* These are Polyxd's, they are the same for everyone, and a team shouldn't have to invent them.
|
|
77
|
+
*/
|
|
78
|
+
const POLYXD_DEFAULTS = {
|
|
79
|
+
"measure.max": { value: 65, why: "characters per line for running text" },
|
|
80
|
+
"opacity.state.hover": { value: 0.06, why: "state-layer opacity; most systems shade with separate colours instead" },
|
|
81
|
+
"opacity.state.pressed": { value: 0.12, why: "state-layer opacity" },
|
|
82
|
+
"opacity.state.focus": { value: 0.12, why: "state-layer opacity" },
|
|
83
|
+
"opacity.state.disabled": { value: 0.4, why: "disabled content stays perceivable but clearly inactive" },
|
|
84
|
+
"size.target.min": { value: { value: 44, unit: "px" }, why: "the touch target a generated surface is held to" },
|
|
85
|
+
"focus.ring.width": { value: { value: 2, unit: "px" }, why: "a focus ring you can find" },
|
|
86
|
+
"focus.ring.offset": { value: { value: 2, unit: "px" }, why: "a focus ring you can find" },
|
|
87
|
+
"border.width.default": { value: { value: 1, unit: "px" }, why: "a hairline" },
|
|
88
|
+
"border.width.strong": { value: { value: 2, unit: "px" }, why: "a deliberate line" },
|
|
89
|
+
"motion.duration.instant": { value: { value: 100, unit: "ms" }, why: "no motion tokens found" },
|
|
90
|
+
"motion.duration.short": { value: { value: 150, unit: "ms" }, why: "no motion tokens found" },
|
|
91
|
+
"motion.duration.medium": { value: { value: 200, unit: "ms" }, why: "no motion tokens found" },
|
|
92
|
+
"motion.duration.long": { value: { value: 300, unit: "ms" }, why: "no motion tokens found" },
|
|
93
|
+
"motion.easing.standard": { value: [0.4, 0, 0.2, 1], why: "no easing tokens found" },
|
|
94
|
+
"motion.easing.enter": { value: [0, 0, 0.2, 1], why: "no easing tokens found" },
|
|
95
|
+
"motion.easing.exit": { value: [0.4, 0, 1, 1], why: "no easing tokens found" },
|
|
96
|
+
};
|
|
97
|
+
/** The type scale, built from whatever font sizes exist, because no two systems name theirs alike. */
|
|
98
|
+
function typography(vars, mapping) {
|
|
99
|
+
const family = Object.entries(vars).find(([n]) => /font-(family|sans)|fonts?-(body|sans)/.test(n.replace(/^--/, "")))?.[1] ?? "system-ui, sans-serif";
|
|
100
|
+
const sizes = Object.entries(vars)
|
|
101
|
+
.filter(([n, v]) => /font-size|text-(xs|sm|base|md|lg|xl|2xl)/.test(n.replace(/^--/, "")) && /^[\d.]+(px|rem)$/.test(v.trim()))
|
|
102
|
+
.map(([, v]) => length(v).value)
|
|
103
|
+
.sort((a, b) => a - b);
|
|
104
|
+
// Without a scale to read, the contract's own floor: 16px body, and steps either side of it.
|
|
105
|
+
const scale = sizes.length >= 4 ? sizes : [12, 14, 16, 20, 24];
|
|
106
|
+
const at = (i) => ({ value: scale[Math.min(i, scale.length - 1)], unit: "px" });
|
|
107
|
+
const body = Math.max(16, scale.find((s) => s >= 16) ?? 16);
|
|
108
|
+
const style = (size, weight) => ({
|
|
109
|
+
$type: "typography",
|
|
110
|
+
$value: { fontFamily: family, fontSize: size, fontWeight: weight, lineHeight: 1.5, letterSpacing: { value: 0, unit: "px" } },
|
|
111
|
+
});
|
|
112
|
+
void mapping;
|
|
113
|
+
return {
|
|
114
|
+
title: { page: style(at(scale.length - 1), 700), section: style(at(scale.length - 2), 600), item: style({ value: body, unit: "px" }, 600) },
|
|
115
|
+
body: { default: style({ value: body, unit: "px" }, 400), small: style(at(1), 400) },
|
|
116
|
+
label: { default: style(at(1), 500), small: style(at(0), 500) },
|
|
117
|
+
numeric: { display: { ...style(at(scale.length - 1), 700), $extensions: { "com.polyxd": { numeric: "tabular" } } } },
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/** Sets a value at a dotted path inside the nested token tree a pack file uses. */
|
|
121
|
+
function put(tree, path, value) {
|
|
122
|
+
const parts = path.split(".");
|
|
123
|
+
let node = tree;
|
|
124
|
+
for (const part of parts.slice(0, -1))
|
|
125
|
+
node = node[part] ??= {};
|
|
126
|
+
node[parts[parts.length - 1]] = value;
|
|
127
|
+
}
|
|
128
|
+
async function main() {
|
|
129
|
+
const options = parse(process.argv.slice(2).filter((a) => a !== "pack"));
|
|
130
|
+
// Through the spec package, so this works installed from npm and not only in the monorepo.
|
|
131
|
+
const contract = await loadContract();
|
|
132
|
+
const light = await read(options.input);
|
|
133
|
+
const dark = options.dark ? await read(options.dark) : undefined;
|
|
134
|
+
console.log(`read ${Object.keys(light).length} variables from ${basename(options.input)}${dark ? ` and ${Object.keys(dark).length} from ${basename(options.dark)}` : ""}\n`);
|
|
135
|
+
await mkdir(options.out, { recursive: true });
|
|
136
|
+
const mappingPath = join(options.out, "polyxd.mapping.json");
|
|
137
|
+
// A mapping the team has already corrected wins over anything guessed this time round.
|
|
138
|
+
const existing = existsSync(mappingPath) ? JSON.parse(await readFile(mappingPath, "utf8")) : undefined;
|
|
139
|
+
const { mapping: guessed, guesses } = inferMapping(light);
|
|
140
|
+
const mapping = { ...guessed, tokens: { ...guessed.tokens, ...(existing?.tokens ?? {}) } };
|
|
141
|
+
const build = (vars) => {
|
|
142
|
+
const semantic = {};
|
|
143
|
+
const missing = [];
|
|
144
|
+
for (const [token, spec] of Object.entries(contract.tokens)) {
|
|
145
|
+
if (token.startsWith("type."))
|
|
146
|
+
continue;
|
|
147
|
+
const source = mapping.tokens[token];
|
|
148
|
+
const raw = source ? (vars[`--${source}`] ?? vars[source] ?? (source.startsWith("=") ? source.slice(1) : undefined)) : undefined;
|
|
149
|
+
if (raw !== undefined)
|
|
150
|
+
put(semantic, token, { $value: convert(spec.type, raw), $type: spec.type });
|
|
151
|
+
else if (POLYXD_DEFAULTS[token])
|
|
152
|
+
put(semantic, token, { $value: POLYXD_DEFAULTS[token].value, $type: spec.type, $description: `Polyxd default: ${POLYXD_DEFAULTS[token].why}` });
|
|
153
|
+
else
|
|
154
|
+
missing.push({ token, type: spec.type });
|
|
155
|
+
}
|
|
156
|
+
for (const [key, value] of Object.entries(typography(vars, mapping)))
|
|
157
|
+
put(semantic, `type.${key}`, value);
|
|
158
|
+
return { semantic, missing };
|
|
159
|
+
};
|
|
160
|
+
const built = build(light);
|
|
161
|
+
const builtDark = dark ? build(dark) : undefined;
|
|
162
|
+
await writePack({
|
|
163
|
+
dir: options.out,
|
|
164
|
+
name: options.name,
|
|
165
|
+
displayName: options.name.replace(/(^|-)([a-z])/g, (_, s, c) => `${s ? " " : ""}${c.toUpperCase()}`),
|
|
166
|
+
contractVersion: contract.contractVersion ?? "0.2.0",
|
|
167
|
+
modes: dark ? ["light", "dark"] : ["light"],
|
|
168
|
+
provenance: [{ source: `local:${basename(options.input)}`, license: "see the owning project", notes: "Drafted by `polyxd pack` from this project's own tokens." }],
|
|
169
|
+
light: built.semantic,
|
|
170
|
+
dark: builtDark?.semantic ?? built.semantic,
|
|
171
|
+
semantic: built.semantic,
|
|
172
|
+
});
|
|
173
|
+
await writeFile(mappingPath, JSON.stringify(mapping, null, 2) + "\n");
|
|
174
|
+
// ---------- The report, which is the point ----------
|
|
175
|
+
const named = guesses.filter((g) => g.how === "named").length;
|
|
176
|
+
const measured = guesses.filter((g) => g.how === "measured");
|
|
177
|
+
console.log(`mapped ${Object.keys(mapping.tokens).length} of ${Object.keys(contract.tokens).length} contract tokens`);
|
|
178
|
+
console.log(` ${named} from their names${existing ? `, including ${Object.keys(existing.tokens).length} you set` : ""}`);
|
|
179
|
+
for (const g of measured)
|
|
180
|
+
console.log(` ${g.token} ← ${g.from} (${g.why})`);
|
|
181
|
+
const defaults = Object.keys(POLYXD_DEFAULTS).filter((t) => !mapping.tokens[t]);
|
|
182
|
+
if (defaults.length)
|
|
183
|
+
console.log(`\n${defaults.length} tokens took a Polyxd default (state opacities, touch target, focus ring, motion). Override any of them in the mapping.`);
|
|
184
|
+
if (built.missing.length) {
|
|
185
|
+
console.log(`\nstill needed — nothing in your tokens matched, and there is no sensible default:`);
|
|
186
|
+
for (const m of built.missing)
|
|
187
|
+
console.log(` ${m.token.padEnd(34)} (${m.type})`);
|
|
188
|
+
console.log(`\nAdd them to ${basename(mappingPath)}: "${built.missing[0].token}": "your-variable-name", or "=#hex" for a literal.`);
|
|
189
|
+
}
|
|
190
|
+
// Contrast is the part a team can't eyeball, so it is reported whether or not they asked.
|
|
191
|
+
const failures = [];
|
|
192
|
+
for (const pair of contract.contrast ?? []) {
|
|
193
|
+
const fg = mapping.tokens[pair.foreground] ? light[`--${mapping.tokens[pair.foreground]}`] : undefined;
|
|
194
|
+
const bg = mapping.tokens[pair.background] ? light[`--${mapping.tokens[pair.background]}`] : undefined;
|
|
195
|
+
if (!fg || !bg)
|
|
196
|
+
continue;
|
|
197
|
+
try {
|
|
198
|
+
const ratio = contrastRatio(fg, bg);
|
|
199
|
+
if (ratio < pair.min)
|
|
200
|
+
failures.push(` ${pair.foreground} on ${pair.background}: ${ratio.toFixed(2)}:1, needs ${pair.min}:1`);
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
// A colour this tool can't read is reported by the contract check, not guessed at here.
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (failures.length) {
|
|
207
|
+
console.log(`\n${failures.length} of your own pairs don't meet the contrast the contract requires:`);
|
|
208
|
+
for (const f of failures)
|
|
209
|
+
console.log(f);
|
|
210
|
+
console.log(` These are your tokens, not ours — the pack won't paper over them.`);
|
|
211
|
+
}
|
|
212
|
+
console.log(`\nwrote ${options.out}`);
|
|
213
|
+
console.log(`next: npx polyxd check ${join(options.out, "manifest.json")}`);
|
|
214
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