designsource 0.8.0 → 0.9.0
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/index.js +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -156,7 +156,7 @@ function libOf(utilsFile, utilsAlias) {
|
|
|
156
156
|
return { libDir: dir === "." ? "" : dir, libAlias: slash > 0 ? utilsAlias.slice(0, slash) : "" };
|
|
157
157
|
}
|
|
158
158
|
function rewriteForApp(contents, t) {
|
|
159
|
-
return contents.replace(/(['"])@\/components\/ui\//g, (_, q) => `${q}${t.uiAlias}/`).replace(/(['"])@\/lib\/utils\1/g, (_, q) => `${q}${t.utilsAlias}${q}`).replace(/(['"])@\/components\/(design-system|blocks)\//g, (_, q, dir) => `${q}${t.componentsAlias}/${dir}/`).replace(/(['"])@\/components\/(preview-gallery|custom-surface|sample-surfaces)\1/g, (_, q, file) => `${q}${t.componentsAlias}/${file}${q}`).replace(/(['"])@\/lib\/(mockup-schema|surface-inference)\1/g, (_, q, file) => `${q}${t.libAlias}/${file}${q}`);
|
|
159
|
+
return contents.replace(/(['"])@\/components\/ui\//g, (_, q) => `${q}${t.uiAlias}/`).replace(/(['"])@\/lib\/utils\1/g, (_, q) => `${q}${t.utilsAlias}${q}`).replace(/(['"])@\/components\/(design-system|blocks)\//g, (_, q, dir) => `${q}${t.componentsAlias}/${dir}/`).replace(/(['"])@\/components\/(preview-gallery|custom-surface|sample-surfaces|mockup-media|sample-media)\1/g, (_, q, file) => `${q}${t.componentsAlias}/${file}${q}`).replace(/(['"])@\/lib\/(mockup-schema|surface-inference|mockup-media)\1/g, (_, q, file) => `${q}${t.libAlias}/${file}${q}`);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// src/add/setup.ts
|
|
@@ -1476,8 +1476,8 @@ export const SECTION_CONFIG: SectionConfig = ${JSON.stringify(config, null, 2)}
|
|
|
1476
1476
|
`;
|
|
1477
1477
|
}
|
|
1478
1478
|
var join22 = (dir, rest) => dir ? `${dir}/${rest}` : rest;
|
|
1479
|
-
var COMPONENT_FILES = /* @__PURE__ */ new Set(["preview-gallery.tsx", "custom-surface.tsx", "sample-surfaces.tsx"]);
|
|
1480
|
-
var LIB_FILES = /* @__PURE__ */ new Set(["surface-inference.ts", "mockup-schema.ts"]);
|
|
1479
|
+
var COMPONENT_FILES = /* @__PURE__ */ new Set(["preview-gallery.tsx", "custom-surface.tsx", "sample-surfaces.tsx", "mockup-media.tsx", "sample-media.ts"]);
|
|
1480
|
+
var LIB_FILES = /* @__PURE__ */ new Set(["surface-inference.ts", "mockup-schema.ts", "mockup-media.ts"]);
|
|
1481
1481
|
var pointAtStub = (contents, alias) => contents.replace(/(['"])([^'"]*)\/blocks\/block-view\1/g, (whole, q, prefix) => prefix === alias ? `${q}./block-view${q}` : whole);
|
|
1482
1482
|
var withoutExtension = (file) => file.replace(/\.(tsx?|json|css)$/, "");
|
|
1483
1483
|
function placeManifestFile(key, componentsDir, t) {
|
|
@@ -1490,7 +1490,7 @@ function placeManifestFile(key, componentsDir, t) {
|
|
|
1490
1490
|
return { path: join22(componentsDir, `blocks/${rest}`), name: `section:block:${withoutExtension(rest)}` };
|
|
1491
1491
|
}
|
|
1492
1492
|
if (COMPONENT_FILES.has(key)) return { path: join22(componentsDir, key), name: `section:${withoutExtension(key)}` };
|
|
1493
|
-
if (LIB_FILES.has(key)) return { path: join22(t.libDir, key), name: `section:${withoutExtension(key)}` };
|
|
1493
|
+
if (LIB_FILES.has(key)) return { path: join22(t.libDir, key), name: key === "mockup-media.ts" ? "section:lib-mockup-media" : `section:${withoutExtension(key)}` };
|
|
1494
1494
|
throw new CliError(UPDATE_MESSAGE);
|
|
1495
1495
|
}
|
|
1496
1496
|
function stamped(path, name, contents) {
|
|
@@ -4027,7 +4027,7 @@ async function runLogout(args, io, deps = defaultLoginDeps(process.env)) {
|
|
|
4027
4027
|
import { homedir as homedir4 } from "node:os";
|
|
4028
4028
|
|
|
4029
4029
|
// src/version.ts
|
|
4030
|
-
var VERSION = true ? "0.
|
|
4030
|
+
var VERSION = true ? "0.9.0" : "0.0.0-dev";
|
|
4031
4031
|
|
|
4032
4032
|
// src/mcp/account-session.ts
|
|
4033
4033
|
var NOT_SIGNED_IN_FOR = (root) => `Not signed in on this computer for ${printable(root)}. Ask the user to run npx designsource login in a terminal in that folder, then restart this app.`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "designsource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The DS source CLI: add your design system's UI kit to a React app (add), add the design system to any other app (integrate), start a new Next.js project from it (create), or serve it to a coding agent over MCP (mcp) — tokens, every component and your mockup page.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|