@pyreon/mcp 0.7.14 → 0.11.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/LICENSE +21 -0
- package/lib/analysis/index.js.html +1 -1
- package/lib/index.js +455 -77
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/api-reference.ts +541 -0
package/lib/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { ZodOptional, z } from "zod";
|
|
|
5
5
|
import process$1 from "node:process";
|
|
6
6
|
import { detectReactPatterns, diagnoseError, generateContext, migrateReactCode } from "@pyreon/compiler";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
8
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
9
9
|
var util;
|
|
10
10
|
(function(util) {
|
|
11
11
|
util.assertEqual = (_) => {};
|
|
@@ -102,7 +102,7 @@ const getParsedType = (data) => {
|
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
//#endregion
|
|
105
|
-
//#region
|
|
105
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
106
106
|
const ZodIssueCode = util.arrayToEnum([
|
|
107
107
|
"invalid_type",
|
|
108
108
|
"invalid_literal",
|
|
@@ -202,7 +202,7 @@ ZodError$1.create = (issues) => {
|
|
|
202
202
|
};
|
|
203
203
|
|
|
204
204
|
//#endregion
|
|
205
|
-
//#region
|
|
205
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
206
206
|
const errorMap = (issue, _ctx) => {
|
|
207
207
|
let message;
|
|
208
208
|
switch (issue.code) {
|
|
@@ -280,14 +280,14 @@ const errorMap = (issue, _ctx) => {
|
|
|
280
280
|
};
|
|
281
281
|
|
|
282
282
|
//#endregion
|
|
283
|
-
//#region
|
|
283
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
284
284
|
let overrideErrorMap = errorMap;
|
|
285
285
|
function getErrorMap() {
|
|
286
286
|
return overrideErrorMap;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
//#endregion
|
|
290
|
-
//#region
|
|
290
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
291
291
|
const makeIssue = (params) => {
|
|
292
292
|
const { data, path, errorMaps, issueData } = params;
|
|
293
293
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -392,7 +392,7 @@ const isValid = (x) => x.status === "valid";
|
|
|
392
392
|
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
393
393
|
|
|
394
394
|
//#endregion
|
|
395
|
-
//#region
|
|
395
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
396
396
|
var errorUtil;
|
|
397
397
|
(function(errorUtil) {
|
|
398
398
|
errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
@@ -400,7 +400,7 @@ var errorUtil;
|
|
|
400
400
|
})(errorUtil || (errorUtil = {}));
|
|
401
401
|
|
|
402
402
|
//#endregion
|
|
403
|
-
//#region
|
|
403
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
404
404
|
var ParseInputLazyPath = class {
|
|
405
405
|
constructor(parent, value, path, key) {
|
|
406
406
|
this._cachedPath = [];
|
|
@@ -3551,7 +3551,7 @@ const preprocessType = ZodEffects.createWithPreprocess;
|
|
|
3551
3551
|
const pipelineType = ZodPipeline.create;
|
|
3552
3552
|
|
|
3553
3553
|
//#endregion
|
|
3554
|
-
//#region
|
|
3554
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/core.js
|
|
3555
3555
|
/** A special constant with type `never` */
|
|
3556
3556
|
const NEVER = Object.freeze({ status: "aborted" });
|
|
3557
3557
|
function $constructor(name, initializer, params) {
|
|
@@ -3599,7 +3599,7 @@ function config(newConfig) {
|
|
|
3599
3599
|
}
|
|
3600
3600
|
|
|
3601
3601
|
//#endregion
|
|
3602
|
-
//#region
|
|
3602
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/util.js
|
|
3603
3603
|
function getEnumValues(entries) {
|
|
3604
3604
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
3605
3605
|
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -3864,7 +3864,7 @@ function issue(...args) {
|
|
|
3864
3864
|
}
|
|
3865
3865
|
|
|
3866
3866
|
//#endregion
|
|
3867
|
-
//#region
|
|
3867
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/errors.js
|
|
3868
3868
|
const initializer$1 = (inst, def) => {
|
|
3869
3869
|
inst.name = "$ZodError";
|
|
3870
3870
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -3930,7 +3930,7 @@ function formatError(error, _mapper) {
|
|
|
3930
3930
|
}
|
|
3931
3931
|
|
|
3932
3932
|
//#endregion
|
|
3933
|
-
//#region
|
|
3933
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/parse.js
|
|
3934
3934
|
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
3935
3935
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
3936
3936
|
const result = schema._zod.run({
|
|
@@ -3998,7 +3998,7 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
3998
3998
|
const safeParseAsync$2 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
3999
3999
|
|
|
4000
4000
|
//#endregion
|
|
4001
|
-
//#region
|
|
4001
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/regexes.js
|
|
4002
4002
|
const cuid = /^[cC][^\s-]{8,}$/;
|
|
4003
4003
|
const cuid2 = /^[0-9a-z]+$/;
|
|
4004
4004
|
const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
@@ -4059,7 +4059,7 @@ const lowercase = /^[^A-Z]*$/;
|
|
|
4059
4059
|
const uppercase = /^[^a-z]*$/;
|
|
4060
4060
|
|
|
4061
4061
|
//#endregion
|
|
4062
|
-
//#region
|
|
4062
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/checks.js
|
|
4063
4063
|
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
4064
4064
|
var _a;
|
|
4065
4065
|
inst._zod ?? (inst._zod = {});
|
|
@@ -4413,7 +4413,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
|
|
|
4413
4413
|
});
|
|
4414
4414
|
|
|
4415
4415
|
//#endregion
|
|
4416
|
-
//#region
|
|
4416
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/doc.js
|
|
4417
4417
|
var Doc = class {
|
|
4418
4418
|
constructor(args = []) {
|
|
4419
4419
|
this.content = [];
|
|
@@ -4445,7 +4445,7 @@ var Doc = class {
|
|
|
4445
4445
|
};
|
|
4446
4446
|
|
|
4447
4447
|
//#endregion
|
|
4448
|
-
//#region
|
|
4448
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/versions.js
|
|
4449
4449
|
const version$1 = {
|
|
4450
4450
|
major: 4,
|
|
4451
4451
|
minor: 0,
|
|
@@ -4453,7 +4453,7 @@ const version$1 = {
|
|
|
4453
4453
|
};
|
|
4454
4454
|
|
|
4455
4455
|
//#endregion
|
|
4456
|
-
//#region
|
|
4456
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/schemas.js
|
|
4457
4457
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
4458
4458
|
var _a;
|
|
4459
4459
|
inst ?? (inst = {});
|
|
@@ -5541,7 +5541,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
5541
5541
|
}
|
|
5542
5542
|
|
|
5543
5543
|
//#endregion
|
|
5544
|
-
//#region
|
|
5544
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/registries.js
|
|
5545
5545
|
var $ZodRegistry = class {
|
|
5546
5546
|
constructor() {
|
|
5547
5547
|
this._map = /* @__PURE__ */ new Map();
|
|
@@ -5589,7 +5589,7 @@ function registry() {
|
|
|
5589
5589
|
const globalRegistry = /* @__PURE__ */ registry();
|
|
5590
5590
|
|
|
5591
5591
|
//#endregion
|
|
5592
|
-
//#region
|
|
5592
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/api.js
|
|
5593
5593
|
function _string(Class, params) {
|
|
5594
5594
|
return new Class({
|
|
5595
5595
|
type: "string",
|
|
@@ -6021,7 +6021,7 @@ function _refine(Class, fn, _params) {
|
|
|
6021
6021
|
}
|
|
6022
6022
|
|
|
6023
6023
|
//#endregion
|
|
6024
|
-
//#region
|
|
6024
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js
|
|
6025
6025
|
var JSONSchemaGenerator = class {
|
|
6026
6026
|
constructor(params) {
|
|
6027
6027
|
this.counter = 0;
|
|
@@ -6615,7 +6615,7 @@ function isTransforming(_schema, _ctx) {
|
|
|
6615
6615
|
}
|
|
6616
6616
|
|
|
6617
6617
|
//#endregion
|
|
6618
|
-
//#region
|
|
6618
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/mini/schemas.js
|
|
6619
6619
|
const ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
6620
6620
|
if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType.");
|
|
6621
6621
|
$ZodType.init(inst, def);
|
|
@@ -6658,7 +6658,7 @@ function object$1(shape, params) {
|
|
|
6658
6658
|
}
|
|
6659
6659
|
|
|
6660
6660
|
//#endregion
|
|
6661
|
-
//#region
|
|
6661
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
6662
6662
|
function isZ4Schema(s) {
|
|
6663
6663
|
return !!s._zod;
|
|
6664
6664
|
}
|
|
@@ -6774,7 +6774,7 @@ function getLiteralValue(schema) {
|
|
|
6774
6774
|
}
|
|
6775
6775
|
|
|
6776
6776
|
//#endregion
|
|
6777
|
-
//#region
|
|
6777
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/iso.js
|
|
6778
6778
|
const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
|
|
6779
6779
|
$ZodISODateTime.init(inst, def);
|
|
6780
6780
|
ZodStringFormat.init(inst, def);
|
|
@@ -6805,7 +6805,7 @@ function duration(params) {
|
|
|
6805
6805
|
}
|
|
6806
6806
|
|
|
6807
6807
|
//#endregion
|
|
6808
|
-
//#region
|
|
6808
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/errors.js
|
|
6809
6809
|
const initializer = (inst, issues) => {
|
|
6810
6810
|
$ZodError.init(inst, issues);
|
|
6811
6811
|
inst.name = "ZodError";
|
|
@@ -6823,14 +6823,14 @@ const ZodError = $constructor("ZodError", initializer);
|
|
|
6823
6823
|
const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
|
|
6824
6824
|
|
|
6825
6825
|
//#endregion
|
|
6826
|
-
//#region
|
|
6826
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/parse.js
|
|
6827
6827
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
6828
6828
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
6829
6829
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
6830
6830
|
const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
6831
6831
|
|
|
6832
6832
|
//#endregion
|
|
6833
|
-
//#region
|
|
6833
|
+
//#region ../../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/schemas.js
|
|
6834
6834
|
const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
6835
6835
|
$ZodType.init(inst, def);
|
|
6836
6836
|
inst.def = def;
|
|
@@ -7430,7 +7430,7 @@ function preprocess(fn, schema) {
|
|
|
7430
7430
|
}
|
|
7431
7431
|
|
|
7432
7432
|
//#endregion
|
|
7433
|
-
//#region
|
|
7433
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
7434
7434
|
const LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
7435
7435
|
const SUPPORTED_PROTOCOL_VERSIONS = [
|
|
7436
7436
|
LATEST_PROTOCOL_VERSION,
|
|
@@ -8687,7 +8687,7 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
8687
8687
|
};
|
|
8688
8688
|
|
|
8689
8689
|
//#endregion
|
|
8690
|
-
//#region
|
|
8690
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
8691
8691
|
/**
|
|
8692
8692
|
* Experimental task interfaces for MCP SDK.
|
|
8693
8693
|
* WARNING: These APIs are experimental and may change without notice.
|
|
@@ -8705,7 +8705,7 @@ function isTerminal(status) {
|
|
|
8705
8705
|
}
|
|
8706
8706
|
|
|
8707
8707
|
//#endregion
|
|
8708
|
-
//#region
|
|
8708
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
8709
8709
|
const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
8710
8710
|
const defaultOptions = {
|
|
8711
8711
|
name: void 0,
|
|
@@ -8740,7 +8740,7 @@ const getDefaultOptions = (options) => typeof options === "string" ? {
|
|
|
8740
8740
|
};
|
|
8741
8741
|
|
|
8742
8742
|
//#endregion
|
|
8743
|
-
//#region
|
|
8743
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/Refs.js
|
|
8744
8744
|
const getRefs = (options) => {
|
|
8745
8745
|
const _options = getDefaultOptions(options);
|
|
8746
8746
|
const currentPath = _options.name !== void 0 ? [
|
|
@@ -8766,7 +8766,7 @@ const getRefs = (options) => {
|
|
|
8766
8766
|
};
|
|
8767
8767
|
|
|
8768
8768
|
//#endregion
|
|
8769
|
-
//#region
|
|
8769
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
8770
8770
|
function addErrorMessage(res, key, errorMessage, refs) {
|
|
8771
8771
|
if (!refs?.errorMessages) return;
|
|
8772
8772
|
if (errorMessage) res.errorMessage = {
|
|
@@ -8780,7 +8780,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
8780
8780
|
}
|
|
8781
8781
|
|
|
8782
8782
|
//#endregion
|
|
8783
|
-
//#region
|
|
8783
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
8784
8784
|
const getRelativePath = (pathA, pathB) => {
|
|
8785
8785
|
let i = 0;
|
|
8786
8786
|
for (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;
|
|
@@ -8788,7 +8788,7 @@ const getRelativePath = (pathA, pathB) => {
|
|
|
8788
8788
|
};
|
|
8789
8789
|
|
|
8790
8790
|
//#endregion
|
|
8791
|
-
//#region
|
|
8791
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
8792
8792
|
function parseAnyDef(refs) {
|
|
8793
8793
|
if (refs.target !== "openAi") return {};
|
|
8794
8794
|
const anyDefinitionPath = [
|
|
@@ -8801,7 +8801,7 @@ function parseAnyDef(refs) {
|
|
|
8801
8801
|
}
|
|
8802
8802
|
|
|
8803
8803
|
//#endregion
|
|
8804
|
-
//#region
|
|
8804
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
8805
8805
|
function parseArrayDef(def, refs) {
|
|
8806
8806
|
const res = { type: "array" };
|
|
8807
8807
|
if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
|
|
@@ -8818,7 +8818,7 @@ function parseArrayDef(def, refs) {
|
|
|
8818
8818
|
}
|
|
8819
8819
|
|
|
8820
8820
|
//#endregion
|
|
8821
|
-
//#region
|
|
8821
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
8822
8822
|
function parseBigintDef(def, refs) {
|
|
8823
8823
|
const res = {
|
|
8824
8824
|
type: "integer",
|
|
@@ -8850,25 +8850,25 @@ function parseBigintDef(def, refs) {
|
|
|
8850
8850
|
}
|
|
8851
8851
|
|
|
8852
8852
|
//#endregion
|
|
8853
|
-
//#region
|
|
8853
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
8854
8854
|
function parseBooleanDef() {
|
|
8855
8855
|
return { type: "boolean" };
|
|
8856
8856
|
}
|
|
8857
8857
|
|
|
8858
8858
|
//#endregion
|
|
8859
|
-
//#region
|
|
8859
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
8860
8860
|
function parseBrandedDef(_def, refs) {
|
|
8861
8861
|
return parseDef(_def.type._def, refs);
|
|
8862
8862
|
}
|
|
8863
8863
|
|
|
8864
8864
|
//#endregion
|
|
8865
|
-
//#region
|
|
8865
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
8866
8866
|
const parseCatchDef = (def, refs) => {
|
|
8867
8867
|
return parseDef(def.innerType._def, refs);
|
|
8868
8868
|
};
|
|
8869
8869
|
|
|
8870
8870
|
//#endregion
|
|
8871
|
-
//#region
|
|
8871
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
8872
8872
|
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
8873
8873
|
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
8874
8874
|
if (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };
|
|
@@ -8903,7 +8903,7 @@ const integerDateParser = (def, refs) => {
|
|
|
8903
8903
|
};
|
|
8904
8904
|
|
|
8905
8905
|
//#endregion
|
|
8906
|
-
//#region
|
|
8906
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
8907
8907
|
function parseDefaultDef(_def, refs) {
|
|
8908
8908
|
return {
|
|
8909
8909
|
...parseDef(_def.innerType._def, refs),
|
|
@@ -8912,13 +8912,13 @@ function parseDefaultDef(_def, refs) {
|
|
|
8912
8912
|
}
|
|
8913
8913
|
|
|
8914
8914
|
//#endregion
|
|
8915
|
-
//#region
|
|
8915
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
8916
8916
|
function parseEffectsDef(_def, refs) {
|
|
8917
8917
|
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
|
|
8918
8918
|
}
|
|
8919
8919
|
|
|
8920
8920
|
//#endregion
|
|
8921
|
-
//#region
|
|
8921
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
8922
8922
|
function parseEnumDef(def) {
|
|
8923
8923
|
return {
|
|
8924
8924
|
type: "string",
|
|
@@ -8927,7 +8927,7 @@ function parseEnumDef(def) {
|
|
|
8927
8927
|
}
|
|
8928
8928
|
|
|
8929
8929
|
//#endregion
|
|
8930
|
-
//#region
|
|
8930
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
8931
8931
|
const isJsonSchema7AllOfType = (type) => {
|
|
8932
8932
|
if ("type" in type && type.type === "string") return false;
|
|
8933
8933
|
return "allOf" in type;
|
|
@@ -8970,7 +8970,7 @@ function parseIntersectionDef(def, refs) {
|
|
|
8970
8970
|
}
|
|
8971
8971
|
|
|
8972
8972
|
//#endregion
|
|
8973
|
-
//#region
|
|
8973
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
8974
8974
|
function parseLiteralDef(def, refs) {
|
|
8975
8975
|
const parsedType = typeof def.value;
|
|
8976
8976
|
if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") return { type: Array.isArray(def.value) ? "array" : "object" };
|
|
@@ -8985,7 +8985,7 @@ function parseLiteralDef(def, refs) {
|
|
|
8985
8985
|
}
|
|
8986
8986
|
|
|
8987
8987
|
//#endregion
|
|
8988
|
-
//#region
|
|
8988
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
8989
8989
|
let emojiRegex = void 0;
|
|
8990
8990
|
/**
|
|
8991
8991
|
* Generated from the regular expressions found here as of 2024-05-22:
|
|
@@ -9231,7 +9231,7 @@ function stringifyRegExpWithFlags(regex, refs) {
|
|
|
9231
9231
|
}
|
|
9232
9232
|
|
|
9233
9233
|
//#endregion
|
|
9234
|
-
//#region
|
|
9234
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
9235
9235
|
function parseRecordDef(def, refs) {
|
|
9236
9236
|
if (refs.target === "openAi") console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
9237
9237
|
if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {
|
|
@@ -9279,7 +9279,7 @@ function parseRecordDef(def, refs) {
|
|
|
9279
9279
|
}
|
|
9280
9280
|
|
|
9281
9281
|
//#endregion
|
|
9282
|
-
//#region
|
|
9282
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
9283
9283
|
function parseMapDef(def, refs) {
|
|
9284
9284
|
if (refs.mapStrategy === "record") return parseRecordDef(def, refs);
|
|
9285
9285
|
return {
|
|
@@ -9311,7 +9311,7 @@ function parseMapDef(def, refs) {
|
|
|
9311
9311
|
}
|
|
9312
9312
|
|
|
9313
9313
|
//#endregion
|
|
9314
|
-
//#region
|
|
9314
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
9315
9315
|
function parseNativeEnumDef(def) {
|
|
9316
9316
|
const object = def.values;
|
|
9317
9317
|
const actualValues = Object.keys(def.values).filter((key) => {
|
|
@@ -9325,7 +9325,7 @@ function parseNativeEnumDef(def) {
|
|
|
9325
9325
|
}
|
|
9326
9326
|
|
|
9327
9327
|
//#endregion
|
|
9328
|
-
//#region
|
|
9328
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
9329
9329
|
function parseNeverDef(refs) {
|
|
9330
9330
|
return refs.target === "openAi" ? void 0 : { not: parseAnyDef({
|
|
9331
9331
|
...refs,
|
|
@@ -9334,7 +9334,7 @@ function parseNeverDef(refs) {
|
|
|
9334
9334
|
}
|
|
9335
9335
|
|
|
9336
9336
|
//#endregion
|
|
9337
|
-
//#region
|
|
9337
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
9338
9338
|
function parseNullDef(refs) {
|
|
9339
9339
|
return refs.target === "openApi3" ? {
|
|
9340
9340
|
enum: ["null"],
|
|
@@ -9343,7 +9343,7 @@ function parseNullDef(refs) {
|
|
|
9343
9343
|
}
|
|
9344
9344
|
|
|
9345
9345
|
//#endregion
|
|
9346
|
-
//#region
|
|
9346
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
9347
9347
|
const primitiveMappings = {
|
|
9348
9348
|
ZodString: "string",
|
|
9349
9349
|
ZodNumber: "number",
|
|
@@ -9400,7 +9400,7 @@ const asAnyOf = (def, refs) => {
|
|
|
9400
9400
|
};
|
|
9401
9401
|
|
|
9402
9402
|
//#endregion
|
|
9403
|
-
//#region
|
|
9403
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
9404
9404
|
function parseNullableDef(def, refs) {
|
|
9405
9405
|
if ([
|
|
9406
9406
|
"ZodString",
|
|
@@ -9441,7 +9441,7 @@ function parseNullableDef(def, refs) {
|
|
|
9441
9441
|
}
|
|
9442
9442
|
|
|
9443
9443
|
//#endregion
|
|
9444
|
-
//#region
|
|
9444
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
9445
9445
|
function parseNumberDef(def, refs) {
|
|
9446
9446
|
const res = { type: "number" };
|
|
9447
9447
|
if (!def.checks) return res;
|
|
@@ -9474,7 +9474,7 @@ function parseNumberDef(def, refs) {
|
|
|
9474
9474
|
}
|
|
9475
9475
|
|
|
9476
9476
|
//#endregion
|
|
9477
|
-
//#region
|
|
9477
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
9478
9478
|
function parseObjectDef(def, refs) {
|
|
9479
9479
|
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
9480
9480
|
const result = {
|
|
@@ -9534,7 +9534,7 @@ function safeIsOptional(schema) {
|
|
|
9534
9534
|
}
|
|
9535
9535
|
|
|
9536
9536
|
//#endregion
|
|
9537
|
-
//#region
|
|
9537
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
9538
9538
|
const parseOptionalDef = (def, refs) => {
|
|
9539
9539
|
if (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);
|
|
9540
9540
|
const innerSchema = parseDef(def.innerType._def, {
|
|
@@ -9549,7 +9549,7 @@ const parseOptionalDef = (def, refs) => {
|
|
|
9549
9549
|
};
|
|
9550
9550
|
|
|
9551
9551
|
//#endregion
|
|
9552
|
-
//#region
|
|
9552
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
|
|
9553
9553
|
const parsePipelineDef = (def, refs) => {
|
|
9554
9554
|
if (refs.pipeStrategy === "input") return parseDef(def.in._def, refs);
|
|
9555
9555
|
else if (refs.pipeStrategy === "output") return parseDef(def.out._def, refs);
|
|
@@ -9572,13 +9572,13 @@ const parsePipelineDef = (def, refs) => {
|
|
|
9572
9572
|
};
|
|
9573
9573
|
|
|
9574
9574
|
//#endregion
|
|
9575
|
-
//#region
|
|
9575
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
9576
9576
|
function parsePromiseDef(def, refs) {
|
|
9577
9577
|
return parseDef(def.type._def, refs);
|
|
9578
9578
|
}
|
|
9579
9579
|
|
|
9580
9580
|
//#endregion
|
|
9581
|
-
//#region
|
|
9581
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
9582
9582
|
function parseSetDef(def, refs) {
|
|
9583
9583
|
const schema = {
|
|
9584
9584
|
type: "array",
|
|
@@ -9594,7 +9594,7 @@ function parseSetDef(def, refs) {
|
|
|
9594
9594
|
}
|
|
9595
9595
|
|
|
9596
9596
|
//#endregion
|
|
9597
|
-
//#region
|
|
9597
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
9598
9598
|
function parseTupleDef(def, refs) {
|
|
9599
9599
|
if (def.rest) return {
|
|
9600
9600
|
type: "array",
|
|
@@ -9628,25 +9628,25 @@ function parseTupleDef(def, refs) {
|
|
|
9628
9628
|
}
|
|
9629
9629
|
|
|
9630
9630
|
//#endregion
|
|
9631
|
-
//#region
|
|
9631
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
9632
9632
|
function parseUndefinedDef(refs) {
|
|
9633
9633
|
return { not: parseAnyDef(refs) };
|
|
9634
9634
|
}
|
|
9635
9635
|
|
|
9636
9636
|
//#endregion
|
|
9637
|
-
//#region
|
|
9637
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
9638
9638
|
function parseUnknownDef(refs) {
|
|
9639
9639
|
return parseAnyDef(refs);
|
|
9640
9640
|
}
|
|
9641
9641
|
|
|
9642
9642
|
//#endregion
|
|
9643
|
-
//#region
|
|
9643
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
9644
9644
|
const parseReadonlyDef = (def, refs) => {
|
|
9645
9645
|
return parseDef(def.innerType._def, refs);
|
|
9646
9646
|
};
|
|
9647
9647
|
|
|
9648
9648
|
//#endregion
|
|
9649
|
-
//#region
|
|
9649
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
9650
9650
|
const selectParser = (def, typeName, refs) => {
|
|
9651
9651
|
switch (typeName) {
|
|
9652
9652
|
case ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
|
|
@@ -9690,7 +9690,7 @@ const selectParser = (def, typeName, refs) => {
|
|
|
9690
9690
|
};
|
|
9691
9691
|
|
|
9692
9692
|
//#endregion
|
|
9693
|
-
//#region
|
|
9693
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
9694
9694
|
function parseDef(def, refs, forceResolution = false) {
|
|
9695
9695
|
const seenItem = refs.seen.get(def);
|
|
9696
9696
|
if (refs.override) {
|
|
@@ -9740,7 +9740,7 @@ const addMeta = (def, refs, jsonSchema) => {
|
|
|
9740
9740
|
};
|
|
9741
9741
|
|
|
9742
9742
|
//#endregion
|
|
9743
|
-
//#region
|
|
9743
|
+
//#region ../../../node_modules/.bun/zod-to-json-schema@3.25.1+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
9744
9744
|
const zodToJsonSchema = (schema, options) => {
|
|
9745
9745
|
const refs = getRefs(options);
|
|
9746
9746
|
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({
|
|
@@ -9804,7 +9804,7 @@ const zodToJsonSchema = (schema, options) => {
|
|
|
9804
9804
|
};
|
|
9805
9805
|
|
|
9806
9806
|
//#endregion
|
|
9807
|
-
//#region
|
|
9807
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
9808
9808
|
function mapMiniTarget(t) {
|
|
9809
9809
|
if (!t) return "draft-7";
|
|
9810
9810
|
if (t === "jsonSchema7" || t === "draft-7") return "draft-7";
|
|
@@ -9835,7 +9835,7 @@ function parseWithCompat(schema, data) {
|
|
|
9835
9835
|
}
|
|
9836
9836
|
|
|
9837
9837
|
//#endregion
|
|
9838
|
-
//#region
|
|
9838
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
9839
9839
|
/**
|
|
9840
9840
|
* The default request timeout, in miliseconds.
|
|
9841
9841
|
*/
|
|
@@ -10686,7 +10686,7 @@ function mergeCapabilities(base, additional) {
|
|
|
10686
10686
|
}
|
|
10687
10687
|
|
|
10688
10688
|
//#endregion
|
|
10689
|
-
//#region
|
|
10689
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
10690
10690
|
/**
|
|
10691
10691
|
* AJV-based JSON Schema validator provider
|
|
10692
10692
|
*/
|
|
@@ -10764,7 +10764,7 @@ var AjvJsonSchemaValidator = class {
|
|
|
10764
10764
|
};
|
|
10765
10765
|
|
|
10766
10766
|
//#endregion
|
|
10767
|
-
//#region
|
|
10767
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
10768
10768
|
/**
|
|
10769
10769
|
* Experimental server task features for MCP SDK.
|
|
10770
10770
|
* WARNING: These APIs are experimental and may change without notice.
|
|
@@ -10985,7 +10985,7 @@ var ExperimentalServerTasks = class {
|
|
|
10985
10985
|
};
|
|
10986
10986
|
|
|
10987
10987
|
//#endregion
|
|
10988
|
-
//#region
|
|
10988
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
10989
10989
|
/**
|
|
10990
10990
|
* Experimental task capability assertion helpers.
|
|
10991
10991
|
* WARNING: These APIs are experimental and may change without notice.
|
|
@@ -11037,7 +11037,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
11037
11037
|
}
|
|
11038
11038
|
|
|
11039
11039
|
//#endregion
|
|
11040
|
-
//#region
|
|
11040
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
11041
11041
|
/**
|
|
11042
11042
|
* An MCP server on top of a pluggable transport.
|
|
11043
11043
|
*
|
|
@@ -11379,7 +11379,7 @@ var Server = class extends Protocol {
|
|
|
11379
11379
|
};
|
|
11380
11380
|
|
|
11381
11381
|
//#endregion
|
|
11382
|
-
//#region
|
|
11382
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
11383
11383
|
const COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
|
|
11384
11384
|
/**
|
|
11385
11385
|
* Checks if a schema is completable (has completion metadata).
|
|
@@ -11399,7 +11399,7 @@ var McpZodTypeKind;
|
|
|
11399
11399
|
})(McpZodTypeKind || (McpZodTypeKind = {}));
|
|
11400
11400
|
|
|
11401
11401
|
//#endregion
|
|
11402
|
-
//#region
|
|
11402
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
11403
11403
|
/**
|
|
11404
11404
|
* Tool name validation utilities according to SEP: Specify Format for Tool Names
|
|
11405
11405
|
*
|
|
@@ -11471,7 +11471,7 @@ function validateAndWarnToolName(name) {
|
|
|
11471
11471
|
}
|
|
11472
11472
|
|
|
11473
11473
|
//#endregion
|
|
11474
|
-
//#region
|
|
11474
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
|
|
11475
11475
|
/**
|
|
11476
11476
|
* Experimental McpServer task features for MCP SDK.
|
|
11477
11477
|
* WARNING: These APIs are experimental and may change without notice.
|
|
@@ -11503,7 +11503,7 @@ var ExperimentalMcpServerTasks = class {
|
|
|
11503
11503
|
};
|
|
11504
11504
|
|
|
11505
11505
|
//#endregion
|
|
11506
|
-
//#region
|
|
11506
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
11507
11507
|
/**
|
|
11508
11508
|
* High-level MCP server that provides a simpler API for working with resources, tools, and prompts.
|
|
11509
11509
|
* For advanced usage (like sending notifications or setting custom request handlers), use the underlying
|
|
@@ -12126,7 +12126,7 @@ const EMPTY_COMPLETION_RESULT = { completion: {
|
|
|
12126
12126
|
} };
|
|
12127
12127
|
|
|
12128
12128
|
//#endregion
|
|
12129
|
-
//#region
|
|
12129
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
12130
12130
|
/**
|
|
12131
12131
|
* Buffers a continuous stdio stream into discrete JSON-RPC messages.
|
|
12132
12132
|
*/
|
|
@@ -12154,7 +12154,7 @@ function serializeMessage(message) {
|
|
|
12154
12154
|
}
|
|
12155
12155
|
|
|
12156
12156
|
//#endregion
|
|
12157
|
-
//#region
|
|
12157
|
+
//#region ../../../node_modules/.bun/@modelcontextprotocol+sdk@1.27.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
12158
12158
|
/**
|
|
12159
12159
|
* Server transport for stdio: this communicates with an MCP client by reading from the current process' stdin and writing to stdout.
|
|
12160
12160
|
*
|
|
@@ -12210,7 +12210,7 @@ var StdioServerTransport = class {
|
|
|
12210
12210
|
|
|
12211
12211
|
//#endregion
|
|
12212
12212
|
//#region package.json
|
|
12213
|
-
var version = "0.
|
|
12213
|
+
var version = "0.11.0";
|
|
12214
12214
|
|
|
12215
12215
|
//#endregion
|
|
12216
12216
|
//#region src/api-reference.ts
|
|
@@ -12684,6 +12684,384 @@ hydrateRoot(<App />, document.getElementById("app")!)`
|
|
|
12684
12684
|
.fade-enter-active, .fade-leave-active { transition: opacity 0.3s }
|
|
12685
12685
|
.fade-enter-from, .fade-leave-to { opacity: 0 }
|
|
12686
12686
|
*/`
|
|
12687
|
+
},
|
|
12688
|
+
"store/defineStore": {
|
|
12689
|
+
signature: "defineStore<T>(id: string, setup: () => T): () => StoreApi<T>",
|
|
12690
|
+
example: `const useCounter = defineStore('counter', () => {
|
|
12691
|
+
const count = signal(0)
|
|
12692
|
+
const increment = () => count.update(n => n + 1)
|
|
12693
|
+
return { count, increment }
|
|
12694
|
+
})
|
|
12695
|
+
|
|
12696
|
+
const { store } = useCounter()
|
|
12697
|
+
store.count() // 0
|
|
12698
|
+
store.increment() // reactive update`,
|
|
12699
|
+
notes: "Composition-style stores. Singleton by ID. Returns StoreApi with .store, .patch(), .subscribe(), .onAction(), .reset(), .dispose()."
|
|
12700
|
+
},
|
|
12701
|
+
"form/useForm": {
|
|
12702
|
+
signature: "useForm<T>(options: { initialValues: T, onSubmit: (values: T) => void | Promise<void>, schema?, validateOn?, debounceMs? }): FormInstance<T>",
|
|
12703
|
+
example: `const form = useForm({
|
|
12704
|
+
initialValues: { name: '', email: '' },
|
|
12705
|
+
onSubmit: async (values) => await api.save(values),
|
|
12706
|
+
validateOn: 'blur',
|
|
12707
|
+
})
|
|
12708
|
+
|
|
12709
|
+
form.handleSubmit() // triggers validation + onSubmit
|
|
12710
|
+
form.reset() // reset to initial values`,
|
|
12711
|
+
notes: "Signal-based form state. Use useField() for individual field binding, useFieldArray() for dynamic arrays."
|
|
12712
|
+
},
|
|
12713
|
+
"form/useField": {
|
|
12714
|
+
signature: "useField<T>(form: FormInstance<T>, name: keyof T): FieldInstance",
|
|
12715
|
+
example: `const name = useField(form, 'name')
|
|
12716
|
+
|
|
12717
|
+
<input {...name.register()} />
|
|
12718
|
+
// name.value(), name.error(), name.hasError(), name.showError()`
|
|
12719
|
+
},
|
|
12720
|
+
"query/useQuery": {
|
|
12721
|
+
signature: "useQuery<T>(options: { queryKey: unknown[], queryFn: () => Promise<T>, ... }): { data: Signal<T>, error: Signal<Error>, isFetching: Signal<boolean>, ... }",
|
|
12722
|
+
example: `const { data, error, isFetching } = useQuery({
|
|
12723
|
+
queryKey: ['users'],
|
|
12724
|
+
queryFn: () => fetch('/api/users').then(r => r.json()),
|
|
12725
|
+
})`,
|
|
12726
|
+
notes: "TanStack Query adapter. Fine-grained signals per field. Reactive options via function getter. Also: useMutation, useInfiniteQuery, useSuspenseQuery, useSubscription (WebSocket)."
|
|
12727
|
+
},
|
|
12728
|
+
"permissions/createPermissions": {
|
|
12729
|
+
signature: "createPermissions<T extends PermissionMap>(initial?: T): PermissionsInstance",
|
|
12730
|
+
example: `const can = createPermissions({
|
|
12731
|
+
'posts.read': true,
|
|
12732
|
+
'posts.delete': (post) => post.authorId === userId,
|
|
12733
|
+
'admin.*': false,
|
|
12734
|
+
})
|
|
12735
|
+
|
|
12736
|
+
can('posts.read') // true (reactive)
|
|
12737
|
+
can('posts.delete', post) // evaluates predicate
|
|
12738
|
+
can.not('admin.dashboard')
|
|
12739
|
+
can.all('posts.read', 'posts.create')
|
|
12740
|
+
can.any('admin.users', 'posts.read')`,
|
|
12741
|
+
notes: "Reactive permissions. Supports RBAC, ABAC, feature flags, subscription tiers. Wildcard matching with '*'. PermissionsProvider/usePermissions for context."
|
|
12742
|
+
},
|
|
12743
|
+
"machine/createMachine": {
|
|
12744
|
+
signature: "createMachine<S, E>(config: MachineConfig<S, E>): Machine<S, E>",
|
|
12745
|
+
example: `const traffic = createMachine({
|
|
12746
|
+
initial: 'red',
|
|
12747
|
+
states: {
|
|
12748
|
+
red: { on: { NEXT: 'green' } },
|
|
12749
|
+
green: { on: { NEXT: 'yellow' } },
|
|
12750
|
+
yellow: { on: { NEXT: 'red' } },
|
|
12751
|
+
},
|
|
12752
|
+
})
|
|
12753
|
+
|
|
12754
|
+
traffic() // 'red' (reactive)
|
|
12755
|
+
traffic.send('NEXT') // 'green'
|
|
12756
|
+
traffic.matches('green') // true
|
|
12757
|
+
traffic.can('NEXT') // true`,
|
|
12758
|
+
notes: "Constrained signal with type-safe transitions. Guards: { target, guard: (payload?) => boolean }. No context — use signals alongside."
|
|
12759
|
+
},
|
|
12760
|
+
"storage/useStorage": {
|
|
12761
|
+
signature: "useStorage<T>(key: string, defaultValue: T, options?: StorageOptions<T>): StorageSignal<T>",
|
|
12762
|
+
example: `const theme = useStorage('theme', 'light')
|
|
12763
|
+
theme() // 'light'
|
|
12764
|
+
theme.set('dark') // persists + cross-tab sync
|
|
12765
|
+
theme.remove() // delete from storage`,
|
|
12766
|
+
notes: "localStorage by default. Also: useSessionStorage, useCookie, useIndexedDB, useMemoryStorage, createStorage(backend). All return StorageSignal<T> extending Signal<T> with .remove()."
|
|
12767
|
+
},
|
|
12768
|
+
"i18n/createI18n": {
|
|
12769
|
+
signature: "createI18n(options: { locale: string, messages: Record<string, Record<string, string>>, loader?, fallbackLocale?, pluralRules? }): I18nInstance",
|
|
12770
|
+
example: `const i18n = createI18n({
|
|
12771
|
+
locale: 'en',
|
|
12772
|
+
messages: { en: { greeting: 'Hello, {{name}}!' } },
|
|
12773
|
+
loader: (locale, ns) => import(\`./locales/\${locale}/\${ns}.json\`),
|
|
12774
|
+
})
|
|
12775
|
+
|
|
12776
|
+
const { t, locale } = useI18n()
|
|
12777
|
+
t('greeting', { name: 'World' }) // "Hello, World!"
|
|
12778
|
+
locale.set('fr') // switch reactively`,
|
|
12779
|
+
notes: "Interpolation with {{name}}, pluralization with _one/_other suffixes. Namespace lazy loading. <Trans> component for rich JSX interpolation."
|
|
12780
|
+
},
|
|
12781
|
+
"document/createDocument": {
|
|
12782
|
+
signature: "createDocument(props?: DocumentProps): DocumentBuilder",
|
|
12783
|
+
example: `const doc = createDocument({ title: 'Report' })
|
|
12784
|
+
.heading('Sales Report')
|
|
12785
|
+
.table({ columns: ['Region', 'Revenue'], rows: [['US', '$1M']] })
|
|
12786
|
+
|
|
12787
|
+
await doc.toPdf() // PDF
|
|
12788
|
+
await doc.toEmail() // Outlook-safe HTML
|
|
12789
|
+
await doc.toDocx() // Word document
|
|
12790
|
+
await doc.toSlack() // Slack Block Kit JSON
|
|
12791
|
+
await doc.toNotion() // Notion blocks`,
|
|
12792
|
+
notes: "14+ output formats. JSX primitives: Document, Page, Heading, Text, Table, Image, List, Code, etc. Heavy renderers lazy-loaded."
|
|
12793
|
+
},
|
|
12794
|
+
"flow/createFlow": {
|
|
12795
|
+
signature: "createFlow(config: { nodes: FlowNode[], edges: FlowEdge[], ... }): FlowInstance",
|
|
12796
|
+
example: `const flow = createFlow({
|
|
12797
|
+
nodes: [
|
|
12798
|
+
{ id: '1', position: { x: 0, y: 0 }, data: { label: 'Start' } },
|
|
12799
|
+
{ id: '2', position: { x: 200, y: 100 }, data: { label: 'End' } },
|
|
12800
|
+
],
|
|
12801
|
+
edges: [{ id: 'e1', source: '1', target: '2' }],
|
|
12802
|
+
})
|
|
12803
|
+
|
|
12804
|
+
flow.addNode({ id: '3', position: { x: 100, y: 200 }, data: { label: 'New' } })
|
|
12805
|
+
await flow.layout('layered') // auto-layout via elkjs
|
|
12806
|
+
|
|
12807
|
+
<Flow instance={flow}><Background /><Controls /><MiniMap /></Flow>`,
|
|
12808
|
+
notes: "Signal-native nodes/edges. Auto-layout via elkjs (lazy-loaded). Pan/zoom via pointer events + CSS transforms. No D3."
|
|
12809
|
+
},
|
|
12810
|
+
"code/createEditor": {
|
|
12811
|
+
signature: "createEditor(config: { value?: string, language?: string, theme?: string, minimap?: boolean, ... }): EditorInstance",
|
|
12812
|
+
example: `const editor = createEditor({
|
|
12813
|
+
value: '// hello',
|
|
12814
|
+
language: 'typescript',
|
|
12815
|
+
theme: 'dark',
|
|
12816
|
+
minimap: true,
|
|
12817
|
+
})
|
|
12818
|
+
|
|
12819
|
+
editor.value() // reactive Signal<string>
|
|
12820
|
+
editor.goToLine(42)
|
|
12821
|
+
editor.insert('new code')
|
|
12822
|
+
|
|
12823
|
+
<CodeEditor instance={editor} />
|
|
12824
|
+
<DiffEditor original="old" modified="new" />`,
|
|
12825
|
+
notes: "Built on CodeMirror 6 (~250KB vs Monaco's ~2.5MB). loadLanguage() for lazy grammars. TabbedEditor for multi-file."
|
|
12826
|
+
},
|
|
12827
|
+
"hotkeys/useHotkey": {
|
|
12828
|
+
signature: "useHotkey(shortcut: string, handler: (e: KeyboardEvent) => void, options?: HotkeyOptions): void",
|
|
12829
|
+
example: `useHotkey('mod+s', (e) => {
|
|
12830
|
+
e.preventDefault()
|
|
12831
|
+
save()
|
|
12832
|
+
})
|
|
12833
|
+
|
|
12834
|
+
useHotkey('mod+k', () => openSearch(), { scope: 'global' })
|
|
12835
|
+
useHotkeyScope('editor') // activate scope for component lifetime`,
|
|
12836
|
+
notes: "Component-scoped, auto-unregisters on unmount. 'mod' = ⌘ on Mac, Ctrl elsewhere. Scope-based activation for context-aware shortcuts."
|
|
12837
|
+
},
|
|
12838
|
+
"table/useTable": {
|
|
12839
|
+
signature: "useTable<T>(options: TableOptions<T>): Table<T>",
|
|
12840
|
+
example: `const table = useTable({
|
|
12841
|
+
data: () => users(),
|
|
12842
|
+
columns: [
|
|
12843
|
+
{ accessorKey: 'name', header: 'Name' },
|
|
12844
|
+
{ accessorKey: 'email', header: 'Email' },
|
|
12845
|
+
],
|
|
12846
|
+
})
|
|
12847
|
+
|
|
12848
|
+
// flexRender for column templates:
|
|
12849
|
+
flexRender(cell.column.columnDef.cell, cell.getContext())`,
|
|
12850
|
+
notes: "TanStack Table adapter with reactive options and auto state sync."
|
|
12851
|
+
},
|
|
12852
|
+
"virtual/useVirtualizer": {
|
|
12853
|
+
signature: "useVirtualizer(options: VirtualizerOptions): { virtualItems: Signal, totalSize: Signal, scrollToIndex: (i) => void, ... }",
|
|
12854
|
+
example: `const { virtualItems, totalSize } = useVirtualizer({
|
|
12855
|
+
count: 10000,
|
|
12856
|
+
getScrollElement: () => scrollRef.current,
|
|
12857
|
+
estimateSize: () => 35,
|
|
12858
|
+
})`,
|
|
12859
|
+
notes: "TanStack Virtual adapter. Also: useWindowVirtualizer for window-scoped virtualization."
|
|
12860
|
+
},
|
|
12861
|
+
"feature/defineFeature": {
|
|
12862
|
+
signature: "defineFeature<T>(config: { name: string, schema: FeatureSchema<T>, api: FeatureApi<T> }): Feature<T>",
|
|
12863
|
+
example: `const Posts = defineFeature({
|
|
12864
|
+
name: 'posts',
|
|
12865
|
+
schema: { title: 'string', body: 'string', author: reference('users') },
|
|
12866
|
+
api: { baseUrl: '/api/posts' },
|
|
12867
|
+
})
|
|
12868
|
+
|
|
12869
|
+
// Auto-generated hooks:
|
|
12870
|
+
Posts.useList() // paginated query
|
|
12871
|
+
Posts.useById(id) // single item query
|
|
12872
|
+
Posts.useCreate() // mutation
|
|
12873
|
+
Posts.useForm(id) // edit form with validation
|
|
12874
|
+
Posts.useTable() // TanStack Table config`,
|
|
12875
|
+
notes: "Schema-driven CRUD. Composes @pyreon/query, @pyreon/form, @pyreon/validation, @pyreon/store, @pyreon/table."
|
|
12876
|
+
},
|
|
12877
|
+
"lint/lint": {
|
|
12878
|
+
signature: "lint(options?: LintOptions): LintResult",
|
|
12879
|
+
example: `import { lint } from "@pyreon/lint"
|
|
12880
|
+
|
|
12881
|
+
const result = lint({ paths: ["src/"], preset: "recommended" })
|
|
12882
|
+
console.log(result.totalErrors, result.totalWarnings)
|
|
12883
|
+
|
|
12884
|
+
// With config file auto-loading + rule overrides
|
|
12885
|
+
lint({ paths: ["."], ruleOverrides: { "pyreon/no-classname": "off" } })`,
|
|
12886
|
+
notes: "Programmatic API. 55 rules across 12 categories. Auto-loads .pyreonlintrc.json. Presets: recommended, strict, app, lib. Uses oxc-parser with AST caching."
|
|
12887
|
+
},
|
|
12888
|
+
"lint/lintFile": {
|
|
12889
|
+
signature: "lintFile(filePath: string, sourceText: string, rules: Rule[], config: LintConfig, cache?: AstCache): LintFileResult",
|
|
12890
|
+
example: `import { lintFile, allRules, getPreset, AstCache } from "@pyreon/lint"
|
|
12891
|
+
|
|
12892
|
+
const cache = new AstCache()
|
|
12893
|
+
const config = getPreset("recommended")
|
|
12894
|
+
const result = lintFile("app.tsx", source, allRules, config, cache)`,
|
|
12895
|
+
notes: "Low-level single-file API. Optional AstCache for repeat runs (FNV-1a hash keyed)."
|
|
12896
|
+
},
|
|
12897
|
+
"lint/cli": {
|
|
12898
|
+
signature: "pyreon-lint [--preset name] [--fix] [--format text|json|compact] [--quiet] [--watch] [--list] [--config path] [--ignore path] [--rule id=severity] [path...]",
|
|
12899
|
+
example: `pyreon-lint --preset strict --quiet # CI mode
|
|
12900
|
+
pyreon-lint --fix # auto-fix
|
|
12901
|
+
pyreon-lint --watch src/ # watch mode
|
|
12902
|
+
pyreon-lint --list # list all 55 rules
|
|
12903
|
+
pyreon-lint --format json # machine-readable`,
|
|
12904
|
+
notes: "CLI entry. Config: .pyreonlintrc.json, package.json 'pyreonlint' field. Ignore: .pyreonlintignore + .gitignore. Watch: fs.watch recursive with 100ms debounce."
|
|
12905
|
+
},
|
|
12906
|
+
"ui-core/PyreonUI": {
|
|
12907
|
+
signature: "PyreonUI(props: { theme?: Theme; mode?: 'light' | 'dark' | 'system'; inversed?: boolean; children: VNodeChild }): VNodeChild",
|
|
12908
|
+
example: `import { PyreonUI } from "@pyreon/ui-core"
|
|
12909
|
+
import { enrichTheme } from "@pyreon/unistyle"
|
|
12910
|
+
|
|
12911
|
+
const theme = enrichTheme({ colors: { primary: "#3b82f6" } })
|
|
12912
|
+
|
|
12913
|
+
<PyreonUI theme={theme} mode="system">
|
|
12914
|
+
<App />
|
|
12915
|
+
</PyreonUI>
|
|
12916
|
+
|
|
12917
|
+
// mode="system" auto-detects OS dark mode via prefers-color-scheme
|
|
12918
|
+
// inversed flips the resolved mode (light↔dark)`,
|
|
12919
|
+
notes: "Unified provider replacing 3 separate providers (theme, mode, config). Calls init() internally. mode='system' uses matchMedia('(prefers-color-scheme: dark)') and reactively updates.",
|
|
12920
|
+
mistakes: `- Using ThemeProvider + ModeProvider + ConfigProvider separately → Use PyreonUI instead
|
|
12921
|
+
- Forgetting enrichTheme() → raw theme objects miss default breakpoints/spacing`
|
|
12922
|
+
},
|
|
12923
|
+
"ui-core/useMode": {
|
|
12924
|
+
signature: "useMode(): Signal<'light' | 'dark'>",
|
|
12925
|
+
example: `import { useMode } from "@pyreon/ui-core"
|
|
12926
|
+
|
|
12927
|
+
const mode = useMode()
|
|
12928
|
+
// mode() returns "light" or "dark" (resolved, reactive)
|
|
12929
|
+
// Reflects OS preference when PyreonUI mode="system"`,
|
|
12930
|
+
notes: "Returns the resolved mode as a reactive signal. When mode='system', reflects the OS preference. When inversed is true, the mode is flipped."
|
|
12931
|
+
},
|
|
12932
|
+
"unistyle/enrichTheme": {
|
|
12933
|
+
signature: "enrichTheme(theme: PartialTheme): Theme",
|
|
12934
|
+
example: `import { enrichTheme } from "@pyreon/unistyle"
|
|
12935
|
+
|
|
12936
|
+
const theme = enrichTheme({
|
|
12937
|
+
colors: { primary: "#3b82f6", secondary: "#6366f1" },
|
|
12938
|
+
fonts: { body: "Inter, sans-serif" },
|
|
12939
|
+
})
|
|
12940
|
+
|
|
12941
|
+
// Merges user overrides with default breakpoints, spacing, and units`,
|
|
12942
|
+
notes: "Merges a partial theme with the full default theme (breakpoints, spacing, unit utilities). Always use when passing a theme to PyreonUI."
|
|
12943
|
+
},
|
|
12944
|
+
"rx/filter": {
|
|
12945
|
+
signature: "filter<T>(source: Signal<T[]> | T[], predicate: (item: T) => boolean): Computed<T[]> | T[]",
|
|
12946
|
+
example: `import { filter } from '@pyreon/rx'
|
|
12947
|
+
|
|
12948
|
+
// Signal input → Computed output (auto-tracks):
|
|
12949
|
+
const items = signal([1, 2, 3, 4, 5])
|
|
12950
|
+
const evens = filter(items, n => n % 2 === 0) // Computed<number[]>
|
|
12951
|
+
evens() // [2, 4]
|
|
12952
|
+
|
|
12953
|
+
// Plain input → plain output:
|
|
12954
|
+
const result = filter([1, 2, 3, 4, 5], n => n > 3) // [4, 5]`,
|
|
12955
|
+
notes: "Every @pyreon/rx function is overloaded: Signal<T[]> input produces Computed<T[]>, plain T[] input produces plain T[]. 24 functions total: filter, map, sortBy, groupBy, keyBy, uniqBy, take, skip, last, chunk, flatten, find, mapValues, count, sum, min, max, average, distinct, scan, combine, debounce, throttle, search."
|
|
12956
|
+
},
|
|
12957
|
+
"rx/pipe": {
|
|
12958
|
+
signature: "pipe<T>(source: Signal<T[]> | T[], ...operators: Operator[]): Computed<T[]> | T[]",
|
|
12959
|
+
example: `import { pipe, filter, sortBy, map } from '@pyreon/rx'
|
|
12960
|
+
|
|
12961
|
+
const users = signal([
|
|
12962
|
+
{ name: 'Charlie', age: 35 },
|
|
12963
|
+
{ name: 'Alice', age: 25 },
|
|
12964
|
+
{ name: 'Bob', age: 30 },
|
|
12965
|
+
])
|
|
12966
|
+
|
|
12967
|
+
// Compose transforms left-to-right:
|
|
12968
|
+
const result = pipe(
|
|
12969
|
+
users,
|
|
12970
|
+
filter(u => u.age >= 30),
|
|
12971
|
+
sortBy('name'),
|
|
12972
|
+
map(u => u.name),
|
|
12973
|
+
)
|
|
12974
|
+
// Computed<string[]> → ["Bob", "Charlie"]`,
|
|
12975
|
+
notes: "Pipe composes operators left-to-right. Signal source produces reactive Computed that re-derives when source changes."
|
|
12976
|
+
},
|
|
12977
|
+
"toast/toast": {
|
|
12978
|
+
signature: "toast(message: string, options?: ToastOptions): string\ntoast.success/error/warning/info/loading(message): string\ntoast.update(id, options): void\ntoast.dismiss(id?): void\ntoast.promise(promise, { loading, success, error }): string",
|
|
12979
|
+
example: `import { toast, Toaster } from '@pyreon/toast'
|
|
12980
|
+
|
|
12981
|
+
// Basic:
|
|
12982
|
+
toast('Hello!')
|
|
12983
|
+
toast.success('Saved!')
|
|
12984
|
+
toast.error('Failed!')
|
|
12985
|
+
|
|
12986
|
+
// Loading → success pattern:
|
|
12987
|
+
const id = toast.loading('Saving...')
|
|
12988
|
+
await save()
|
|
12989
|
+
toast.update(id, { type: 'success', message: 'Done!' })
|
|
12990
|
+
|
|
12991
|
+
// Promise helper:
|
|
12992
|
+
toast.promise(fetchData(), {
|
|
12993
|
+
loading: 'Loading...',
|
|
12994
|
+
success: 'Loaded!',
|
|
12995
|
+
error: 'Failed to load',
|
|
12996
|
+
})
|
|
12997
|
+
|
|
12998
|
+
// Dismiss:
|
|
12999
|
+
toast.dismiss(id) // one
|
|
13000
|
+
toast.dismiss() // all
|
|
13001
|
+
|
|
13002
|
+
// Mount Toaster once in your app:
|
|
13003
|
+
<Toaster />`,
|
|
13004
|
+
notes: "Imperative API — call from anywhere, no context needed. <Toaster /> renders via Portal with CSS transitions, auto-dismiss, pause on hover. Accessible: role='alert', aria-live='polite'."
|
|
13005
|
+
},
|
|
13006
|
+
"url-state/useUrlState": {
|
|
13007
|
+
signature: "useUrlState<T>(key: string, defaultValue: T): UrlStateSignal<T>\nuseUrlState<T extends Record<string, unknown>>(schema: T): UrlStateSchema<T>",
|
|
13008
|
+
example: `import { useUrlState } from '@pyreon/url-state'
|
|
13009
|
+
|
|
13010
|
+
// Single param — synced to ?page=:
|
|
13011
|
+
const page = useUrlState('page', 1)
|
|
13012
|
+
page() // 1 (auto-coerced number)
|
|
13013
|
+
page.set(2) // URL → ?page=2
|
|
13014
|
+
|
|
13015
|
+
// Schema mode — multiple params:
|
|
13016
|
+
const filters = useUrlState({ page: 1, sort: 'name', desc: false })
|
|
13017
|
+
filters.page() // 1
|
|
13018
|
+
filters.sort() // "name"
|
|
13019
|
+
filters.set({ page: 2, sort: 'date' })`,
|
|
13020
|
+
notes: "Auto type coercion (numbers, booleans, arrays). Uses replaceState (no history spam). Configurable debounce. SSR-safe — reads request URL on server."
|
|
13021
|
+
},
|
|
13022
|
+
"query/useSSE": {
|
|
13023
|
+
signature: "useSSE<T>(options: { queryKey: unknown[], url: string, transform?: (event: MessageEvent) => T, ... }): { data: Signal<T>, error: Signal<Error>, status: Signal<string> }",
|
|
13024
|
+
example: `import { useSSE } from '@pyreon/query'
|
|
13025
|
+
|
|
13026
|
+
const { data, error, status } = useSSE({
|
|
13027
|
+
queryKey: ['events'],
|
|
13028
|
+
url: '/api/events',
|
|
13029
|
+
transform: (event) => JSON.parse(event.data),
|
|
13030
|
+
})
|
|
13031
|
+
|
|
13032
|
+
// data() reactively updates on each SSE message
|
|
13033
|
+
// Auto-reconnects on disconnect
|
|
13034
|
+
// Integrates with QueryClient for cache invalidation`,
|
|
13035
|
+
notes: "Server-Sent Events hook. Same pattern as useSubscription but read-only (no send). Integrates with QueryClient cache."
|
|
13036
|
+
},
|
|
13037
|
+
"router/useIsActive": {
|
|
13038
|
+
signature: "useIsActive(path: string, exact?: boolean): () => boolean",
|
|
13039
|
+
example: `import { useIsActive } from '@pyreon/router'
|
|
13040
|
+
|
|
13041
|
+
const isHome = useIsActive('/')
|
|
13042
|
+
const isAdmin = useIsActive('/admin') // prefix match
|
|
13043
|
+
const isExactAdmin = useIsActive('/admin', true) // exact only
|
|
13044
|
+
|
|
13045
|
+
// Reactive — updates when route changes:
|
|
13046
|
+
<a class={{ active: isAdmin() }} href="/admin">Admin</a>`,
|
|
13047
|
+
notes: "Returns a reactive boolean. Segment-aware prefix matching: /admin matches /admin/users but not /admin-panel. Pass exact=true for exact-only matching."
|
|
13048
|
+
},
|
|
13049
|
+
"storybook/renderToCanvas": {
|
|
13050
|
+
signature: "renderToCanvas(context: StoryContext, canvasElement: HTMLElement): void",
|
|
13051
|
+
example: `// .storybook/main.ts:
|
|
13052
|
+
export default { framework: '@pyreon/storybook' }
|
|
13053
|
+
|
|
13054
|
+
// Story file:
|
|
13055
|
+
import type { Meta, StoryObj } from '@pyreon/storybook'
|
|
13056
|
+
import { Button } from './Button'
|
|
13057
|
+
|
|
13058
|
+
const meta: Meta<typeof Button> = { component: Button }
|
|
13059
|
+
export default meta
|
|
13060
|
+
|
|
13061
|
+
export const Primary: StoryObj<typeof meta> = {
|
|
13062
|
+
args: { variant: 'primary', label: 'Click me' },
|
|
13063
|
+
}`,
|
|
13064
|
+
notes: "Storybook renderer for Pyreon components. Re-exports h, Fragment, signal, computed, effect, mount for story convenience."
|
|
12687
13065
|
}
|
|
12688
13066
|
};
|
|
12689
13067
|
|