@birdycom/omniaui 0.12.1 → 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. Do not edit. */
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 {
@@ -0,0 +1,38 @@
1
+ /* File: packages/ui/src/parts/media-live-frame.css
2
+ Map: frame (virtual size -> ratio, container) -> content at the virtual size, scaled to the frame width -> static
3
+ Live frame: shows a page (an <iframe>, or a <video>/<img>) at a virtual size such as 1280x720 and scales it down to
4
+ the width of its box, so a live site looks like a screenshot that is still alive. Pure CSS: the scale is
5
+ tan(atan2(100cqi, <virtual width>)), which is the frame width divided by the virtual width. On .oc-browser-frame__view
6
+ or on its own. Set the size with --oc-live-w / --oc-live-h (unitless px, default 1280 x 720). */
7
+
8
+ .oc-live-frame {
9
+ --oc-live-w: 1280;
10
+ --oc-live-h: 720;
11
+ position: relative;
12
+ display: block;
13
+ /* Always the full width of its column (also inside flex or grid centring), the height follows the ratio. */
14
+ inline-size: 100%;
15
+ overflow: hidden;
16
+ aspect-ratio: var(--oc-live-w) / var(--oc-live-h);
17
+ container-type: inline-size;
18
+ background: var(--oc-background);
19
+ }
20
+ /* .oc-live-frame__content: any element (a whole demo page) at the virtual size. The class inside :is() also makes this
21
+ rule as strong as the .oc-browser-frame__view rule, which comes earlier, so on the view slot this one wins. */
22
+ .oc-live-frame > :is(iframe, video, img, object, .oc-live-frame__content) {
23
+ position: absolute;
24
+ inset-block-start: 0;
25
+ inset-inline-start: 0;
26
+ display: block;
27
+ inline-size: calc(var(--oc-live-w) * 1px);
28
+ max-inline-size: none;
29
+ block-size: calc(var(--oc-live-h) * 1px);
30
+ border: 0;
31
+ transform-origin: 0 0;
32
+ scale: tan(atan2(100cqi, calc(var(--oc-live-w) * 1px)));
33
+ }
34
+ /* Right-to-left pages: scale from the other corner. */
35
+ .oc-live-frame:dir(rtl) > :is(iframe, video, img, object, .oc-live-frame__content) { transform-origin: 100% 0; }
36
+
37
+ /* A picture of a page, not a page to use: clicks and scrolling pass the frame by. */
38
+ .oc-live-frame--static > :is(iframe, video, img, object, .oc-live-frame__content) { pointer-events: none; }
@@ -0,0 +1,96 @@
1
+ /* File: packages/ui/src/parts/media-watermark.css
2
+ Map: overlay (click-through, sized to its box) -> text -> straight -> tiled -> corner stamp -> tones -> print
3
+ Watermark: a light layer with large slanted text ("CONCEPT", "DRAFT", "SAMPLE") over an image, a card or a live
4
+ frame. Put .oc-watermark as the last child of a positioned box (the utility .relative, or any position) with the
5
+ text in a <span>. Clicks go through to what is underneath (pointer-events: none). The text scales with the box
6
+ (container query units). Tokens: --oc-watermark-color, -opacity, -angle, -size. Omnia tokens only. */
7
+
8
+ .oc-watermark {
9
+ --oc-watermark-color: var(--oc-foreground);
10
+ --oc-watermark-opacity: 0.12;
11
+ --oc-watermark-angle: -18deg;
12
+ --oc-watermark-size: clamp(1.75rem, 14cqi, 12rem);
13
+ position: absolute;
14
+ z-index: 2;
15
+ inset: 0;
16
+ display: grid;
17
+ place-items: center;
18
+ overflow: hidden;
19
+ container-type: size;
20
+ border-radius: inherit;
21
+ pointer-events: none;
22
+ user-select: none;
23
+ }
24
+ .oc-watermark > span {
25
+ rotate: var(--oc-watermark-angle);
26
+ color: oklch(from var(--oc-watermark-color) l c h / var(--oc-watermark-opacity));
27
+ font-size: var(--oc-watermark-size);
28
+ font-weight: 800;
29
+ line-height: 1;
30
+ letter-spacing: 0.25em;
31
+ text-transform: uppercase;
32
+ white-space: nowrap;
33
+ }
34
+
35
+ /* A logo (<img>, or an inline <svg> logo) or an icon (inline <svg> with currentColor) instead of, or next to, text.
36
+ An <img> keeps its own colors at the watermark opacity; --mono turns it into a flat gray stamp. An inline <svg>
37
+ takes the watermark color, like the text. Size: --oc-watermark-mark (default 40% of the box width). */
38
+ .oc-watermark > :is(img, svg) {
39
+ inline-size: var(--oc-watermark-mark, 40cqi);
40
+ max-block-size: 70cqb;
41
+ block-size: auto;
42
+ rotate: var(--oc-watermark-angle);
43
+ }
44
+ .oc-watermark > img { opacity: calc(var(--oc-watermark-opacity) * 1.5); }
45
+ .oc-watermark > svg { color: oklch(from var(--oc-watermark-color) l c h / var(--oc-watermark-opacity)); }
46
+ .oc-watermark--mono > img { filter: grayscale(1) contrast(0.6); }
47
+ /* Logo or icon above a word: wrap both in one <span class="oc-watermark__stack">. */
48
+ .oc-watermark__stack { display: grid; justify-items: center; gap: 0.3em; }
49
+ .oc-watermark__stack > :is(img, svg) { inline-size: 0.9em; block-size: auto; }
50
+ .oc-watermark__stack > img { opacity: calc(var(--oc-watermark-opacity) * 1.5); }
51
+
52
+ /* Horizontal text instead of slanted. */
53
+ .oc-watermark--straight { --oc-watermark-angle: 0deg; }
54
+
55
+ /* Tiled: repeat the text in several spans; they fill the box in a slanted grid (for proofs and previews). */
56
+ .oc-watermark--tile {
57
+ --oc-watermark-size: clamp(0.9rem, 4.5cqi, 2.25rem);
58
+ /* Columns in rem: container units here would measure the parent of the box, not the box. */
59
+ grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
60
+ align-content: space-evenly;
61
+ inset: -25%;
62
+ rotate: var(--oc-watermark-angle);
63
+ }
64
+ .oc-watermark--tile > :is(span, img, svg) { rotate: none; justify-self: center; }
65
+ .oc-watermark--tile > span { letter-spacing: 0.15em; }
66
+ .oc-watermark--tile > :is(img, svg) { inline-size: 2.5rem; }
67
+ /* Logos and icons are narrower than words: narrower columns, so the whole box fills up. */
68
+ .oc-watermark--tile:has(> :is(img, svg)) { grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); }
69
+
70
+ /* A small stamp in a corner instead of across the middle: --corner (bottom right) or --corner-top (top right).
71
+ Two classes, so a tone (--primary …) changes its color but not its readable opacity. */
72
+ .oc-watermark:is(.oc-watermark--corner, .oc-watermark--corner-top) {
73
+ --oc-watermark-angle: 0deg;
74
+ --oc-watermark-size: 0.75rem;
75
+ --oc-watermark-opacity: 0.75;
76
+ place-items: end;
77
+ padding: 0.75rem;
78
+ }
79
+ .oc-watermark--corner-top { place-items: start end; }
80
+ .oc-watermark:is(.oc-watermark--corner, .oc-watermark--corner-top) > span {
81
+ padding: 0.25rem 0.6rem;
82
+ border: 1px solid oklch(from var(--oc-watermark-color) l c h / 0.35);
83
+ border-radius: var(--oc-radius, 0.375rem);
84
+ background: oklch(from var(--oc-background) l c h / 0.7);
85
+ letter-spacing: 0.12em;
86
+ }
87
+
88
+ /* Tones: light text for dark images, the brand color, or red for "not for use". */
89
+ .oc-watermark--light { --oc-watermark-color: var(--color-white-100); --oc-watermark-opacity: 0.22; }
90
+ .oc-watermark--primary { --oc-watermark-color: var(--oc-primary); --oc-watermark-opacity: 0.16; }
91
+ .oc-watermark--destructive { --oc-watermark-color: var(--oc-destructive); --oc-watermark-opacity: 0.2; }
92
+
93
+ /* Printed proofs keep the watermark, a little stronger so it survives the printer. */
94
+ @media print {
95
+ .oc-watermark { --oc-watermark-opacity: 0.2; print-color-adjust: exact; }
96
+ }
@@ -0,0 +1,54 @@
1
+ /* File: packages/ui/src/parts/site-link-row.css
2
+ Map: row (wraps) -> link -> external icon (http links) -> GitHub mark (github.com links) -> tones -> sizes
3
+ Link row: a row of links under a feature or product card ("Marketplace", "Source", "Docs"). Links to another site get
4
+ an "opens elsewhere" arrow by themselves, links to github.com the GitHub mark instead; links on your own site get
5
+ no icon. The icons are CSS masks in the text color, so they follow the tone and light/dark mode. */
6
+
7
+ .oc-link-row {
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ gap: 0.4rem 1rem;
11
+ margin: 0.9rem 0 0;
12
+ padding: 0;
13
+ list-style: none;
14
+ font-size: 0.9rem;
15
+ }
16
+ .oc-link-row a {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ gap: 0.35rem;
20
+ border-radius: 4px;
21
+ color: var(--oc-primary);
22
+ font-weight: 600;
23
+ text-decoration: none;
24
+ }
25
+ .oc-link-row a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
26
+ .oc-link-row a:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 3px; }
27
+
28
+ /* Icons: one mask per kind, filled with the text color. */
29
+ .oc-link-row a:is([href^="http://"], [href^="https://"])::after,
30
+ .oc-link-row a[href*="github.com"]::before {
31
+ content: "";
32
+ flex: none;
33
+ inline-size: 0.9em;
34
+ aspect-ratio: 1;
35
+ background: currentColor;
36
+ mask: var(--oc-link-row-icon) center / contain no-repeat;
37
+ }
38
+ .oc-link-row a:is([href^="http://"], [href^="https://"])::after {
39
+ --oc-link-row-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E");
40
+ }
41
+ .oc-link-row a[href*="github.com"]::before {
42
+ --oc-link-row-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .5a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56v-2c-3.2.7-3.88-1.37-3.88-1.37-.52-1.33-1.28-1.69-1.28-1.69-1.05-.71.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.28 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.17 1.18a11 11 0 0 1 5.77 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.83 1.19 3.09 0 4.42-2.7 5.39-5.26 5.68.41.36.78 1.06.78 2.14v3.17c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .5Z'/%3E%3C/svg%3E");
43
+ }
44
+ /* A GitHub link shows the GitHub mark instead of the arrow. */
45
+ .oc-link-row a[href*="github.com"]::after { content: none; }
46
+
47
+ /* Tones: the element's accent (with an .oc-accent--* class), or muted text that brightens on hover. */
48
+ .oc-link-row--accent a { color: light-dark(var(--oc-accent-from, var(--oc-primary)), oklch(from var(--oc-accent-from, var(--oc-primary)) max(l, 0.72) c h)); }
49
+ .oc-link-row--muted a { color: var(--oc-muted-foreground); font-weight: 500; }
50
+ .oc-link-row--muted a:hover { color: var(--oc-foreground); }
51
+
52
+ /* Sizes */
53
+ .oc-link-row--sm { font-size: 0.8rem; gap: 0.3rem 0.8rem; }
54
+ .oc-link-row--lg { font-size: 1rem; }
package/manifest.json CHANGED
@@ -1111,6 +1111,30 @@
1111
1111
  "requires": [
1112
1112
  "@birdycom/omniaui"
1113
1113
  ]
1114
+ },
1115
+ {
1116
+ "name": "watermark",
1117
+ "file": "snippets/watermark.html",
1118
+ "description": "Light slanted text such as CONCEPT or DRAFT over an image, a card or a live frame",
1119
+ "requires": [
1120
+ "@birdycom/omniaui"
1121
+ ]
1122
+ },
1123
+ {
1124
+ "name": "live-frame",
1125
+ "file": "snippets/live-frame.html",
1126
+ "description": "A live page at a virtual size such as 1280x720, scaled down to the frame width without JavaScript",
1127
+ "requires": [
1128
+ "@birdycom/omniaui"
1129
+ ]
1130
+ },
1131
+ {
1132
+ "name": "link-row",
1133
+ "file": "snippets/link-row.html",
1134
+ "description": "A row of links under a feature card, with an external icon and the GitHub mark by themselves",
1135
+ "requires": [
1136
+ "@birdycom/omniaui"
1137
+ ]
1114
1138
  }
1115
1139
  ]
1116
1140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@birdycom/omniaui",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "OmniaUI components: CSS-first UI built on native HTML (dialog, popover, details) with light-dark() theming — no JavaScript required. Includes the omniaui CLI (add/list).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,7 +57,7 @@
57
57
  "omniaui": "./bin/omniaui.mjs"
58
58
  },
59
59
  "peerDependencies": {
60
- "@birdycom/omniacss": "^0.12.1"
60
+ "@birdycom/omniacss": "^0.12.2"
61
61
  },
62
62
  "peerDependenciesMeta": {
63
63
  "@birdycom/omniacss": {
@@ -0,0 +1,14 @@
1
+ <!-- OmniaUI component: link-row - A row of links under a feature card, with an external icon and the GitHub mark by themselves. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/link-row.html | Map: ul.oc-link-row -> li > a (own site: no icon; other site: arrow; github.com: mark)
3
+ Class API (modifiers are extra classes on the same element):
4
+ .oc-link-row: wrapping row of links, primary color
5
+ Icons: by the href (http(s) links: arrow; github.com: GitHub mark; relative links: none)
6
+ Modifiers: --accent (element accent, with .oc-accent--*), --muted, --sm, --lg
7
+ Slots: the list items
8
+ -->
9
+ <ul class="oc-link-row">
10
+ <li><a href="/docs/editor">How it works</a></li>
11
+ <li><a href="https://marketplace.visualstudio.com/items?itemName=Birdycom.omniacss-intellisense" rel="noopener">VS Code Marketplace</a></li>
12
+ <li><a href="https://open-vsx.org/extension/Birdycom/omniacss-intellisense" rel="noopener">Open VSX</a></li>
13
+ <li><a href="https://github.com/Birdycom/OmniaCSS" rel="noopener">Source</a></li>
14
+ </ul>
@@ -0,0 +1,20 @@
1
+ <!-- OmniaUI component: live-frame - A live page at a virtual size such as 1280x720, scaled down to the frame width without JavaScript. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/live-frame.html | Map: browser frame with a live view -> a live frame on its own (static, other size)
3
+ Class API (modifiers are extra classes on the same element):
4
+ .oc-live-frame: box with the ratio of the virtual size; its iframe / video / img / .oc-live-frame__content is laid out
5
+ at that size and scaled to the box width (pure CSS: tan(atan2(100cqi, width)))
6
+ Modifiers: --static (clicks and scrolling pass through: a picture of a page)
7
+ Tokens: --oc-live-w, --oc-live-h (unitless px, default 1280 x 720)
8
+ Also on .oc-browser-frame__view, the view slot of the browser frame.
9
+ Slots: the iframe (or other content). Give the iframe a title; scrolling="no" hides its scrollbar.
10
+ -->
11
+ <div class="oc-browser-frame">
12
+ <div class="oc-browser-frame__bar"><i></i><i></i><i></i><span class="oc-browser-frame__address">omniaui.eu</span></div>
13
+ <div class="oc-browser-frame__view oc-live-frame">
14
+ <iframe src="https://omniaui.eu/" title="OmniaUI home page" loading="lazy" scrolling="no"></iframe>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="oc-live-frame oc-live-frame--static" style="--oc-live-w: 1680; --oc-live-h: 1400">
19
+ <iframe src="https://omniacss.eu/" title="OmniaCSS home page" loading="lazy" scrolling="no" tabindex="-1"></iframe>
20
+ </div>
@@ -0,0 +1,40 @@
1
+ <!-- OmniaUI component: watermark - Light slanted text such as CONCEPT or DRAFT over an image, a card or a live frame. Needs @birdycom/omniaui CSS.
2
+ File: packages/ui/snippets/watermark.html | Map: positioned box -> content -> span.oc-watermark (last child) per variant
3
+ Class API (modifiers are extra classes on the same element):
4
+ .oc-watermark: click-through layer over its positioned parent, text in a <span>, scales with the box
5
+ Content: a <span> with text, an <img> logo or an inline <svg> icon; .oc-watermark__stack puts a mark above a word
6
+ Modifiers: --straight (no slant), --tile (repeat: several children), --corner / --corner-top (small stamp), --mono (gray logo),
7
+ --light (for dark images), --primary, --destructive
8
+ Tokens: --oc-watermark-color, --oc-watermark-opacity, --oc-watermark-angle, --oc-watermark-size
9
+ Slots: the text (one span; several for --tile). The layer is aria-hidden: say "draft" in the content if it matters.
10
+ -->
11
+ <figure class="relative m-0 w-full aspect-16 overflow-hidden rounded-lg">
12
+ <span class="oc-media-art oc-media-art--3" role="img" aria-label="Kitchen, design"></span>
13
+ <span class="oc-watermark" aria-hidden="true"><span>Concept</span></span>
14
+ </figure>
15
+
16
+ <article class="oc-card relative">
17
+ <div class="oc-card-header"><h3 class="oc-card-title">Quote 2026-014</h3></div>
18
+ <div class="oc-card-content">Kitchen renovation, Hasselt. Valid for 30 days.</div>
19
+ <span class="oc-watermark oc-watermark--straight oc-watermark--destructive" aria-hidden="true"><span>Draft</span></span>
20
+ </article>
21
+
22
+ <figure class="relative m-0 w-full aspect-16 overflow-hidden rounded-lg">
23
+ <span class="oc-media-art oc-media-art--5" role="img" aria-label="Passive house, photo"></span>
24
+ <span class="oc-watermark oc-watermark--tile oc-watermark--light" aria-hidden="true"><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span><span>Sample</span></span>
25
+ </figure>
26
+
27
+ <figure class="relative m-0 w-full aspect-16 overflow-hidden rounded-lg">
28
+ <span class="oc-media-art oc-media-art--6" role="img" aria-label="Garden terrace, photo"></span>
29
+ <span class="oc-watermark oc-watermark--corner" aria-hidden="true"><span>Preview</span></span>
30
+ </figure>
31
+
32
+ <figure class="relative m-0 w-full aspect-16 overflow-hidden rounded-lg">
33
+ <span class="oc-media-art oc-media-art--2" role="img" aria-label="Product photo"></span>
34
+ <span class="oc-watermark oc-watermark--mono" aria-hidden="true"><img src="/logo.svg" alt=""></span>
35
+ </figure>
36
+
37
+ <figure class="relative m-0 w-full aspect-16 overflow-hidden rounded-lg">
38
+ <span class="oc-media-art oc-media-art--5" role="img" aria-label="Private photo"></span>
39
+ <span class="oc-watermark oc-watermark--light oc-watermark--straight" aria-hidden="true"><span class="oc-watermark__stack"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Private</span></span></span>
40
+ </figure>