@birdycom/omniaui 0.14.1 → 0.14.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/bin/lib/add.mjs CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  import fs from "node:fs/promises";
6
6
  import path from "node:path";
7
- import { catalog, closure, findEntries, INSTALL_HINT, proBlockNames } from "./catalog.mjs";
7
+ import { catalog, closure, findEntries, INSTALL_HINT, proBlockNames, proComponentNames } from "./catalog.mjs";
8
8
  import { cwd, defaultDir, ensureContentGlob, exists, pascal, posix, readJson, requireFromProject, resolveFramework } from "./project.mjs";
9
9
 
10
10
  /** Copied Blade files call each other as <x-oc.name>, matching the folder they land in. */
@@ -79,6 +79,12 @@ export async function cmdAdd(args, flags) {
79
79
  ? `"${input}" is an OmniaUI Pro block. Install @birdycom/omniaui-pro (licensed) to add it.`
80
80
  : `"${input}" is an OmniaUI Pro block: use it from @birdycom/omniaui-pro-${fw === "blade" ? "laravel" : fw} (licensed) instead of copying.`);
81
81
  }
82
+ if (!hits.length && (await proComponentNames()).includes(input)) {
83
+ // tint-card-fill has no wrapper of its own: the free TintCard / OcTintCard / x-oc::tint-card take "fill".
84
+ throw new Error(fw === "css" || input === "tint-card-fill"
85
+ ? `"${input}" is an OmniaUI Pro component. Install @birdycom/omniaui-pro (licensed) to add it${fw === "css" ? "" : `; in ${fw} use the free tint card with fill`}.`
86
+ : `"${input}" is an OmniaUI Pro component: use it from @birdycom/omniaui-pro-${fw === "blade" ? "laravel" : fw} (licensed) instead of copying.`);
87
+ }
82
88
  if (!hits.length) throw new Error(`Unknown ${kind || "component or block"} "${input}" for ${fw}. Run "omniaui list -f ${fw}" to see the options.`);
83
89
  if (hits.length > 1) throw new Error(`"${input}" exists as component and block. Pass --kind component or --kind block.`);
84
90
  selected.push(hits[0]);
@@ -43,6 +43,11 @@ export async function proBlockNames() {
43
43
  try { return (await readJson(path.join((await registry("block")).dir, "pro.json"))).items.map((i) => i.name); } catch { return []; }
44
44
  }
45
45
 
46
+ /** Names of the OmniaUI Pro components (column-menu, network-graph, tint-card-fill), same source and purpose. */
47
+ export async function proComponentNames() {
48
+ try { return ((await readJson(path.join((await registry("block")).dir, "pro.json"))).components || []).map((i) => i.name); } catch { return []; }
49
+ }
50
+
46
51
  /** Root folder holding the sources of a flavour (installed package first, monorepo second). Returns null when missing. */
47
52
  async function flavourRoot(fw) {
48
53
  if (fw === "vue" || fw === "react") return findPkg(`@birdycom/omniaui-${fw}`, path.join(monoPackages, fw));
@@ -86,6 +91,7 @@ export async function catalog(fw) {
86
91
  }
87
92
  const pro = await proRegistry();
88
93
  for (const i of pro?.manifest.items || []) entries.push({ kind: "block", name: i.name, files: [i.file], description: i.description, root: pro.dir, pro: true });
94
+ for (const i of pro?.manifest.components || []) entries.push({ kind: "component", name: i.name, files: [i.file], description: i.description, root: pro.dir, pro: true });
89
95
  return { root: null, entries };
90
96
  }
91
97
  const root = await flavourRoot(fw);
@@ -1,4 +1,4 @@
1
- /* File: oc-theme.css — generated from tokens/semantic.json by @birdycom/omniacss 0.14.1. Do not edit. */
1
+ /* File: oc-theme.css — generated from tokens/semantic.json by @birdycom/omniacss 0.14.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 {
@@ -2373,14 +2373,19 @@ button.oc-pagination-item:focus-visible {
2373
2373
  The older .is-open / aria-expanded hooks keep working for script-driven setups.
2374
2374
  =================================================================== */
2375
2375
 
2376
- /* Modal — <dialog>: focus trap, Esc to close and ::backdrop come from the browser */
2376
+ /* Modal — <dialog>: focus trap, Esc to close and ::backdrop come from the browser.
2377
+ The dialog is as large as its card, not the whole screen: closedby="any" closes it on a click outside the
2378
+ dialog's box, so a full-screen dialog never closed on a click next to the card. The card keeps the sizes
2379
+ (sm, lg, xl, full or your own max-width); the browser centers the dialog (margin: auto). */
2377
2380
  dialog.oc-modal {
2378
2381
  display: none;
2379
- width: 100%;
2380
- height: 100%;
2381
- max-width: none;
2382
- max-height: none;
2383
- margin: 0;
2382
+ width: fit-content;
2383
+ height: fit-content;
2384
+ max-width: calc(100vw - 32px);
2385
+ max-height: calc(100dvh - 32px);
2386
+ margin: auto;
2387
+ padding: 0;
2388
+ overflow: visible;
2384
2389
  border: 0;
2385
2390
  background: transparent;
2386
2391
  color: var(--oc-foreground);
@@ -2392,6 +2397,11 @@ dialog.oc-modal::backdrop {
2392
2397
  background: oklch(from var(--color-black-60) l c h / 0.5);
2393
2398
  backdrop-filter: blur(4px);
2394
2399
  }
2400
+ /* The card asks for the full width; its max-width (480px, or a size modifier) decides. Low specificity, so a
2401
+ block's own width on the card still wins. */
2402
+ :where(dialog.oc-modal[open]) .oc-modal-content {
2403
+ width: calc(100vw - 32px);
2404
+ }
2395
2405
  dialog.oc-modal[open] .oc-modal-content {
2396
2406
  transition: opacity var(--oc-transition-normal), scale var(--oc-transition-normal);
2397
2407
  @starting-style {
@@ -6564,6 +6574,8 @@ input.oc-input[type="month"] { inline-size: auto; min-inline-size: 11rem; }
6564
6574
  interpolate-size: allow-keywords;
6565
6575
  }
6566
6576
  .oc-severity-card + .oc-severity-card { margin-block-start: 0.5rem; }
6577
+ /* In a stack the gap of the stack is the space between the cards; the margin would add to it. */
6578
+ .oc-stack > .oc-severity-card + .oc-severity-card { margin-block-start: 0; }
6567
6579
 
6568
6580
  /* Head row (summary): icon, title + tags, level badge, chevron. */
6569
6581
  .oc-severity-card-head {
@@ -6621,6 +6633,8 @@ input.oc-input[type="month"] { inline-size: auto; min-inline-size: 11rem; }
6621
6633
  .oc-severity-card[open]::details-content { block-size: auto; }
6622
6634
  .oc-severity-card-body { padding: 0 1rem 1rem 3rem; font-size: 0.875rem; line-height: 1.6; color: var(--oc-muted-foreground); }
6623
6635
  .oc-severity-card-body > :first-child { margin-block-start: 0; }
6636
+ /* Without an icon in the head the text lines up with the title instead of the icon column. */
6637
+ .oc-severity-card:not(:has(> .oc-severity-card-head .oc-severity-card-icon)) .oc-severity-card-body { padding-inline-start: 1rem; }
6624
6638
  .oc-severity-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 0.75rem; }
6625
6639
 
6626
6640
  /* Levels (theme tokens; critical is a deeper red). */
@@ -7630,6 +7644,17 @@ a.oc-tree-label:focus-visible { outline: 2px solid var(--oc-ring); outline-offse
7630
7644
  @media (min-width: 40rem) {
7631
7645
  .oc-dl--glossary .oc-dl-row { grid-template-columns: minmax(8rem, var(--oc-dl-term-width, 30%)) minmax(0, 1fr); }
7632
7646
  }
7647
+
7648
+ /* A definition list inside .oc-prose (a glossary in a privacy policy): the rows keep their own rhythm, not the flow
7649
+ margin of the prose (1.1em on every element), and the dd does not get the indent and top margin of a prose dd. */
7650
+ .oc-prose .oc-dl > .oc-dl-row { margin-block: 0; }
7651
+ .oc-prose .oc-dl :is(.oc-dl-term, .oc-dl-detail) { margin: 0; padding-inline-start: 0; }
7652
+ /* Long terms ("Verwerkingsverantwoordelijke") hyphenate in the language of the page; where the browser has no hyphenation for it, they still break instead of running into the explanation. */
7653
+ .oc-dl--glossary .oc-dl-term { hyphens: auto; overflow-wrap: break-word; }
7654
+
7655
+ /* Flush: no margin and no line above the list (a list with no .oc-dl-title above it). */
7656
+ .oc-dl--flush { margin-block-start: 0; border-block-start: 0; }
7657
+ .oc-dl--flush > .oc-dl-row:first-child { padding-block-start: 0; }
7633
7658
 
7634
7659
  /* parts/data-graph.css */
7635
7660
  /* File: packages/ui/src/parts/data-graph.css
@@ -8048,6 +8073,8 @@ td[data-numeric] > .oc-price .oc-price__main, .oc-price--end .oc-price__main { j
8048
8073
  margin: 0;
8049
8074
  padding: 0;
8050
8075
  list-style: none;
8076
+ /* One column that never grows with its widest step (a <pre> or a long URL stays inside the card). */
8077
+ grid-template-columns: minmax(0, 1fr);
8051
8078
  counter-reset: oc-step-list;
8052
8079
  font-size: 0.875rem;
8053
8080
  line-height: 1.5;
@@ -8055,7 +8082,9 @@ td[data-numeric] > .oc-price .oc-price__main, .oc-price--end .oc-price__main { j
8055
8082
  /* The text flows as normal text (bold words and links stay inline); the number hangs in the indent on the first line. */
8056
8083
  .oc-step-list > li {
8057
8084
  position: relative;
8085
+ min-inline-size: 0;
8058
8086
  padding-inline-start: 1.85rem;
8087
+ overflow-wrap: anywhere;
8059
8088
  counter-increment: oc-step-list;
8060
8089
  }
8061
8090
  .oc-step-list > li::before {
@@ -8073,6 +8102,8 @@ td[data-numeric] > .oc-price .oc-price__main, .oc-price--end .oc-price__main { j
8073
8102
  .oc-step-list > li > :first-child { margin-block-start: 0; }
8074
8103
  .oc-step-list > li > :last-child { margin-block-end: 0; }
8075
8104
  .oc-step-list a { text-underline-offset: 2px; }
8105
+ /* A code block in a step scrolls inside the step. */
8106
+ .oc-step-list pre { max-inline-size: 100%; overflow-x: auto; overflow-wrap: normal; }
8076
8107
 
8077
8108
  /* Small: tighter rows and a smaller text, for a dense panel. */
8078
8109
  .oc-step-list--sm { gap: 0.4rem; font-size: 0.8125rem; }