typerighter 0.43.0 → 0.44.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/{app-DjpuKzvd.js → app-Cs3OppHS.js} +1 -1
- package/dist/{cli-DKDYNRYe.js → cli-BcvGlMzh.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +154 -154
- package/dist/client.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{init-sdwwozr2.js → init-DCe3DWKz.js} +2 -2
- package/dist/{jsonld-Crj_9xpa.js → jsonld-DZsAYYxx.js} +2 -2
- package/dist/node/build/index.d.ts.map +1 -1
- package/dist/node/lib/codegen/app-entry.d.ts +1 -1
- package/dist/node/lib/codegen/app-entry.d.ts.map +1 -1
- package/dist/node/lib/codegen/index.d.ts +0 -1
- package/dist/node/lib/codegen/index.d.ts.map +1 -1
- package/dist/node/lib/codegen/theme.d.ts +1 -0
- package/dist/node/lib/codegen/theme.d.ts.map +1 -1
- package/dist/node/lib/codegen/theme.test.d.ts +2 -0
- package/dist/node/lib/codegen/theme.test.d.ts.map +1 -0
- package/dist/node/lib/components.d.ts +14 -0
- package/dist/node/lib/components.d.ts.map +1 -0
- package/dist/node/lib/{htmlTemplate.d.ts → html-template.d.ts} +1 -1
- package/dist/node/lib/html-template.d.ts.map +1 -0
- package/dist/node/plugin/vite/index.d.ts.map +1 -1
- package/dist/node/plugin/vite/subplugins/component-contract.d.ts +4 -0
- package/dist/node/plugin/vite/subplugins/component-contract.d.ts.map +1 -0
- package/dist/node/plugin/vite/virtual/app.d.ts.map +1 -1
- package/dist/prerenderWorker.js +2 -2
- package/dist/{renderMath-C2Z7HdfG.js → renderMath-BAZXLnOu.js} +1 -1
- package/dist/rolldown-runtime-CEFd7nDs.js +30 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/types/index.d.ts.map +1 -1
- package/dist/shared/types/json-schema.d.ts +24 -0
- package/dist/shared/types/json-schema.d.ts.map +1 -0
- package/dist/{shared-QuBFygxT.js → shared-kjMIXu1H.js} +114 -102
- package/dist/shared.js +1 -1
- package/dist/vite-DrX11EH5.js +127331 -0
- package/dist/vite.js +1 -1
- package/package.json +3 -3
- package/dist/node/lib/codegen/components.d.ts +0 -7
- package/dist/node/lib/codegen/components.d.ts.map +0 -1
- package/dist/node/lib/htmlTemplate.d.ts.map +0 -1
- package/dist/rolldown-runtime-B0aSnxlc.js +0 -20
- package/dist/vite-Cj1Ofykq.js +0 -1531
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as Content, t as createTypedownApp, c as useRoute, l as useRouter, r as useSiteConfig, i as useSiteData, a as useTdContent, o as useTheme } from "./app-
|
|
1
|
+
export { s as Content, t as createTypedownApp, c as useRoute, l as useRouter, r as useSiteConfig, i as useSiteData, a as useTdContent, o as useTheme } from "./app-Cs3OppHS.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./vite-
|
|
2
|
-
import { t as s } from "./cli-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./vite-DrX11EH5.js";
|
|
2
|
+
import { t as s } from "./cli-BcvGlMzh.js";
|
|
3
3
|
export { n as PAGES_ID, i as PAGE_DATA_EVENT, t as SEARCH_INDEX_ID, e as SITE_DATA_ID, r as THEME_ID, a as buildSite, s as cli, o as typedown };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CEFd7nDs.js";
|
|
2
2
|
import { t } from "./context-CSvoDxVt.js";
|
|
3
3
|
import { a as n, i as r, n as i, r as a, t as o } from "./brand-CG1fQshq.js";
|
|
4
4
|
import s from "node:path";
|
|
@@ -746,7 +746,7 @@ function He(e) {
|
|
|
746
746
|
build: "typerighter build",
|
|
747
747
|
preview: "typerighter preview"
|
|
748
748
|
},
|
|
749
|
-
devDependencies: { typerighter: "^0.
|
|
749
|
+
devDependencies: { typerighter: "^0.44.0" }
|
|
750
750
|
}, void 0, 2) + "\n";
|
|
751
751
|
}
|
|
752
752
|
function Ue() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as e, c as t, i as n } from "./shared-
|
|
2
|
-
//#region src/node/lib/
|
|
1
|
+
import { K as e, c as t, i as n } from "./shared-kjMIXu1H.js";
|
|
2
|
+
//#region src/node/lib/html-template.ts
|
|
3
3
|
function r(e) {
|
|
4
4
|
let n = t(e.title), r = t(e.description), i = e.siteTitle !== void 0 && e.title !== e.siteTitle ? `${n} - ${t(e.siteTitle)}` : n, a = e.origin ?? "", o = e.canonicalUrl === void 0 ? void 0 : a + e.canonicalUrl, s = o === void 0 ? "" : `\n <link rel="canonical" href="${t(o)}">`, c = o === void 0 ? "" : `\n <meta property="og:url" content="${t(o)}">`, l = e.ogImagePath === void 0 ? `${a}${e.base}og-image.png` : `${a}${e.ogImagePath}`, u = e.author === void 0 ? "" : `\n <meta name="author" content="${t(e.author)}">`, d = e.siteTitle === void 0 ? "" : `\n <meta property="og:site_name" content="${t(e.siteTitle)}">`, f = a === "" ? "" : `\n <link rel="alternate" type="application/rss+xml" title="${e.siteTitle === void 0 ? "RSS Feed" : t(e.siteTitle)}" href="${a}${e.base}feed.xml">`, p = (e.jsonLdBlocks ?? []).map((e) => `\n <script type="application/ld+json">${e}<\/script>`).join(""), m = e.headExtra === void 0 ? "" : e.headExtra + "\n";
|
|
5
5
|
return `<!DOCTYPE html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACE,KAAK,YAAY,EACzB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACE,KAAK,YAAY,EACzB,MAAM,MAAM,CAAC;AAqBd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,YAAY,CAAC;AAMpB,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAGD,wBAAsB,SAAS,CAAE,GAAG,EAAE,UAAU,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwN3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-entry.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/codegen/app-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,
|
|
1
|
+
{"version":3,"file":"app-entry.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/codegen/app-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE;QACL,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC;AAGD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAGD,wBAAgB,gBAAgB,CAAE,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,GAAG,MAAM,CA8GzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,GACpB,MAAM,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/codegen/theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/codegen/theme.ts"],"names":[],"mappings":"AAQA,wBAAgB,mBAAmB,CACjC,MAAM,EAAE;IACN,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,GAAG,SAAS,EACb,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CA2CR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.test.d.ts","sourceRoot":"","sources":["../../../../src/node/lib/codegen/theme.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TdComponentEntry } from '@typerighter/rpc-client';
|
|
2
|
+
import type { JsonSchema } from '@/shared/types/json-schema';
|
|
3
|
+
export interface UserComponent {
|
|
4
|
+
name: string;
|
|
5
|
+
absolutePath: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function buildComponentContract(components: UserComponent[], projectRoot: string): Record<string, ComponentContractEntry>;
|
|
8
|
+
export declare function resolveUserComponents(entries: TdComponentEntry[], projectRoot: string): Promise<UserComponent[]>;
|
|
9
|
+
interface ComponentContractEntry {
|
|
10
|
+
source: string;
|
|
11
|
+
props?: Record<string, JsonSchema>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/node/lib/components.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EACV,UAAU,EACX,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB;AAGD,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,aAAa,EAAE,EAC3B,WAAW,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAsCxC;AAGD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,gBAAgB,EAAE,EAC3B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,aAAa,EAAE,CAAC,CAiC1B;AAED,UAAU,sBAAsB;IAC9B,MAAM,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-template.d.ts","sourceRoot":"","sources":["../../../src/node/lib/html-template.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,wBAAgB,kBAAkB,CAAE,OAAO,EAAE,mBAAmB,GAAG,MAAM,CA4ExE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/index.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/node/plugin/vite/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACU,KAAK,MAAM,EAC3B,MAAM,MAAM,CAAC;AAOd,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AA6CvB,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IAEpC,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,QAAQ,CAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,EAAE,CA+VvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-contract.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/subplugins/component-contract.ts"],"names":[],"mappings":"AAEA,OAAO,EACU,KAAK,MAAM,EAC3B,MAAM,MAAM,CAAC;AASd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,gBAAgB,CAAC;AAIxB,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,UAAU,GAAG,SAAS,GACvC,MAAM,CAuCR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AAYd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../../src/node/plugin/vite/virtual/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACd,MAAM,MAAM,CAAC;AAYd,OAAO,KAAK,EACV,UAAU,EACX,MAAM,gBAAgB,CAAC;AAQxB,qBAAa,UAAU;IACf,IAAI,CAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAgCjD,UAAU,CAAE,MAAM,EAAE,aAAa,GAAG,IAAI;CAGzC"}
|
package/dist/prerenderWorker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as e } from "./shared-
|
|
2
|
-
import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./jsonld-
|
|
1
|
+
import { P as e } from "./shared-kjMIXu1H.js";
|
|
2
|
+
import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./jsonld-DZsAYYxx.js";
|
|
3
3
|
import { pathToFileURL as c } from "node:url";
|
|
4
4
|
import { parentPort as l, workerData as u } from "node:worker_threads";
|
|
5
5
|
//#region src/node/build/prerenderWorker.ts
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t, n) => () => {
|
|
3
|
+
if (n) throw n[0];
|
|
4
|
+
try {
|
|
5
|
+
return e && (t = e(e = 0)), t;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw n = [e], e;
|
|
8
|
+
}
|
|
9
|
+
}, s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), c = (e, n) => {
|
|
10
|
+
let r = {};
|
|
11
|
+
for (var i in e) t(r, i, {
|
|
12
|
+
get: e[i],
|
|
13
|
+
enumerable: !0
|
|
14
|
+
});
|
|
15
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
16
|
+
}, l = (e, i, o, s) => {
|
|
17
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
18
|
+
get: ((e) => i[e]).bind(null, d),
|
|
19
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
20
|
+
});
|
|
21
|
+
return e;
|
|
22
|
+
}, u = (n, r, o) => (o = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
23
|
+
value: n,
|
|
24
|
+
enumerable: !0
|
|
25
|
+
}) : o, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e), f = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
26
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
27
|
+
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { d as a, f as i, o as n, u as o, c as r, s as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ArraySchema {
|
|
2
|
+
type: 'array';
|
|
3
|
+
items: JsonSchema;
|
|
4
|
+
}
|
|
5
|
+
export interface DictSchema {
|
|
6
|
+
type: 'object';
|
|
7
|
+
additionalProperties: JsonSchema;
|
|
8
|
+
}
|
|
9
|
+
export type JsonSchema = PrimitiveSchema | OptionalSchema | ArraySchema | DictSchema | ProductSchema;
|
|
10
|
+
export interface OptionalSchema {
|
|
11
|
+
type: [string, 'null' | 'undefined'] | [string, 'null', 'undefined'] | [string, 'undefined', 'null'];
|
|
12
|
+
}
|
|
13
|
+
export interface PrimitiveSchema {
|
|
14
|
+
type: 'string' | 'number' | 'boolean';
|
|
15
|
+
}
|
|
16
|
+
export interface ProductSchema {
|
|
17
|
+
type: 'object';
|
|
18
|
+
properties: Record<string, JsonSchema>;
|
|
19
|
+
required?: string[];
|
|
20
|
+
additionalProperties: false;
|
|
21
|
+
}
|
|
22
|
+
export declare function isOptional(schema: JsonSchema): boolean;
|
|
23
|
+
export declare function makeOptional(schema: JsonSchema): JsonSchema;
|
|
24
|
+
//# sourceMappingURL=json-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../../src/shared/types/json-schema.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;CACnB;AAGD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,oBAAoB,EAAE,UAAU,CAAC;CAClC;AAGD,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,cAAc,GACd,WAAW,GACX,UAAU,GACV,aAAa,CAAC;AAIlB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;CACtG;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;CACvC;AAGD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,oBAAoB,EAAE,KAAK,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAEvD;AAID,wBAAgB,YAAY,CAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAc5D"}
|