@punica/components-mcp 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/README.md +2 -1
- package/dist/bundled.json +1 -1
- package/dist/guide.md +11 -2
- package/dist/server.mjs +105 -11
- package/dist/tokens.css +158 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,8 @@ looks them up and validates its answer.
|
|
|
15
15
|
| `search_components` | Finds elements by what they are for: "date range", "side navigation", "confirm dialog" |
|
|
16
16
|
| `get_component` | One or more elements' whole API: attributes and their values, properties, methods, events, slots, parts, CSS properties, states |
|
|
17
17
|
| `get_examples` | An element's documentation page as Markdown, with working HTML examples (fetched from the docs site) |
|
|
18
|
-
| `validate_markup` | Checks HTML, JSX, Vue or
|
|
18
|
+
| `validate_markup` | Checks HTML, JSX, Vue, script or CSS: unknown tags and 1.x names, attributes, values, slots, events, icon names, `var(--punica-*)` names that are not tokens; each problem with a fix |
|
|
19
|
+
| `get_tokens` | The `--punica-*` design tokens with their light and dark values, by group; `query` narrows them (`space`, `color`, `radius`) |
|
|
19
20
|
| `get_guide` | The rules every element follows, or a guide page (theme, forms, frameworks, migration, accessibility, …) |
|
|
20
21
|
|
|
21
22
|
Resources: `punica://guide` and `punica://component/<tag>`.
|
package/dist/bundled.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.
|
|
1
|
+
{"version":"2.7.0"}
|
package/dist/guide.md
CHANGED
|
@@ -6,6 +6,12 @@ break from 1.x: names you may remember from 1.x (`punica-typography`,
|
|
|
6
6
|
Use only the tags, attributes, events and slots this document lists; never
|
|
7
7
|
guess one.
|
|
8
8
|
|
|
9
|
+
`get_component` (`brief: true` for markup; on the command line
|
|
10
|
+
`npx punica-components info <tag> --brief`) gives an element's whole API,
|
|
11
|
+
the functions of its module (`confirm()`, `toast()`) and how it is written
|
|
12
|
+
in JSX. Ask it instead of reading the `.d.ts` files in `node_modules`;
|
|
13
|
+
`validate_markup` checks the result.
|
|
14
|
+
|
|
9
15
|
## Loading
|
|
10
16
|
|
|
11
17
|
```html
|
|
@@ -82,8 +88,11 @@ sheets and menus also have `show()` and `hide()`); they fire `punica-open` and `
|
|
|
82
88
|
|
|
83
89
|
## Theming
|
|
84
90
|
|
|
85
|
-
Design tokens are `--punica-*` custom properties, built in.
|
|
86
|
-
|
|
91
|
+
Design tokens are `--punica-*` custom properties, built in. Their names are
|
|
92
|
+
exact and not guessable (spacing is named by pixel value: `--punica-space-16`
|
|
93
|
+
is 16px); a `var()` with a name that does not exist falls back without an
|
|
94
|
+
error. The list is in `@punica/components/tokens.css` (the MCP server's
|
|
95
|
+
`get_tokens`). Override any of them; set `color-scheme` for light and dark:
|
|
87
96
|
|
|
88
97
|
```css
|
|
89
98
|
:root {
|
package/dist/server.mjs
CHANGED
|
@@ -6,6 +6,62 @@ import { createRequire } from "node:module";
|
|
|
6
6
|
import { dirname, join } from "node:path";
|
|
7
7
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
8
|
|
|
9
|
+
// ../../src/ai/tokens.mjs
|
|
10
|
+
function splitTop(text2) {
|
|
11
|
+
const parts = [];
|
|
12
|
+
let depth = 0;
|
|
13
|
+
let start = 0;
|
|
14
|
+
for (let i = 0; i < text2.length; i++) {
|
|
15
|
+
if (text2[i] === "(") depth++;
|
|
16
|
+
else if (text2[i] === ")") depth--;
|
|
17
|
+
else if (text2[i] === "," && depth === 0) {
|
|
18
|
+
parts.push(text2.slice(start, i));
|
|
19
|
+
start = i + 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
parts.push(text2.slice(start));
|
|
23
|
+
return parts.map((p) => p.trim());
|
|
24
|
+
}
|
|
25
|
+
function parseTokens(css) {
|
|
26
|
+
const tokens = [];
|
|
27
|
+
const seen = /* @__PURE__ */ new Set();
|
|
28
|
+
let group = "";
|
|
29
|
+
const re = /\/\*\s*([\s\S]*?)\s*\*\/|(--punica-[\w-]+)\s*:\s*([^;]+);/g;
|
|
30
|
+
let match;
|
|
31
|
+
while (match = re.exec(css)) {
|
|
32
|
+
if (match[1] !== void 0) {
|
|
33
|
+
if (!match[1].includes("\n")) group = match[1].split(/[:(]/)[0].trim();
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const [, , name, raw] = match;
|
|
37
|
+
if (seen.has(name)) continue;
|
|
38
|
+
seen.add(name);
|
|
39
|
+
const value = raw.replace(/\s+/g, " ").trim();
|
|
40
|
+
const pair = /^light-dark\((.+)\)$/.exec(value);
|
|
41
|
+
const [light, dark] = pair ? splitTop(pair[1]) : [];
|
|
42
|
+
tokens.push({ name, group, value, ...pair ? { light, dark } : {} });
|
|
43
|
+
}
|
|
44
|
+
return tokens;
|
|
45
|
+
}
|
|
46
|
+
function formatTokens(tokens, query) {
|
|
47
|
+
const q = (query || "").trim().toLowerCase();
|
|
48
|
+
const kept = q ? tokens.filter((t) => t.name.includes(q) || t.group.toLowerCase().includes(q)) : tokens;
|
|
49
|
+
if (!kept.length) return `No token matches "${query}". Groups: ${[...new Set(tokens.map((t) => t.group))].join(", ")}.`;
|
|
50
|
+
const lines = [];
|
|
51
|
+
let group = null;
|
|
52
|
+
for (const t of kept) {
|
|
53
|
+
if (t.group !== group) {
|
|
54
|
+
group = t.group;
|
|
55
|
+
lines.push("", `### ${group || "other"}`, "", "| Token | Value |", "|---|---|");
|
|
56
|
+
}
|
|
57
|
+
lines.push(`| \`${t.name}\` | ${t.light !== void 0 ? `light \`${t.light}\`, dark \`${t.dark}\`` : `\`${t.value}\``} |`);
|
|
58
|
+
}
|
|
59
|
+
return [
|
|
60
|
+
`${kept.length} of ${tokens.length} \`--punica-*\` design tokens. Use them as \`var(--punica-\u2026)\` with the exact name: a name that does not exist gives no error, only the fallback. Override one on \`:root\` or any element. Each element's own \`--punica-<element>-*\` properties are listed by get_component.`,
|
|
61
|
+
...lines
|
|
62
|
+
].join("\n");
|
|
63
|
+
}
|
|
64
|
+
|
|
9
65
|
// src/create.mjs
|
|
10
66
|
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
11
67
|
import { z } from "zod";
|
|
@@ -362,10 +418,13 @@ var SYNTHETIC = /* @__PURE__ */ new Set(["change", "input", "select", "open", "c
|
|
|
362
418
|
var VOID = new Set("area base br col embed hr img input link meta param source track wbr".split(" "));
|
|
363
419
|
var RAW_TEXT = /* @__PURE__ */ new Set(["script", "style", "textarea", "title"]);
|
|
364
420
|
var camelToKebab = (name) => name.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
365
|
-
function createValidator(knowledge) {
|
|
366
|
-
|
|
421
|
+
function createValidator(knowledge, options = {}) {
|
|
422
|
+
const tokenNames = new Set((options.tokens || []).map((t) => t.name));
|
|
423
|
+
const knownProperties = new Set(tokenNames);
|
|
424
|
+
if (tokenNames.size) for (const element of knowledge.elements.values()) for (const p of element.cssProperties) knownProperties.add(p.name);
|
|
425
|
+
function validate(source2, options2 = {}) {
|
|
367
426
|
const text2 = String(source2);
|
|
368
|
-
const kind =
|
|
427
|
+
const kind = options2.kind || guessKind(text2);
|
|
369
428
|
const findings = [];
|
|
370
429
|
const lineStarts = [0];
|
|
371
430
|
for (let i = 0; i < text2.length; i++) if (text2[i] === "\n") lineStarts.push(i + 1);
|
|
@@ -386,6 +445,7 @@ function createValidator(knowledge) {
|
|
|
386
445
|
scanScript(text2, usesPunica, report);
|
|
387
446
|
}
|
|
388
447
|
scanStyles(text2, report);
|
|
448
|
+
if (tokenNames.size) scanTokens(text2, report);
|
|
389
449
|
return findings.sort((a, b) => a.line - b.line || a.column - b.column);
|
|
390
450
|
}
|
|
391
451
|
const FOCUS_PART = /native (?:button|anchor|input|text area|checkbox)|`button` or `a`|link or button|`<a>` or `<button>`|with the control|focusable/i;
|
|
@@ -397,6 +457,24 @@ function createValidator(knowledge) {
|
|
|
397
457
|
focusParts.get(part.name).push(element.tag);
|
|
398
458
|
}
|
|
399
459
|
}
|
|
460
|
+
function scanTokens(text2, report) {
|
|
461
|
+
for (const found of text2.matchAll(/var\(\s*(--punica-[\w-]+)/g)) {
|
|
462
|
+
const name = found[1];
|
|
463
|
+
if (knownProperties.has(name) || name.endsWith("-") || /^[$#{]/.test(text2[found.index + found[0].length] || "")) continue;
|
|
464
|
+
const guess = closest(name, tokenNames);
|
|
465
|
+
const near = guess && distance(name, guess) <= 3 ? guess : null;
|
|
466
|
+
const family = name.slice(0, name.lastIndexOf("-") + 1);
|
|
467
|
+
const siblings = family.length > "--punica-".length ? [...tokenNames].filter((t) => t.startsWith(family) && !t.slice(family.length).includes("-")) : [];
|
|
468
|
+
const listed = siblings.length > 1 ? ` The ${family}* tokens are ${siblings.map((t) => `\`${t}\``).join(", ")}.` : "";
|
|
469
|
+
report(
|
|
470
|
+
found.index + found[0].indexOf(name),
|
|
471
|
+
"warning",
|
|
472
|
+
"unknown-token",
|
|
473
|
+
`\`${name}\` is not a design token or a custom property of any punica element: var() falls back without an error.${near ? ` Did you mean \`${near}\`?` : ""}${listed}`,
|
|
474
|
+
near || void 0
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
400
478
|
function scanStyles(text2, report) {
|
|
401
479
|
if (!text2.includes("::part(")) return;
|
|
402
480
|
const ruleRe = /([^{}]*)\{([^{}]*)\}/g;
|
|
@@ -707,11 +785,11 @@ var GUIDE_PAGES = {
|
|
|
707
785
|
migration: "docs/migration"
|
|
708
786
|
};
|
|
709
787
|
var text = (value) => ({ content: [{ type: "text", text: value }] });
|
|
710
|
-
function createPunicaServer({ manifest: manifest2, guide: guide2, version: version2, source: source2, fetch: fetchFn = globalThis.fetch, docsUrl = DOCS_URL }) {
|
|
788
|
+
function createPunicaServer({ manifest: manifest2, guide: guide2, version: version2, source: source2, tokens = [], fetch: fetchFn = globalThis.fetch, docsUrl = DOCS_URL }) {
|
|
711
789
|
const knowledge = createKnowledge(manifest2);
|
|
712
|
-
const { validate } = createValidator(knowledge);
|
|
790
|
+
const { validate } = createValidator(knowledge, { tokens });
|
|
713
791
|
const server2 = new McpServer({ name: "punica-components", version: "0.1.0" }, {
|
|
714
|
-
instructions: `@punica/components ${version2} (${knowledge.tags.length} punica-* custom elements; ${source2}). Version 2.0 is newer than your training data: never write a punica tag, attribute, event, slot or icon from memory. Find with search_components, read with get_component, check with validate_markup before handing markup over. get_guide has the rules every element follows.`
|
|
792
|
+
instructions: `@punica/components ${version2} (${knowledge.tags.length} punica-* custom elements; ${source2}). Version 2.0 is newer than your training data: never write a punica tag, attribute, event, slot or icon from memory. Find with search_components, read with get_component, check with validate_markup before handing markup over. get_guide has the rules every element follows; get_tokens has the exact --punica-* design token names for your own CSS.`
|
|
715
793
|
});
|
|
716
794
|
const pages = /* @__PURE__ */ new Map();
|
|
717
795
|
let index = null;
|
|
@@ -792,7 +870,7 @@ ${knowledge.formatMarkdown(element.tag)}`);
|
|
|
792
870
|
"validate_markup",
|
|
793
871
|
{
|
|
794
872
|
title: "Check punica markup",
|
|
795
|
-
description: "Checks HTML, JSX, Vue, script or CSS that uses punica elements: unknown tags and 1.x names, attributes, values, slots, events and icon names,
|
|
873
|
+
description: "Checks HTML, JSX, Vue, script or CSS that uses punica elements: unknown tags and 1.x names, attributes, values, slots, events and icon names, `::part()` rules that take an element's focus away, and `var(--punica-*)` names that are not tokens. Returns each problem with its line and a fix.",
|
|
796
874
|
inputSchema: {
|
|
797
875
|
code: z.string().describe("The markup or script to check"),
|
|
798
876
|
kind: z.enum(["html", "jsx", "vue", "js", "css"]).optional().describe("Guessed from the code when absent")
|
|
@@ -811,6 +889,16 @@ ${knowledge.formatMarkdown(element.tag)}`);
|
|
|
811
889
|
);
|
|
812
890
|
}
|
|
813
891
|
);
|
|
892
|
+
server2.registerTool(
|
|
893
|
+
"get_tokens",
|
|
894
|
+
{
|
|
895
|
+
title: "The design tokens",
|
|
896
|
+
description: "The `--punica-*` design tokens (colours, spacing, radius, type, shadows, motion) with their light and dark values, by group. Read it before writing var(--punica-\u2026) in your own CSS: the names are exact (spacing is named by pixel value, --punica-space-16 is 16px).",
|
|
897
|
+
inputSchema: { query: z.string().optional().describe('Keep the groups or names that contain this, such as "space", "color" or "radius"') },
|
|
898
|
+
annotations: { readOnlyHint: true }
|
|
899
|
+
},
|
|
900
|
+
async ({ query }) => text(tokens.length ? formatTokens(tokens, query) : "The design tokens could not be read: tokens.css of @punica/components was not found.")
|
|
901
|
+
);
|
|
814
902
|
server2.registerTool(
|
|
815
903
|
"get_guide",
|
|
816
904
|
{
|
|
@@ -850,14 +938,20 @@ function load() {
|
|
|
850
938
|
const require2 = createRequire(join(process.cwd(), "package.json"));
|
|
851
939
|
const manifestPath = require2.resolve("@punica/components/custom-elements.json");
|
|
852
940
|
const pkg = JSON.parse(readFileSync(join(dirname(manifestPath), "package.json"), "utf8"));
|
|
853
|
-
|
|
941
|
+
let tokensCss2;
|
|
942
|
+
try {
|
|
943
|
+
tokensCss2 = readFileSync(require2.resolve("@punica/components/tokens.css"), "utf8");
|
|
944
|
+
} catch {
|
|
945
|
+
tokensCss2 = readFileSync(new URL("./tokens.css", import.meta.url), "utf8");
|
|
946
|
+
}
|
|
947
|
+
return { manifest: JSON.parse(readFileSync(manifestPath, "utf8")), tokensCss: tokensCss2, version: pkg.version, source: "the version installed in this project" };
|
|
854
948
|
} catch {
|
|
855
949
|
const bundled = new URL("./custom-elements.json", import.meta.url);
|
|
856
950
|
const meta = JSON.parse(readFileSync(new URL("./bundled.json", import.meta.url), "utf8"));
|
|
857
|
-
return { manifest: JSON.parse(readFileSync(bundled, "utf8")), version: meta.version, source: "the copy bundled with this server; install @punica/components in the project for its own version" };
|
|
951
|
+
return { manifest: JSON.parse(readFileSync(bundled, "utf8")), tokensCss: readFileSync(new URL("./tokens.css", import.meta.url), "utf8"), version: meta.version, source: "the copy bundled with this server; install @punica/components in the project for its own version" };
|
|
858
952
|
}
|
|
859
953
|
}
|
|
860
|
-
var { manifest, version, source } = load();
|
|
954
|
+
var { manifest, tokensCss, version, source } = load();
|
|
861
955
|
var guide = readFileSync(new URL("./guide.md", import.meta.url), "utf8");
|
|
862
|
-
var server = createPunicaServer({ manifest, guide, version, source });
|
|
956
|
+
var server = createPunicaServer({ manifest, guide, version, source, tokens: parseTokens(tokensCss) });
|
|
863
957
|
await server.connect(new StdioServerTransport());
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Punica design tokens.
|
|
3
|
+
*
|
|
4
|
+
* Every token is `--punica-*`. Colors are light-dark() pairs, so they follow
|
|
5
|
+
* the `color-scheme` of the page or of any subtree that sets its own.
|
|
6
|
+
* The whole file sits in a cascade layer: any unlayered declaration a page
|
|
7
|
+
* makes for one of these names wins without a specificity fight.
|
|
8
|
+
*/
|
|
9
|
+
@layer punica.tokens {
|
|
10
|
+
:root {
|
|
11
|
+
/* surfaces */
|
|
12
|
+
--punica-color-bg: light-dark(#f6f6fa, #181a1c);
|
|
13
|
+
--punica-color-surface: light-dark(#ffffff, #2a2e30);
|
|
14
|
+
--punica-color-surface-raised: light-dark(#ffffff, #3c4143);
|
|
15
|
+
--punica-color-hover: light-dark(rgb(111 126 140 / 10%), rgb(190 200 210 / 12%));
|
|
16
|
+
--punica-color-selected: light-dark(rgb(85 96 169 / 12%), rgb(140 150 215 / 22%));
|
|
17
|
+
--punica-color-backdrop: light-dark(rgb(44 50 60 / 50%), rgb(0 0 0 / 60%));
|
|
18
|
+
|
|
19
|
+
/* text */
|
|
20
|
+
--punica-color-text: light-dark(#2d2d56, #d3dadf);
|
|
21
|
+
--punica-color-text-muted: light-dark(#5b6975, #a7b6be);
|
|
22
|
+
--punica-color-text-placeholder: light-dark(#62707c, #98a6af);
|
|
23
|
+
--punica-color-on-accent: light-dark(#ffffff, #101214);
|
|
24
|
+
|
|
25
|
+
/* lines */
|
|
26
|
+
--punica-color-border: light-dark(#dedede, #5a6063);
|
|
27
|
+
--punica-color-border-strong: light-dark(#9c9c9c, #8a9196);
|
|
28
|
+
--punica-color-focus: light-dark(#1f6fd0, #6db3ff);
|
|
29
|
+
|
|
30
|
+
/* palettes: <name>-light is a tint, <name> the accent, <name>-dark the shade */
|
|
31
|
+
--punica-color-primary-light: light-dark(#767fba, #7783d6);
|
|
32
|
+
--punica-color-primary: light-dark(#5560a9, #a0a9ee);
|
|
33
|
+
--punica-color-primary-dark: light-dark(#3b4376, #bcc3f5);
|
|
34
|
+
|
|
35
|
+
--punica-color-secondary-light: light-dark(#e7c1fa, #5a2a78);
|
|
36
|
+
--punica-color-secondary: light-dark(#aa14f0, #d894fa);
|
|
37
|
+
--punica-color-secondary-dark: light-dark(#7d17e3, #e7c1fa);
|
|
38
|
+
|
|
39
|
+
--punica-color-error-light: light-dark(#fdeded, #4a1f1f);
|
|
40
|
+
--punica-color-error: light-dark(#c62828, #f6908d);
|
|
41
|
+
--punica-color-error-dark: light-dark(#5f2120, #f7b4b2);
|
|
42
|
+
|
|
43
|
+
--punica-color-warning-light: light-dark(#fff4e5, #4a3110);
|
|
44
|
+
--punica-color-warning: light-dark(#b35000, #ffa23d);
|
|
45
|
+
--punica-color-warning-dark: light-dark(#663c00, #ffd6a3);
|
|
46
|
+
|
|
47
|
+
--punica-color-info-light: light-dark(#e5f6fd, #0f3547);
|
|
48
|
+
--punica-color-info: light-dark(#01679e, #4db5ea);
|
|
49
|
+
--punica-color-info-dark: light-dark(#014361, #b3e2f7);
|
|
50
|
+
|
|
51
|
+
--punica-color-success-light: light-dark(#edf7ed, #1c3a1e);
|
|
52
|
+
--punica-color-success: light-dark(#2e7d32, #66bb6a);
|
|
53
|
+
--punica-color-success-dark: light-dark(#1e4620, #b9e0bb);
|
|
54
|
+
|
|
55
|
+
--punica-color-neutral-light: light-dark(#f5f5f5, #33383a);
|
|
56
|
+
--punica-color-neutral: light-dark(#dedede, #797e81);
|
|
57
|
+
--punica-color-neutral-dark: light-dark(#6f6f6f, #b4babd);
|
|
58
|
+
|
|
59
|
+
--punica-color-white: #ffffff;
|
|
60
|
+
--punica-color-black: #000000;
|
|
61
|
+
|
|
62
|
+
/* shape */
|
|
63
|
+
--punica-radius-sm: 4px;
|
|
64
|
+
--punica-radius: 8px;
|
|
65
|
+
--punica-radius-lg: 12px;
|
|
66
|
+
--punica-radius-full: 9999px;
|
|
67
|
+
--punica-padding: 16px;
|
|
68
|
+
--punica-border-width: 1px;
|
|
69
|
+
|
|
70
|
+
/* focus */
|
|
71
|
+
--punica-focus-ring-width: 2px;
|
|
72
|
+
--punica-focus-ring-offset: 2px;
|
|
73
|
+
--punica-focus-ring: var(--punica-focus-ring-width) solid var(--punica-color-focus);
|
|
74
|
+
|
|
75
|
+
/* elevation */
|
|
76
|
+
--punica-shadow-xxs: 0 20px 25px -5px rgb(0 0 0 / 5%);
|
|
77
|
+
--punica-shadow-xs: 0 7px 8px rgb(0 0 0 / 8%);
|
|
78
|
+
--punica-shadow-sm: 0 6px 12px rgb(0 0 0 / 11%);
|
|
79
|
+
--punica-shadow-md: 0 9px 18px rgb(0 0 0 / 15%);
|
|
80
|
+
--punica-shadow-lg: 0 13px 37px rgb(0 0 0 / 21%);
|
|
81
|
+
--punica-shadow-xl: 0 20px 56px rgb(0 0 0 / 29%);
|
|
82
|
+
|
|
83
|
+
/* stacking (only for in-flow layers; overlays use the top layer) */
|
|
84
|
+
--punica-z-sticky: 1000;
|
|
85
|
+
--punica-z-fixed: 1100;
|
|
86
|
+
|
|
87
|
+
/* type */
|
|
88
|
+
--punica-font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
89
|
+
--punica-font-family-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
|
|
90
|
+
--punica-font-size-xs: 0.75rem;
|
|
91
|
+
--punica-font-size-sm: 0.875rem;
|
|
92
|
+
--punica-font-size: 1rem;
|
|
93
|
+
--punica-font-size-lg: 1.125rem;
|
|
94
|
+
--punica-font-size-xl: 1.25rem;
|
|
95
|
+
--punica-font-size-2xl: 1.5rem;
|
|
96
|
+
--punica-font-size-3xl: 2.125rem;
|
|
97
|
+
--punica-line-height: 1.5;
|
|
98
|
+
--punica-line-height-heading: 1.25;
|
|
99
|
+
--punica-font-weight-thin: 200;
|
|
100
|
+
--punica-font-weight-light: 300;
|
|
101
|
+
--punica-font-weight-regular: 400;
|
|
102
|
+
--punica-font-weight-medium: 500;
|
|
103
|
+
--punica-font-weight-semi-bold: 600;
|
|
104
|
+
--punica-font-weight-bold: 700;
|
|
105
|
+
--punica-font-weight-extra-bold: 800;
|
|
106
|
+
|
|
107
|
+
/* spacing, named by pixel value */
|
|
108
|
+
--punica-space-0: 0;
|
|
109
|
+
--punica-space-2: 2px;
|
|
110
|
+
--punica-space-4: 4px;
|
|
111
|
+
--punica-space-6: 6px;
|
|
112
|
+
--punica-space-8: 8px;
|
|
113
|
+
--punica-space-10: 10px;
|
|
114
|
+
--punica-space-12: 12px;
|
|
115
|
+
--punica-space-14: 14px;
|
|
116
|
+
--punica-space-16: 16px;
|
|
117
|
+
--punica-space-18: 18px;
|
|
118
|
+
--punica-space-20: 20px;
|
|
119
|
+
--punica-space-22: 22px;
|
|
120
|
+
--punica-space-24: 24px;
|
|
121
|
+
--punica-space-26: 26px;
|
|
122
|
+
--punica-space-28: 28px;
|
|
123
|
+
--punica-space-32: 32px;
|
|
124
|
+
--punica-space-36: 36px;
|
|
125
|
+
--punica-space-40: 40px;
|
|
126
|
+
--punica-space-44: 44px;
|
|
127
|
+
--punica-space-48: 48px;
|
|
128
|
+
--punica-space-56: 56px;
|
|
129
|
+
--punica-space-64: 64px;
|
|
130
|
+
--punica-space-80: 80px;
|
|
131
|
+
--punica-space-96: 96px;
|
|
132
|
+
--punica-space-112: 112px;
|
|
133
|
+
--punica-space-128: 128px;
|
|
134
|
+
--punica-space-144: 144px;
|
|
135
|
+
--punica-space-160: 160px;
|
|
136
|
+
|
|
137
|
+
/* control heights */
|
|
138
|
+
--punica-size-sm: 28px;
|
|
139
|
+
--punica-size-md: 36px;
|
|
140
|
+
--punica-size-lg: 44px;
|
|
141
|
+
|
|
142
|
+
/* motion */
|
|
143
|
+
--punica-duration-fast: 120ms;
|
|
144
|
+
--punica-duration: 200ms;
|
|
145
|
+
--punica-duration-slow: 320ms;
|
|
146
|
+
--punica-ease: cubic-bezier(0.2, 0, 0, 1);
|
|
147
|
+
|
|
148
|
+
--punica-disabled-opacity: 0.4;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@media (prefers-reduced-motion: reduce) {
|
|
152
|
+
:root {
|
|
153
|
+
--punica-duration-fast: 0ms;
|
|
154
|
+
--punica-duration: 0ms;
|
|
155
|
+
--punica-duration-slow: 0ms;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|