@birdycom/omniaui 0.14.0 → 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 +7 -1
- package/bin/lib/catalog.mjs +6 -0
- package/bin/lib/copy-js.mjs +2 -0
- package/dist/components.css +540 -24
- package/dist/components.min.css +1 -1
- package/dist/docs-ui.css +12 -1
- package/dist/language-select.d.ts +7 -0
- package/dist/language-select.js +48 -0
- package/dist/oc-theme.css +1 -1
- package/dist/parts/app-page-header.css +1 -1
- package/dist/parts/app-severity-card.css +4 -0
- package/dist/parts/app-status-dot.css +19 -4
- package/dist/parts/app-version-banner.css +18 -1
- package/dist/parts/data-dl-glossary.css +22 -0
- package/dist/parts/data-meter-row.css +7 -0
- package/dist/parts/data-step-list.css +48 -0
- package/dist/parts/forms-language-select.css +62 -0
- package/dist/parts/site-doc-layout.css +39 -0
- package/dist/parts/site-layout.css +15 -1
- package/dist/parts/site-neon.css +17 -3
- package/dist/parts/site-prose.css +4 -1
- package/dist/parts/site-tint-card.css +223 -0
- package/dist/showcase.css +20 -5
- package/dist/toc.d.ts +9 -0
- package/dist/toc.js +96 -0
- package/manifest.json +24 -0
- package/package.json +4 -2
- package/snippets/definition-list.html +2 -0
- package/snippets/doc-layout.html +39 -0
- package/snippets/meter-row.html +2 -1
- package/snippets/page-sections.html +1 -1
- package/snippets/progress.html +1 -1
- package/snippets/status-dot.html +1 -0
- package/snippets/step-list.html +28 -0
- package/snippets/tint-card.html +66 -0
- package/snippets/toc.html +1 -1
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]);
|
package/bin/lib/catalog.mjs
CHANGED
|
@@ -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);
|
package/bin/lib/copy-js.mjs
CHANGED
|
@@ -16,6 +16,8 @@ const SCRIPTS = [
|
|
|
16
16
|
["@birdycom/omniaui", "dist/contact-form.js", "oc-contact-form.js", "contact form: send with fetch, field errors and the result in place ([data-contact-form])"],
|
|
17
17
|
["@birdycom/omniaui", "dist/fly.js", "oc-fly.js", "cards that fly in from the middle of their row on scroll (.oc-reveal--fly)"],
|
|
18
18
|
["@birdycom/omniaui", "dist/particles.js", "oc-particles.js", "particle field: drifting points with lines on a background canvas (canvas.oc-particles)"],
|
|
19
|
+
["@birdycom/omniaui", "dist/language-select.js", "oc-language-select.js", "language select: go to the chosen language's page, keeping the #hash ([data-oc-language-select])"],
|
|
20
|
+
["@birdycom/omniaui", "dist/toc.js", "oc-toc.js", "table of contents: highlight the heading you are reading where :target-current is missing (.oc-toc)"],
|
|
19
21
|
["@birdycom/omniaui", "dist/form-extras.js", "oc-form-extras.js", "ISO week in date fields, name card rename, avatar picker preview, quantity steps, language code"],
|
|
20
22
|
["@birdycom/omniaui-pro", "dist/spotlight.js", "oc-spotlight.js", "spotlight cards (Pro)"],
|
|
21
23
|
["@birdycom/omniaui-pro", "dist/ecosystem-map.js", "oc-ecosystem-map.js", "ecosystem map lines (Pro)"],
|