youiyoux 0.1.2 → 0.1.4
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 +10 -0
- package/dist/chunks/{chunk-S7UV34H5.js → chunk-42YJX3W5.js} +1 -3
- package/dist/chunks/{chunk-FUB7B3VK.js → chunk-4BBYLTZX.js} +10 -10
- package/dist/chunks/chunk-52KOKYY6.js +8710 -0
- package/dist/chunks/chunk-FJZFCAL5.js +129 -0
- package/dist/chunks/chunk-FVVL5JCY.js +24 -0
- package/dist/chunks/{chunk-UHPK62Q5.js → chunk-M5XZWCPS.js} +240 -60
- package/dist/chunks/{chunk-ZLRFD5JI.js → chunk-NYDJYMID.js} +263 -16
- package/dist/chunks/{src-7ENJHYG4.js → chunk-RDTHHRZN.js} +319 -165
- package/dist/chunks/{chunk-E4HNK7VF.js → chunk-WNTS7ZO4.js} +1 -1
- package/dist/chunks/chunk-XAEMVEYX.js +188 -0
- package/dist/chunks/{chunk-CLNMVQZJ.js → chunk-YFCMTTXS.js} +708 -494
- package/dist/chunks/chunk-YJ7WMBTT.js +13761 -0
- package/dist/chunks/src-5IP4NGKT.js +115 -0
- package/dist/chunks/src-6CJR547Y.js +124 -0
- package/dist/chunks/{src-WQWYJ6IQ.js → src-BPETAFLW.js} +175 -76
- package/dist/chunks/{src-B742AYFC.js → src-LLV7IY6W.js} +55 -16
- package/dist/chunks/src-RHNZELGE.js +306 -0
- package/dist/chunks/{src-4KFNL3MY.js → src-SFKFERZ2.js} +18 -8
- package/dist/chunks/{src-VEHGMKYV.js → src-VL2ZYO6X.js} +4 -4
- package/dist/hub/assets/Badge-CUJUit4d.js +1 -0
- package/dist/hub/assets/CandidatePanel-CnbK4S0j.js +1 -0
- package/dist/hub/assets/CatalogScreen-B5OVL-AR.js +1 -0
- package/dist/hub/assets/ChangesScreen-GwGqJwxN.js +1 -0
- package/dist/hub/assets/CheatSheet-BLSOq-xa.js +1 -0
- package/dist/hub/assets/CodeBlock-CsiGFgvI.js +1 -0
- package/dist/hub/assets/CommandPalette-CAWQfdXJ.js +1 -0
- package/dist/hub/assets/CopyButton-DE8drl4P.js +1 -0
- package/dist/hub/assets/Disclosure-B1kTgPgk.js +1 -0
- package/dist/hub/assets/DiscoverScreen-Tl_Z6mgY.js +2 -0
- package/dist/hub/assets/DraftEditor-yIDapXTs.js +5 -0
- package/dist/hub/assets/Field-LwrJXoOs.js +1 -0
- package/dist/hub/assets/GapsScreen-DXZAlm6v.js +1 -0
- package/dist/hub/assets/HomeScreen-CEpiVhOa.js +1 -0
- package/dist/hub/assets/InventoryScreen-CEG3Pmw_.js +1 -0
- package/dist/hub/assets/KindIcon-BJ6bz-ny.js +1 -0
- package/dist/hub/assets/LibraryScreen-IaVnxrX9.js +1 -0
- package/dist/hub/assets/LicenceBadge-CLCUMMHE.js +1 -0
- package/dist/hub/assets/Opened-DJyf4Hnj.js +1 -0
- package/dist/hub/assets/Preview-C069zVMP.js +1 -0
- package/dist/hub/assets/RuleDetail-B4g2-TRe.js +3 -0
- package/dist/hub/assets/RulesScreen-CAaXIWjO.js +3 -0
- package/dist/hub/assets/ScreenImage-DcI7_G3O.js +1 -0
- package/dist/hub/assets/ScreensScreen-DwczCjZD.js +1 -0
- package/dist/hub/assets/SearchField-DaCpNAj6.js +1 -0
- package/dist/hub/assets/Section-BTnvUq_W.js +1 -0
- package/dist/hub/assets/Segmented-Dzi1x49S.js +1 -0
- package/dist/hub/assets/ServiceDown-Bv-BPXro.js +1 -0
- package/dist/hub/assets/SpecimenCapture-DlsjshVE.js +1 -0
- package/dist/hub/assets/Specimens-C-lHp7sr.js +2 -0
- package/dist/hub/assets/StackScreen-DkmELsqR.js +1 -0
- package/dist/hub/assets/StubScreens-Bt7lWLVK.js +1 -0
- package/dist/hub/assets/StyleScreen-tq1tbRBo.js +1 -0
- package/dist/hub/assets/Swatch-KDz4qxdM.js +1 -0
- package/dist/hub/assets/Tabs-1QQDS0I6.js +1 -0
- package/dist/hub/assets/TokenDetail-DvCw6GqC.js +1 -0
- package/dist/hub/assets/TokenValue-CsPRc2ai.js +1 -0
- package/dist/hub/assets/TokensScreen-DoENV8Xy.js +1 -0
- package/dist/hub/assets/arrow-right-DcbNDzqs.js +1 -0
- package/dist/hub/assets/bot-B3gC9oUR.js +1 -0
- package/dist/hub/assets/button-6mvMVtpb.js +1 -0
- package/dist/hub/assets/button.demo-DuU0DQbv.js +1 -0
- package/dist/hub/assets/card.demo-CufAxMAA.js +1 -0
- package/dist/hub/assets/chevron-down-CzN07vMi.js +1 -0
- package/dist/hub/assets/circle-alert-DT2LC4yf.js +1 -0
- package/dist/hub/assets/circle-check-DkwBMT62.js +1 -0
- package/dist/hub/assets/client-D7whEyep.js +1 -0
- package/dist/hub/assets/clsx-DB0hHKMi.js +1 -0
- package/dist/hub/assets/compass-BkKOZPYe.js +1 -0
- package/dist/hub/assets/contrast-BkNHUAPa.js +1 -0
- package/dist/hub/assets/createLucideIcon-CGDJWtKO.js +1 -0
- package/dist/hub/assets/discover-XjJEViwk.js +1 -0
- package/dist/hub/assets/dist-BYQYaPBV.js +1 -0
- package/dist/hub/assets/dist-Bk4srtDn.js +41 -0
- package/dist/hub/assets/dist-BogNzeK9.js +1 -0
- package/dist/hub/assets/dist-D0z7Bvsy.js +1 -0
- package/dist/hub/assets/download-BQI-Si9R.js +1 -0
- package/dist/hub/assets/engine-CMmt9yEz.js +1 -0
- package/dist/hub/assets/esm-NPpg23M8.js +1 -0
- package/dist/hub/assets/family-tiles-CyTdy_cP.js +1 -0
- package/dist/hub/assets/format-DxAYNTN_.js +1 -0
- package/dist/hub/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/hub/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/hub/assets/geist-latin-core-vkBVTr4s.woff2 +0 -0
- package/dist/hub/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/hub/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/hub/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/hub/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/hub/assets/geist-mono-latin-core-DccGGzmg.woff2 +0 -0
- package/dist/hub/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/hub/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/hub/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/hub/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/hub/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/hub/assets/git-pull-request-arrow-RqUUIRCU.js +1 -0
- package/dist/hub/assets/input.demo-238gqWpz.js +1 -0
- package/dist/hub/assets/inventory-BI8QBdar.js +1 -0
- package/dist/hub/assets/inventory-source-lZYzcA8O.js +1 -0
- package/dist/hub/assets/jsx-runtime-D6zNwnaE.js +9 -0
- package/dist/hub/assets/layers-DfzdK_wG.js +1 -0
- package/dist/hub/assets/layout-grid-xFY9L9Oc.js +1 -0
- package/dist/hub/assets/library-W5R8GwvG.js +1 -0
- package/dist/hub/assets/main-7snyIdoi.css +2 -0
- package/dist/hub/assets/main-B9CIkk5m.js +2 -0
- package/dist/hub/assets/minus-BDifFhOo.js +1 -0
- package/dist/hub/assets/monitor-X_lELkcU.js +1 -0
- package/dist/hub/assets/mouse-pointer-click-CVJ6hWg8.js +1 -0
- package/dist/hub/assets/paintbrush-DOkEgSTO.js +1 -0
- package/dist/hub/assets/plural-BbGQPQKA.js +1 -0
- package/dist/hub/assets/preview-BA8CPsKb.css +2 -0
- package/dist/hub/assets/preview-DUm13vr1.js +3 -0
- package/dist/hub/assets/protocol-caP6umNL.js +1 -0
- package/dist/hub/assets/react-DB-4Zxce.js +1 -0
- package/dist/hub/assets/shield-check-0ka0kQct.js +1 -0
- package/dist/hub/assets/trash-B7aEfJps.js +1 -0
- package/dist/hub/assets/triangle-alert-Dkdi9eDR.js +1 -0
- package/dist/hub/assets/try-live-zX3CSd3P.js +1 -0
- package/dist/hub/assets/utils-BoaXfs8y.js +1 -0
- package/dist/hub/assets/values-DzxR_TlI.js +1 -0
- package/dist/hub/assets/worker-Bh-wSp42.js +1 -0
- package/dist/hub/assets/workflow-jpV8wh-U.js +1 -0
- package/dist/hub/assets/x-MLbFVa4v.js +1 -0
- package/dist/hub/favicon.svg +1 -0
- package/dist/hub/index.html +35 -0
- package/dist/hub/kit/candidates.json +1 -0
- package/dist/hub/kit/chunks/chunk-2NYFUOIV.js +14 -0
- package/dist/hub/kit/chunks/chunk-DCANE7XH.js +1 -0
- package/dist/hub/kit/chunks/chunk-FTGHCY4I.js +14 -0
- package/dist/hub/kit/chunks/chunk-IBF3UTJF.js +33 -0
- package/dist/hub/kit/chunks/chunk-LLXY4VSH.js +1 -0
- package/dist/hub/kit/chunks/chunk-PUPZMW4P.js +14 -0
- package/dist/hub/kit/chunks/chunk-PWLNZQET.js +1 -0
- package/dist/hub/kit/chunks/chunk-ULXWVOKJ.js +1 -0
- package/dist/hub/kit/chunks/chunk-WM4BGGMK.js +1 -0
- package/dist/hub/kit/chunks/chunk-ZQUNRK72.js +1 -0
- package/dist/hub/kit/class-variance-authority.js +1 -0
- package/dist/hub/kit/clsx.js +1 -0
- package/dist/hub/kit/fonts/geist-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/hub/kit/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
- package/dist/hub/kit/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- package/dist/hub/kit/fonts/geist-latin-wght-normal.woff2 +0 -0
- package/dist/hub/kit/fonts/geist-vietnamese-wght-normal.woff2 +0 -0
- package/dist/hub/kit/frame.css.src +73 -0
- package/dist/hub/kit/frame.js +2 -0
- package/dist/hub/kit/lucide-react.js +1878 -0
- package/dist/hub/kit/preview.html +13 -0
- package/dist/hub/kit/radix-ui-react-dialog.js +41 -0
- package/dist/hub/kit/radix-ui-react-label.js +1 -0
- package/dist/hub/kit/radix-ui-react-separator.js +1 -0
- package/dist/hub/kit/radix-ui-react-slot.js +1 -0
- package/dist/hub/kit/radix-ui-react-switch.js +1 -0
- package/dist/hub/kit/radix-ui-react-tabs.js +1 -0
- package/dist/hub/kit/react-dom-client.js +1 -0
- package/dist/hub/kit/react-dom.js +1 -0
- package/dist/hub/kit/react-jsx-runtime.js +1 -0
- package/dist/hub/kit/react.js +1 -0
- package/dist/hub/kit/tailwind-merge.js +1 -0
- package/dist/hub/kit/tailwindcss/index.css +950 -0
- package/dist/hub/kit/tailwindcss/preflight.css +398 -0
- package/dist/hub/kit/tailwindcss/theme.css +510 -0
- package/dist/hub/kit/tailwindcss/utilities.css +1 -0
- package/dist/hub-demo/frame/button.demo.js +1 -0
- package/dist/hub-demo/frame/card.demo.js +1 -0
- package/dist/hub-demo/frame/demos.js +6 -0
- package/dist/hub-demo/frame/frame.css +770 -0
- package/dist/hub-demo/frame/input.demo.js +1 -0
- package/dist/hub-demo/preview/components/button.demo.tsx +47 -0
- package/dist/hub-demo/preview/components/button.tsx +31 -0
- package/dist/hub-demo/preview/components/card.demo.tsx +26 -0
- package/dist/hub-demo/preview/components/card.tsx +20 -0
- package/dist/hub-demo/preview/components/input.demo.tsx +39 -0
- package/dist/hub-demo/preview/components/input.tsx +19 -0
- package/dist/hub-demo/preview/components/utils.ts +5 -0
- package/dist/hub-demo/preview/system.css +161 -0
- package/dist/hub-demo/public/data/demo-app.usage.bedd9c82fe.json +1 -0
- package/dist/hub-demo/public/data/demo.catalog.a605de2281.json +1 -0
- package/dist/hub-demo/public/data/gaps.129a93538d.json +1 -0
- package/dist/hub-demo/public/data/inventory.165a4f6408.json +1 -0
- package/dist/hub-demo/public/data/inventory.console.badge.ad0238784e.json +1 -0
- package/dist/hub-demo/public/data/inventory.console.button.3249daff35.json +1 -0
- package/dist/hub-demo/public/data/inventory.console.card.9ea88708ac.json +1 -0
- package/dist/hub-demo/public/data/inventory.console.dialog.8b6574d93a.json +1 -0
- package/dist/hub-demo/public/data/inventory.console.input.bdffb756a7.json +1 -0
- package/dist/hub-demo/public/data/inventory.console.link-as-button.1ce7faa1f3.json +1 -0
- package/dist/hub-demo/public/data/inventory.console.tabs.813e694c44.json +1 -0
- package/dist/hub-demo/public/data/inventory.extras.e5d06c6ff4.json +1 -0
- package/dist/hub-demo/public/data/inventory.site.badge.047a68f644.json +1 -0
- package/dist/hub-demo/public/data/inventory.site.button.720938384e.json +1 -0
- package/dist/hub-demo/public/data/inventory.site.card.d8df5f6873.json +1 -0
- package/dist/hub-demo/public/data/inventory.site.link-as-button.9c1f8a55bf.json +1 -0
- package/dist/hub-demo/public/data/inventory.site.tabs.59bd0200b9.json +1 -0
- package/dist/hub-demo/public/data/manifest.json +39 -0
- package/dist/hub-demo/public/data/specimens.console.dark.046471907d.css +786 -0
- package/dist/hub-demo/public/data/specimens.console.light.aaffa2d213.css +786 -0
- package/dist/hub-demo/public/data/specimens.site.dark.94a6706908.css +92 -0
- package/dist/hub-demo/public/data/specimens.site.light.3ddbc8d28d.css +92 -0
- package/dist/hub-demo/public/previews/button.dark.webp +0 -0
- package/dist/hub-demo/public/previews/button.light.webp +0 -0
- package/dist/hub-demo/public/previews/card.dark.webp +0 -0
- package/dist/hub-demo/public/previews/card.light.webp +0 -0
- package/dist/hub-demo/public/previews/input.dark.webp +0 -0
- package/dist/hub-demo/public/previews/input.light.webp +0 -0
- package/dist/hub-previews.js +173 -0
- package/dist/hub-server.js +6329 -0
- package/dist/hub-snapshot.js +573 -0
- package/dist/schema/youi.gaps.schema.json +235 -0
- package/dist/schema/youi.request.schema.json +229 -0
- package/dist/tailwind-worker.js +3 -3
- package/dist/youi.js +10 -8
- package/dist/youiyoux.js +10 -8
- package/package.json +4 -4
- package/dist/chunks/chunk-3ZHGONNA.js +0 -21797
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createRequire as __youiRequire } from "node:module"; const require = __youiRequire(import.meta.url);
|
|
1
|
+
import { createRequire as __youiRequire } from "node:module"; import { dirname as __youiDir } from "node:path"; import { fileURLToPath as __youiPath } from "node:url"; const require = __youiRequire(import.meta.url); const __youiDirname = __youiDir(__youiPath(import.meta.url));
|
|
2
2
|
import {
|
|
3
3
|
__commonJS,
|
|
4
4
|
__export,
|
|
5
5
|
__require,
|
|
6
6
|
__toESM
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WNTS7ZO4.js";
|
|
8
8
|
|
|
9
9
|
// ../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js
|
|
10
10
|
var require_identity = __commonJS({
|
|
@@ -7336,6 +7336,9 @@ var require_dist = __commonJS({
|
|
|
7336
7336
|
}
|
|
7337
7337
|
});
|
|
7338
7338
|
|
|
7339
|
+
// ../core/src/detect.ts
|
|
7340
|
+
import { posix } from "node:path";
|
|
7341
|
+
|
|
7339
7342
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/external.js
|
|
7340
7343
|
var external_exports = {};
|
|
7341
7344
|
__export(external_exports, {
|
|
@@ -27005,7 +27008,6 @@ function date4(params) {
|
|
|
27005
27008
|
}
|
|
27006
27009
|
|
|
27007
27010
|
// ../core/src/detect.ts
|
|
27008
|
-
import { posix } from "node:path";
|
|
27009
27011
|
var IsoTime = external_exports.string().datetime({ offset: true });
|
|
27010
27012
|
var ShotPath = external_exports.string().min(1).refine((p) => !p.startsWith("/") && !posix.normalize(p.replace(/\\/g, "/")).split("/").includes(".."), "expected a path relative to the report, without ..");
|
|
27011
27013
|
var DETECT_CONFIDENCE = ["high", "medium", "low"];
|
|
@@ -27094,6 +27096,34 @@ var DetectReport = external_exports.object({
|
|
|
27094
27096
|
notes: external_exports.array(external_exports.string()).default([])
|
|
27095
27097
|
});
|
|
27096
27098
|
|
|
27099
|
+
// ../core/src/detect-draft.ts
|
|
27100
|
+
function sourceSlug(name) {
|
|
27101
|
+
const slug = name.toLowerCase().replace(/^www\./, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
27102
|
+
if (!slug) return "site";
|
|
27103
|
+
return /^[a-z]/.test(slug) ? slug : `site-${slug}`;
|
|
27104
|
+
}
|
|
27105
|
+
function nameSlug(text) {
|
|
27106
|
+
return text.toLowerCase().replace(/[^a-z0-9.]+/g, "-").replace(/^-+|-+$/g, "") || "item";
|
|
27107
|
+
}
|
|
27108
|
+
var capital = (word) => word.charAt(0).toUpperCase() + word.slice(1);
|
|
27109
|
+
function draftLibraryItem(report, element, ingestedAt = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
27110
|
+
const site = report.target.name;
|
|
27111
|
+
const library = report.libraries.find((l) => l.id === element.library) ?? { id: element.library, name: element.library };
|
|
27112
|
+
const url2 = element.page ?? report.pages.find((p) => p.status === "ok")?.url ?? (report.target.kind === "site" ? report.target.inputs[0] : void 0);
|
|
27113
|
+
const summary = `Seen on ${site}, likely ${library.name}`;
|
|
27114
|
+
return {
|
|
27115
|
+
schema: "youi.library/v1",
|
|
27116
|
+
id: `lib:${sourceSlug(site)}/component/${nameSlug(`${library.id}-${element.type}`)}`,
|
|
27117
|
+
name: `${library.name} ${capital(element.type)}`,
|
|
27118
|
+
kind: "component",
|
|
27119
|
+
stage: "library",
|
|
27120
|
+
summary: summary.length > 200 ? `${summary.slice(0, 199)}\u2026` : summary,
|
|
27121
|
+
source: { name: site, ...url2 && /^https?:\/\//.test(url2) ? { url: url2 } : {}, ingestedAt },
|
|
27122
|
+
categories: [element.type, `detected:${element.confidence}`],
|
|
27123
|
+
swapsWith: []
|
|
27124
|
+
};
|
|
27125
|
+
}
|
|
27126
|
+
|
|
27097
27127
|
// ../core/src/diff.ts
|
|
27098
27128
|
function lcsOps(a, b, aStart, bStart) {
|
|
27099
27129
|
const n = a.length;
|
|
@@ -27278,6 +27308,64 @@ async function readTextOrNull(file2) {
|
|
|
27278
27308
|
}
|
|
27279
27309
|
}
|
|
27280
27310
|
|
|
27311
|
+
// ../core/src/gaps.ts
|
|
27312
|
+
var IsoTime2 = external_exports.string().datetime({ offset: true });
|
|
27313
|
+
var GAP_STATUSES = ["system", "library", "hand-built", "missing"];
|
|
27314
|
+
var GapCandidate = external_exports.object({
|
|
27315
|
+
/** The Discover id (`lib:shadcn/component/calendar`). */
|
|
27316
|
+
id: external_exports.string(),
|
|
27317
|
+
name: external_exports.string(),
|
|
27318
|
+
/** Its registry or `npm`. */
|
|
27319
|
+
source: external_exports.string(),
|
|
27320
|
+
/** An SPDX id; unknown licences are never offered. */
|
|
27321
|
+
licence: external_exports.string(),
|
|
27322
|
+
/** GPL or AGPL: shipping it releases your code under the same licence. */
|
|
27323
|
+
copyleft: external_exports.boolean(),
|
|
27324
|
+
install: external_exports.string().nullable()
|
|
27325
|
+
});
|
|
27326
|
+
var GapConcept = external_exports.object({
|
|
27327
|
+
/** Discover's concept id (`date-picker`). */
|
|
27328
|
+
concept: external_exports.string(),
|
|
27329
|
+
/** How people call it (`date picker`). */
|
|
27330
|
+
name: external_exports.string(),
|
|
27331
|
+
status: external_exports.enum(GAP_STATUSES),
|
|
27332
|
+
/** The System's components for it. */
|
|
27333
|
+
system: external_exports.array(external_exports.string()),
|
|
27334
|
+
/** The packages that provide it: imported, or declared for it in package.json. */
|
|
27335
|
+
packages: external_exports.array(external_exports.string()),
|
|
27336
|
+
/** The project's own components named for it, first few. */
|
|
27337
|
+
definitions: external_exports.array(external_exports.object({ name: external_exports.string(), file: external_exports.string(), line: external_exports.number().int().positive() })),
|
|
27338
|
+
/** Components named for it, and the looks they and styled native elements of its kind render. */
|
|
27339
|
+
count: external_exports.number().int().nonnegative(),
|
|
27340
|
+
uses: external_exports.number().int().nonnegative(),
|
|
27341
|
+
files: external_exports.number().int().nonnegative(),
|
|
27342
|
+
/** For what is hand-built or missing; null when the Discover index is not synced (never "none"). */
|
|
27343
|
+
candidates: external_exports.array(GapCandidate).nullable()
|
|
27344
|
+
});
|
|
27345
|
+
var GapsProject = external_exports.object({
|
|
27346
|
+
id: external_exports.string(),
|
|
27347
|
+
/** False when the inventory could not read every file: hand-built counts are then a lower bound. */
|
|
27348
|
+
complete: external_exports.boolean(),
|
|
27349
|
+
/** Whether its package.json was read (its declared packages count as libraries). */
|
|
27350
|
+
dependencies: external_exports.enum(["read", "unread"]),
|
|
27351
|
+
/** Hand-built first (most uses first), then missing, from a library, in the System. */
|
|
27352
|
+
concepts: external_exports.array(GapConcept)
|
|
27353
|
+
});
|
|
27354
|
+
var GapsReport = external_exports.object({
|
|
27355
|
+
$schema: external_exports.string().optional(),
|
|
27356
|
+
schema: external_exports.literal("youi.gaps/v1"),
|
|
27357
|
+
generatedAt: IsoTime2,
|
|
27358
|
+
/** The System the projects follow, when they follow one. */
|
|
27359
|
+
system: external_exports.string().nullable(),
|
|
27360
|
+
/** synced: candidates come from the local Discover index; not-synced: there are none to offer yet. */
|
|
27361
|
+
discover: external_exports.enum(["synced", "not-synced"]),
|
|
27362
|
+
/** The kinds a project is expected to have (the standard kit): only these are ever "missing". */
|
|
27363
|
+
kit: external_exports.array(external_exports.string()),
|
|
27364
|
+
projects: external_exports.array(GapsProject),
|
|
27365
|
+
/** Kinds hand-built in more than one project, most uses first. */
|
|
27366
|
+
across: external_exports.array(external_exports.object({ concept: external_exports.string(), name: external_exports.string(), projects: external_exports.array(external_exports.string()), uses: external_exports.number().int().nonnegative() }))
|
|
27367
|
+
});
|
|
27368
|
+
|
|
27281
27369
|
// ../core/src/hash.ts
|
|
27282
27370
|
import { createHash } from "node:crypto";
|
|
27283
27371
|
function sha256(content) {
|
|
@@ -27295,7 +27383,11 @@ function stableStringify(value) {
|
|
|
27295
27383
|
});
|
|
27296
27384
|
}
|
|
27297
27385
|
|
|
27386
|
+
// ../core/src/hierarchy.ts
|
|
27387
|
+
import { join as join2 } from "node:path";
|
|
27388
|
+
|
|
27298
27389
|
// ../core/src/ids.ts
|
|
27390
|
+
var ELEMENT_KINDS = ["token", "component", "rule", "migration"];
|
|
27299
27391
|
var ID_PATTERN = /^youi:([a-z][a-z0-9-]*)\/(token|component|rule|migration)\/([a-z0-9][a-z0-9.\-]*)$/;
|
|
27300
27392
|
var ElementId = external_exports.string().regex(ID_PATTERN, "expected youi:<system>/<kind>/<name>");
|
|
27301
27393
|
function parseId(id) {
|
|
@@ -27303,6 +27395,10 @@ function parseId(id) {
|
|
|
27303
27395
|
if (!match) return null;
|
|
27304
27396
|
return { system: match[1], kind: match[2], name: match[3] };
|
|
27305
27397
|
}
|
|
27398
|
+
var ruleSlug = (id) => id.slice(id.indexOf("/rule/") + 6);
|
|
27399
|
+
function formatId(system, kind, name) {
|
|
27400
|
+
return `youi:${system}/${kind}/${name}`;
|
|
27401
|
+
}
|
|
27306
27402
|
function matchesQuery(id, query) {
|
|
27307
27403
|
const parsed = parseId(id);
|
|
27308
27404
|
if (!parsed) return false;
|
|
@@ -27314,7 +27410,6 @@ function safeId(id) {
|
|
|
27314
27410
|
}
|
|
27315
27411
|
|
|
27316
27412
|
// ../core/src/hierarchy.ts
|
|
27317
|
-
import { join as join2 } from "node:path";
|
|
27318
27413
|
var ELEMENT_STAGES = ["library", "candidate", "adopted", "in-use"];
|
|
27319
27414
|
var ElementStage = external_exports.enum(ELEMENT_STAGES);
|
|
27320
27415
|
var LIBRARY_STAGES = ["library", "candidate"];
|
|
@@ -27331,7 +27426,7 @@ var STAGE_MOVES = [
|
|
|
27331
27426
|
function canMove(from, to, actor) {
|
|
27332
27427
|
return STAGE_MOVES.some((move) => move.from === from && move.to === to && move.by.includes(actor));
|
|
27333
27428
|
}
|
|
27334
|
-
var MCP_TOOLS = ["system_search", "system_get_component", "system_get_tokens", "system_get_rules", "system_where_used", "system_screen_bom", "system_check", "system_plan", "library_search", "library_request", "discover_search", "discover_show", "index_where_used", "index_swap_impact", "index_rule_covers", "ui_find_component", "ui_render"];
|
|
27429
|
+
var MCP_TOOLS = ["system_search", "system_get_component", "system_get_tokens", "system_get_rules", "system_where_used", "system_screen_bom", "system_check", "system_plan", "library_search", "library_request", "discover_search", "discover_show", "index_where_used", "index_swap_impact", "index_rule_covers", "ui_find_component", "ui_render", "requests_list", "request_reply", "request_addressed", "screens_capture"];
|
|
27335
27430
|
var LIBRARY_KINDS = ["component", "token", "pattern"];
|
|
27336
27431
|
var LIBRARY_ID_PATTERN = /^lib:([a-z][a-z0-9-]*)\/(component|token|pattern)\/([a-z0-9][a-z0-9.\-]*)$/;
|
|
27337
27432
|
var LibraryId = external_exports.string().regex(LIBRARY_ID_PATTERN, "expected lib:<source>/<kind>/<name>");
|
|
@@ -27406,6 +27501,64 @@ async function loadLibrary(root) {
|
|
|
27406
27501
|
return { entries };
|
|
27407
27502
|
}
|
|
27408
27503
|
|
|
27504
|
+
// ../core/src/licence.ts
|
|
27505
|
+
function copyleft(spdx) {
|
|
27506
|
+
const strong = (part) => part.split(/\s+(?:AND|WITH)\s+/).some((id) => /^A?GPL-/.test(id.replace(/[()]/g, "").trim()));
|
|
27507
|
+
return spdx.split(/\s+OR\s+/).every(strong);
|
|
27508
|
+
}
|
|
27509
|
+
|
|
27510
|
+
// ../core/src/requests.ts
|
|
27511
|
+
var IsoTime3 = external_exports.string().datetime({ offset: true });
|
|
27512
|
+
var REQUEST_ID = /^r-[0-9a-f]{10}$/;
|
|
27513
|
+
var REQUEST_STATUSES = ["open", "addressed", "closed"];
|
|
27514
|
+
var RequestAuthor = external_exports.object({ kind: external_exports.enum(["person", "agent"]), name: external_exports.string().min(1).max(100) });
|
|
27515
|
+
var Box = external_exports.object({ x: external_exports.number(), y: external_exports.number(), width: external_exports.number().nonnegative(), height: external_exports.number().nonnegative() });
|
|
27516
|
+
var Size = external_exports.object({ width: external_exports.number().positive(), height: external_exports.number().positive() });
|
|
27517
|
+
var RequestTarget = external_exports.object({
|
|
27518
|
+
/** The route as the usage map names it (`/settings`, `*` for the app shell). */
|
|
27519
|
+
route: external_exports.string().min(1).max(300),
|
|
27520
|
+
/** here: this one, on this screen; element: every place the element is used. */
|
|
27521
|
+
scope: external_exports.enum(["here", "element"]),
|
|
27522
|
+
/** The component's name as it rendered (`Button`). */
|
|
27523
|
+
name: external_exports.string().min(1).max(200),
|
|
27524
|
+
/** The System element it is, or the one a lookalike stands in for. */
|
|
27525
|
+
element: ElementId.optional(),
|
|
27526
|
+
lookalike: external_exports.boolean().optional(),
|
|
27527
|
+
/** Project-relative, and the line that rendered it, when the capture found them. */
|
|
27528
|
+
file: external_exports.string().min(1).max(500).optional(),
|
|
27529
|
+
line: external_exports.number().int().positive().optional(),
|
|
27530
|
+
box: Box.optional(),
|
|
27531
|
+
page: Size.optional()
|
|
27532
|
+
});
|
|
27533
|
+
var RequestEntry = external_exports.object({
|
|
27534
|
+
author: RequestAuthor,
|
|
27535
|
+
at: IsoTime3,
|
|
27536
|
+
body: external_exports.string().max(4e3),
|
|
27537
|
+
/** A status change this entry made, if any. */
|
|
27538
|
+
status: external_exports.enum(REQUEST_STATUSES).optional()
|
|
27539
|
+
});
|
|
27540
|
+
var RequestDoc = external_exports.object({
|
|
27541
|
+
$schema: external_exports.string().optional(),
|
|
27542
|
+
schema: external_exports.literal("youi.request/v1"),
|
|
27543
|
+
id: external_exports.string().regex(REQUEST_ID, "expected r-<10 hex>"),
|
|
27544
|
+
/** The project id from youi.project.json. */
|
|
27545
|
+
project: external_exports.string().min(1).max(200),
|
|
27546
|
+
/** comment: a note; change: something to do. */
|
|
27547
|
+
kind: external_exports.enum(["comment", "change"]),
|
|
27548
|
+
status: external_exports.enum(REQUEST_STATUSES),
|
|
27549
|
+
body: external_exports.string().min(1).max(4e3),
|
|
27550
|
+
author: RequestAuthor,
|
|
27551
|
+
createdAt: IsoTime3,
|
|
27552
|
+
updatedAt: IsoTime3,
|
|
27553
|
+
target: RequestTarget,
|
|
27554
|
+
/** The screen as it was when this was filed (`<id>.before.webp` beside it), to compare with after a change. */
|
|
27555
|
+
before: external_exports.string().regex(/^r-[0-9a-f]{10}\.before\.webp$/).optional(),
|
|
27556
|
+
thread: external_exports.array(RequestEntry).max(500)
|
|
27557
|
+
});
|
|
27558
|
+
|
|
27559
|
+
// ../core/src/schemas.ts
|
|
27560
|
+
import { posix as posix2 } from "node:path";
|
|
27561
|
+
|
|
27409
27562
|
// ../core/src/tokens.ts
|
|
27410
27563
|
var TOKEN_ALIAS = /^\{([^{}]+)\}$/;
|
|
27411
27564
|
var ALIAS_MESSAGE = "expected an alias like {color.brand}";
|
|
@@ -27564,10 +27717,8 @@ function describeIssues(error62) {
|
|
|
27564
27717
|
function tokenValueProblems(type, value) {
|
|
27565
27718
|
if (type === void 0) return ["no $type (on the token or an enclosing group)"];
|
|
27566
27719
|
if (!isTokenType(type)) return [`unknown $type "${type}"; expected one of ${TOKEN_TYPES.join(", ")}`];
|
|
27567
|
-
|
|
27568
|
-
|
|
27569
|
-
const valueResult = TOKEN_VALUE_SCHEMAS[type].safeParse(value);
|
|
27570
|
-
return valueResult.success ? [] : describeIssues(valueResult.error);
|
|
27720
|
+
if (tokenValueSchema(type).safeParse(value).success) return [];
|
|
27721
|
+
return describeIssues(TOKEN_VALUE_SCHEMAS[type].safeParse(value).error);
|
|
27571
27722
|
}
|
|
27572
27723
|
function validateTokenSets(sources) {
|
|
27573
27724
|
const problems = [];
|
|
@@ -27611,13 +27762,12 @@ function findCycles(edges) {
|
|
|
27611
27762
|
}
|
|
27612
27763
|
|
|
27613
27764
|
// ../core/src/schemas.ts
|
|
27614
|
-
import { posix as posix2 } from "node:path";
|
|
27615
27765
|
var SemVer = external_exports.string().regex(/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/, "expected semver x.y.z");
|
|
27616
27766
|
function normalizeRelPath(path) {
|
|
27617
27767
|
return posix2.normalize(path.replace(/\\/g, "/")).replace(/^\.\//, "").replace(/\/+$/, "") || ".";
|
|
27618
27768
|
}
|
|
27619
27769
|
var RelPath = external_exports.string().min(1).refine((p) => !p.startsWith("/") && !normalizeRelPath(p).split("/").includes(".."), "expected a path relative to its root, without ..");
|
|
27620
|
-
var
|
|
27770
|
+
var IsoTime4 = external_exports.string().datetime({ offset: true });
|
|
27621
27771
|
var SystemConfig = external_exports.object({
|
|
27622
27772
|
id: external_exports.string().regex(/^[a-z][a-z0-9-]*$/, { error: ({ input: input2 }) => safeId(input2) === null ? `Invalid system id ${JSON.stringify(input2)}: use a plain name without ".." or path separators` : `Invalid system id ${JSON.stringify(input2)}: use lowercase letters, digits and hyphens, starting with a letter` }),
|
|
27623
27773
|
name: external_exports.string().min(1),
|
|
@@ -27875,7 +28025,7 @@ var ScanReport = external_exports.object({
|
|
|
27875
28025
|
/** Files checked from supplied text (unsaved edits, candidate code) rather than disk. */
|
|
27876
28026
|
overrides: external_exports.array(external_exports.string())
|
|
27877
28027
|
}).optional(),
|
|
27878
|
-
generatedAt:
|
|
28028
|
+
generatedAt: IsoTime4,
|
|
27879
28029
|
durationMs: external_exports.number(),
|
|
27880
28030
|
status: external_exports.enum(["complete", "partial"]),
|
|
27881
28031
|
coverage: external_exports.object({
|
|
@@ -27918,7 +28068,7 @@ var Baseline = external_exports.object({
|
|
|
27918
28068
|
$schema: external_exports.string().optional(),
|
|
27919
28069
|
schema: external_exports.literal("youi.baseline/v1"),
|
|
27920
28070
|
project: external_exports.string(),
|
|
27921
|
-
recordedAt:
|
|
28071
|
+
recordedAt: IsoTime4,
|
|
27922
28072
|
identity: CheckIdentity,
|
|
27923
28073
|
totals: external_exports.object({ errors: external_exports.number().int(), warnings: external_exports.number().int() }),
|
|
27924
28074
|
entries: external_exports.array(BaselineEntry)
|
|
@@ -27940,7 +28090,7 @@ var LockFile = external_exports.object({
|
|
|
27940
28090
|
system: external_exports.string(),
|
|
27941
28091
|
systemVersion: SemVer,
|
|
27942
28092
|
sourceCommit: external_exports.string().nullable(),
|
|
27943
|
-
syncedAt:
|
|
28093
|
+
syncedAt: IsoTime4,
|
|
27944
28094
|
files: external_exports.record(external_exports.string(), LockEntry)
|
|
27945
28095
|
});
|
|
27946
28096
|
var INVENTORY_ROLES = ["button", "link-as-button", "input", "card", "badge", "dialog", "tabs"];
|
|
@@ -28092,7 +28242,7 @@ var InventoryReport = external_exports.object({
|
|
|
28092
28242
|
$schema: external_exports.string().optional(),
|
|
28093
28243
|
schema: external_exports.literal("youi.inventory/v1"),
|
|
28094
28244
|
scanner: external_exports.string(),
|
|
28095
|
-
generatedAt:
|
|
28245
|
+
generatedAt: IsoTime4,
|
|
28096
28246
|
durationMs: external_exports.number(),
|
|
28097
28247
|
/** Two looks share a family only when every dimension is within these (px; weight in units) of every other look's. */
|
|
28098
28248
|
tolerance: external_exports.object({ height: external_exports.number(), padding: external_exports.number(), radius: external_exports.number(), fontSize: external_exports.number(), fontWeight: external_exports.number() }),
|
|
@@ -28126,7 +28276,9 @@ var PUBLISHED_SCHEMAS = {
|
|
|
28126
28276
|
"youi.baseline.schema.json": Baseline,
|
|
28127
28277
|
"youi.inventory.schema.json": InventoryReport,
|
|
28128
28278
|
"youi.detect.schema.json": DetectReport,
|
|
28129
|
-
"youi.tokens.schema.json": TokenDocument
|
|
28279
|
+
"youi.tokens.schema.json": TokenDocument,
|
|
28280
|
+
"youi.request.schema.json": RequestDoc,
|
|
28281
|
+
"youi.gaps.schema.json": GapsReport
|
|
28130
28282
|
};
|
|
28131
28283
|
function normalizeProjectConfig(config2) {
|
|
28132
28284
|
const n = normalizeRelPath;
|
|
@@ -28297,55 +28449,150 @@ export {
|
|
|
28297
28449
|
preprocess,
|
|
28298
28450
|
iso_exports,
|
|
28299
28451
|
external_exports,
|
|
28452
|
+
DETECT_CONFIDENCE,
|
|
28453
|
+
DetectConfidence,
|
|
28454
|
+
DETECT_ELEMENT_TYPES,
|
|
28455
|
+
DetectElementType,
|
|
28456
|
+
EVIDENCE_KINDS,
|
|
28457
|
+
DetectEvidence,
|
|
28458
|
+
DetectLibrary,
|
|
28459
|
+
DetectElement,
|
|
28460
|
+
DetectUnused,
|
|
28461
|
+
DetectPage,
|
|
28462
|
+
DetectFont,
|
|
28300
28463
|
DetectReport,
|
|
28464
|
+
sourceSlug,
|
|
28465
|
+
draftLibraryItem,
|
|
28301
28466
|
unifiedDiff,
|
|
28302
28467
|
DefinitionError,
|
|
28303
28468
|
toPosix,
|
|
28304
28469
|
relPath,
|
|
28470
|
+
globRegExp,
|
|
28305
28471
|
matchesAny,
|
|
28472
|
+
walkGlob,
|
|
28306
28473
|
findFiles,
|
|
28474
|
+
parseDefinition,
|
|
28307
28475
|
readDefinition,
|
|
28308
28476
|
writeFileAtomic,
|
|
28309
28477
|
readTextOrNull,
|
|
28478
|
+
GAP_STATUSES,
|
|
28479
|
+
GapCandidate,
|
|
28480
|
+
GapConcept,
|
|
28481
|
+
GapsProject,
|
|
28482
|
+
GapsReport,
|
|
28310
28483
|
sha256,
|
|
28311
28484
|
shortHash,
|
|
28312
28485
|
stableStringify,
|
|
28486
|
+
ELEMENT_KINDS,
|
|
28313
28487
|
ElementId,
|
|
28314
28488
|
parseId,
|
|
28489
|
+
ruleSlug,
|
|
28490
|
+
formatId,
|
|
28315
28491
|
matchesQuery,
|
|
28316
28492
|
safeId,
|
|
28493
|
+
ELEMENT_STAGES,
|
|
28494
|
+
ElementStage,
|
|
28317
28495
|
systemStage,
|
|
28318
28496
|
canMove,
|
|
28319
28497
|
MCP_TOOLS,
|
|
28498
|
+
LIBRARY_KINDS,
|
|
28499
|
+
LibraryId,
|
|
28320
28500
|
isLibraryId,
|
|
28501
|
+
FamilyId,
|
|
28321
28502
|
isFamilyId,
|
|
28322
28503
|
LIBRARY_SOURCE_KINDS,
|
|
28504
|
+
LibraryLicense,
|
|
28323
28505
|
LibraryEntry,
|
|
28324
28506
|
LIBRARY_DIR,
|
|
28325
28507
|
loadLibrary,
|
|
28508
|
+
copyleft,
|
|
28509
|
+
REQUEST_ID,
|
|
28510
|
+
REQUEST_STATUSES,
|
|
28511
|
+
RequestAuthor,
|
|
28512
|
+
RequestTarget,
|
|
28513
|
+
RequestEntry,
|
|
28514
|
+
RequestDoc,
|
|
28326
28515
|
TOKEN_ALIAS,
|
|
28516
|
+
TokenAlias,
|
|
28517
|
+
ColorValue,
|
|
28518
|
+
DimensionValue,
|
|
28519
|
+
DurationValue,
|
|
28520
|
+
CubicBezierValue,
|
|
28521
|
+
FONT_FAMILY_NAME,
|
|
28522
|
+
FONT_FAMILY_LIST,
|
|
28523
|
+
FontFamilyValue,
|
|
28524
|
+
FontWeightValue,
|
|
28525
|
+
StrokeStyleValue,
|
|
28526
|
+
BorderValue,
|
|
28527
|
+
TransitionValue,
|
|
28528
|
+
ShadowLayer,
|
|
28529
|
+
ShadowValue,
|
|
28530
|
+
GradientValue,
|
|
28531
|
+
TypographyValue,
|
|
28532
|
+
SpringValue,
|
|
28533
|
+
FocusRingValue,
|
|
28534
|
+
TOKEN_VALUE_SCHEMAS,
|
|
28535
|
+
TOKEN_TYPES,
|
|
28536
|
+
isTokenType,
|
|
28537
|
+
tokenValueSchema,
|
|
28538
|
+
TokenDocument,
|
|
28327
28539
|
CSS_SAFE_NAME,
|
|
28540
|
+
flattenTokens,
|
|
28328
28541
|
aliasesIn,
|
|
28329
28542
|
tokenValueProblems,
|
|
28330
28543
|
validateTokenSets,
|
|
28331
28544
|
normalizeRelPath,
|
|
28545
|
+
SystemConfig,
|
|
28546
|
+
DesignConfig,
|
|
28547
|
+
RouteMapEntry,
|
|
28332
28548
|
RouteConfig,
|
|
28549
|
+
DarkSelector,
|
|
28550
|
+
DEFAULT_DARK_SELECTORS,
|
|
28551
|
+
TailwindConfig,
|
|
28333
28552
|
OutputConfig,
|
|
28553
|
+
AgentConfig,
|
|
28334
28554
|
ProjectConfig,
|
|
28555
|
+
PropSpec,
|
|
28335
28556
|
COMPONENT_STATES,
|
|
28336
28557
|
ComponentContract,
|
|
28337
28558
|
RuleCheck,
|
|
28338
28559
|
RuleRollout,
|
|
28339
28560
|
RuleSpec,
|
|
28561
|
+
MigrationChange,
|
|
28340
28562
|
MigrationSpec,
|
|
28563
|
+
PropValue,
|
|
28564
|
+
Position,
|
|
28565
|
+
RouteAttribution,
|
|
28566
|
+
UsageSite,
|
|
28567
|
+
UnknownSite,
|
|
28568
|
+
Lookalike,
|
|
28569
|
+
Violation,
|
|
28570
|
+
RuleRun,
|
|
28341
28571
|
ScanReport,
|
|
28572
|
+
CheckIdentity,
|
|
28573
|
+
BaselineEntry,
|
|
28342
28574
|
Baseline,
|
|
28575
|
+
LockEntry,
|
|
28343
28576
|
LockFile,
|
|
28344
28577
|
INVENTORY_ROLES,
|
|
28578
|
+
InventoryRole,
|
|
28345
28579
|
SHAPE_DIMENSIONS,
|
|
28580
|
+
InventoryShape,
|
|
28581
|
+
InventoryProject,
|
|
28582
|
+
InventoryDefinition,
|
|
28583
|
+
InventoryKit,
|
|
28584
|
+
InventoryPrimitive,
|
|
28585
|
+
InventoryRecipeWrapper,
|
|
28586
|
+
InventoryRecipe,
|
|
28587
|
+
InventoryLook,
|
|
28588
|
+
InventoryFamily,
|
|
28589
|
+
InventoryFlag,
|
|
28346
28590
|
InventoryReport,
|
|
28591
|
+
PUBLISHED_SCHEMAS,
|
|
28347
28592
|
normalizeProjectConfig,
|
|
28593
|
+
jsonSchemaFor,
|
|
28348
28594
|
renderJsonSchemas,
|
|
28595
|
+
DESIGN_CONFIG_FILE,
|
|
28349
28596
|
loadDesignRepo,
|
|
28350
28597
|
getSystem,
|
|
28351
28598
|
BUILT_IN_CHECKS,
|