@birdycom/omniacss 0.12.0 → 0.12.2
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/dist/oc-theme.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* File: oc-theme.css — generated from tokens/semantic.json by @birdycom/omniacss 0.12.
|
|
1
|
+
/* File: oc-theme.css — generated from tokens/semantic.json by @birdycom/omniacss 0.12.2. Do not edit. */
|
|
2
2
|
/* Semantic theme tokens: every color is light-dark() of an Omnia palette token (oc-colors.css). */
|
|
3
3
|
/* Same source as the desktop export: npx omniacss tokens --format json|dtcg|python */
|
|
4
4
|
:root {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$description": "OmniaCSS 0.12.
|
|
2
|
+
"$description": "OmniaCSS 0.12.2 semantic tokens (generated by npx omniacss tokens --format dtcg)",
|
|
3
3
|
"$extensions": {
|
|
4
4
|
"com.birdycom.omniacss": {
|
|
5
|
-
"version": "0.12.
|
|
5
|
+
"version": "0.12.2",
|
|
6
6
|
"modes": [
|
|
7
7
|
"light",
|
|
8
8
|
"dark"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# omnia_tokens.py — OmniaCSS 0.12.
|
|
1
|
+
# omnia_tokens.py — OmniaCSS 0.12.2 semantic tokens for non-web apps (Tkinter, Qt, ...).
|
|
2
2
|
# Generated by: npx omniacss tokens --format python (do not edit; regenerate after an OmniaCSS update)
|
|
3
3
|
# Map: OMNIACSS_VERSION -> PALETTES (hex per mode) -> ALPHA -> OKLCH -> SIZES/TEXT -> FONTS -> SHADOWS -> font()
|
|
4
4
|
#
|
|
5
5
|
# Colors are resolved from light-dark(var(--color-...)) and gamut mapped to sRGB the CSS Color 4 way.
|
|
6
6
|
# Tokens with transparency (see ALPHA) are pre-blended over "background" in PALETTES.
|
|
7
7
|
|
|
8
|
-
OMNIACSS_VERSION = "0.12.
|
|
8
|
+
OMNIACSS_VERSION = "0.12.2"
|
|
9
9
|
|
|
10
10
|
PALETTES = {
|
|
11
11
|
"light": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@birdycom/omniacss",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "OmniaCSS utilities: modern CSS (anchor positioning, container queries, view transitions, light-dark()) as utility classes, generated on demand.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/postcss.mjs
CHANGED
|
@@ -16,7 +16,8 @@ import postcss from "postcss";
|
|
|
16
16
|
import { buildCss } from "./engine.mjs";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* @param {{ content: string[], layer?: string|false, keep?: string[], cwd?: string }} options
|
|
19
|
+
* @param {{ content: string[], layer?: string|false, keep?: string[], cwd?: string, referencedBy?: string[] }} options
|
|
20
|
+
* referencedBy: CSS text of other stylesheets whose var(--…) tokens must stay (this stylesheet always counts).
|
|
20
21
|
*/
|
|
21
22
|
export default function omniacss(options = {}) {
|
|
22
23
|
return {
|
|
@@ -27,8 +28,12 @@ export default function omniacss(options = {}) {
|
|
|
27
28
|
if (!directives.length) return;
|
|
28
29
|
|
|
29
30
|
const cwd = options.cwd || process.cwd();
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
// The stylesheet itself uses tokens too (`color: var(--color-teal-60)` next to `@omnia;`): keep those, without
|
|
32
|
+
// having to list this file under content. Other CSS files: put them in content (or in referencedBy).
|
|
33
|
+
const own = root.toString();
|
|
34
|
+
const { css, files } = await buildCss({ content: options.content, cwd, layer: options.layer ?? "omnia", keep: options.keep, referencedBy: [own, ...(options.referencedBy || [])] });
|
|
35
|
+
// `from`: the stylesheet being built, so Vite resolves url() in the generated CSS against it.
|
|
36
|
+
const generated = postcss.parse(css, { from: result.opts.from });
|
|
32
37
|
|
|
33
38
|
directives[0].replaceWith(generated.nodes);
|
|
34
39
|
directives.slice(1).forEach((at) => at.remove());
|