@shwfed/config 2.3.9 → 2.3.11
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/mcp.mjs +1064 -475
- package/dist/module.json +1 -1
- package/dist/preview/assets/config-57-v4VXo.js +1 -0
- package/dist/preview/assets/config-BZahzuEc.js +1 -0
- package/dist/preview/assets/config-Be-2ZA2R.js +1 -0
- package/dist/preview/assets/config-BnZQO-Sp.js +1 -0
- package/dist/preview/assets/config-Bp91DUdU.js +1 -0
- package/dist/preview/assets/config-DNokxY7M.js +1 -0
- package/dist/preview/assets/config-_msO_f2R.js +1 -0
- package/dist/preview/assets/config-_uPI8qV-.js +1 -0
- package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-BtScXbs1.js +1 -0
- package/dist/preview/assets/index-DDbl2Atj.js +1 -0
- package/dist/preview/assets/index-DGa3Oj3y.js +1075 -0
- package/dist/preview/assets/index-mbGtsgdv.css +1 -0
- package/dist/preview/assets/runtime-B9u14qqB.js +1 -0
- package/dist/preview/assets/runtime-BBms4myv.js +1 -0
- package/dist/preview/assets/runtime-CfR7ZAND.js +1 -0
- package/dist/preview/assets/runtime-D3EyeiyA.js +1 -0
- package/dist/preview/assets/runtime-Dk9u-Ybw.js +1 -0
- package/dist/preview/assets/runtime-XXqIAt53.js +1 -0
- package/dist/preview/assets/runtime-cKWSGFod.js +1 -0
- package/dist/preview/assets/runtime-w7V-p3t1.js +1 -0
- package/dist/preview/index.html +19 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +3 -1
- package/dist/runtime/components/form/ai/fields-button.vue +3 -1
- package/dist/runtime/components/form/unit-config.vue +8 -4
- package/dist/runtime/components/form/utils/resolve.d.ts +48 -9
- package/dist/runtime/components/form/utils/resolve.js +59 -5
- package/dist/runtime/components/table/ai/columns-button.vue +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.d.vue.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue +305 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue.d.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/runtime.vue +81 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +55 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.js +82 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.d.vue.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue +310 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue.d.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue +81 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +66 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.js +71 -0
- package/dist/runtime/components/table/config.vue +2 -1
- package/dist/runtime/components/table/utils/resolve.d.ts +53 -0
- package/dist/runtime/components/table/utils/resolve.js +66 -1
- package/package.json +2 -2
package/dist/mcp.mjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import process$2 from "node:process";
|
|
3
|
+
import { createServer } from "node:http";
|
|
4
|
+
import { stat, readFile } from "node:fs/promises";
|
|
5
|
+
import { resolve as resolve$1, sep } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
3
7
|
var util$2;
|
|
4
8
|
(function(util2) {
|
|
5
9
|
util2.assertEqual = (_) => {
|
|
@@ -3721,7 +3725,7 @@ function slugify(input) {
|
|
|
3721
3725
|
}
|
|
3722
3726
|
const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
3723
3727
|
};
|
|
3724
|
-
function isObject$
|
|
3728
|
+
function isObject$4(data) {
|
|
3725
3729
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
3726
3730
|
}
|
|
3727
3731
|
const allowsEval = /* @__PURE__ */ cached$1(() => {
|
|
@@ -3740,7 +3744,7 @@ const allowsEval = /* @__PURE__ */ cached$1(() => {
|
|
|
3740
3744
|
}
|
|
3741
3745
|
});
|
|
3742
3746
|
function isPlainObject$1(o) {
|
|
3743
|
-
if (isObject$
|
|
3747
|
+
if (isObject$4(o) === false)
|
|
3744
3748
|
return false;
|
|
3745
3749
|
const ctor = o.constructor;
|
|
3746
3750
|
if (ctor === void 0)
|
|
@@ -3748,7 +3752,7 @@ function isPlainObject$1(o) {
|
|
|
3748
3752
|
if (typeof ctor !== "function")
|
|
3749
3753
|
return true;
|
|
3750
3754
|
const prot = ctor.prototype;
|
|
3751
|
-
if (isObject$
|
|
3755
|
+
if (isObject$4(prot) === false)
|
|
3752
3756
|
return false;
|
|
3753
3757
|
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
|
|
3754
3758
|
return false;
|
|
@@ -5311,7 +5315,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
5311
5315
|
}
|
|
5312
5316
|
return propValues;
|
|
5313
5317
|
});
|
|
5314
|
-
const isObject2 = isObject$
|
|
5318
|
+
const isObject2 = isObject$4;
|
|
5315
5319
|
const catchall = def.catchall;
|
|
5316
5320
|
let value;
|
|
5317
5321
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -5444,7 +5448,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
|
|
|
5444
5448
|
return (payload, ctx) => fn(shape, payload, ctx);
|
|
5445
5449
|
};
|
|
5446
5450
|
let fastpass;
|
|
5447
|
-
const isObject2 = isObject$
|
|
5451
|
+
const isObject2 = isObject$4;
|
|
5448
5452
|
const jit = !globalConfig.jitless;
|
|
5449
5453
|
const allowsEval$1 = allowsEval;
|
|
5450
5454
|
const fastEnabled = jit && allowsEval$1.value;
|
|
@@ -5576,7 +5580,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
5576
5580
|
});
|
|
5577
5581
|
inst._zod.parse = (payload, ctx) => {
|
|
5578
5582
|
const input = payload.value;
|
|
5579
|
-
if (!isObject$
|
|
5583
|
+
if (!isObject$4(input)) {
|
|
5580
5584
|
payload.issues.push({
|
|
5581
5585
|
code: "invalid_type",
|
|
5582
5586
|
expected: "object",
|
|
@@ -15398,7 +15402,7 @@ function requireCompile() {
|
|
|
15398
15402
|
}
|
|
15399
15403
|
}
|
|
15400
15404
|
compile$1.compileSchema = compileSchema;
|
|
15401
|
-
function
|
|
15405
|
+
function resolveRef2(root, baseId, ref2) {
|
|
15402
15406
|
var _a2;
|
|
15403
15407
|
ref2 = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref2);
|
|
15404
15408
|
const schOrFunc = root.refs[ref2];
|
|
@@ -15415,7 +15419,7 @@ function requireCompile() {
|
|
|
15415
15419
|
return;
|
|
15416
15420
|
return root.refs[ref2] = inlineOrCompile.call(this, _sch);
|
|
15417
15421
|
}
|
|
15418
|
-
compile$1.resolveRef =
|
|
15422
|
+
compile$1.resolveRef = resolveRef2;
|
|
15419
15423
|
function inlineOrCompile(sch) {
|
|
15420
15424
|
if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
|
|
15421
15425
|
return sch.schema;
|
|
@@ -15505,14 +15509,14 @@ function requireCompile() {
|
|
|
15505
15509
|
}
|
|
15506
15510
|
const $id$1 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
|
|
15507
15511
|
const description = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
|
|
15508
|
-
const type$
|
|
15512
|
+
const type$Q = "object";
|
|
15509
15513
|
const required$1 = ["$data"];
|
|
15510
15514
|
const properties$2 = { "$data": { "type": "string", "anyOf": [{ "format": "relative-json-pointer" }, { "format": "json-pointer" }] } };
|
|
15511
15515
|
const additionalProperties$1 = false;
|
|
15512
15516
|
const require$$9 = {
|
|
15513
15517
|
$id: $id$1,
|
|
15514
15518
|
description,
|
|
15515
|
-
type: type$
|
|
15519
|
+
type: type$Q,
|
|
15516
15520
|
required: required$1,
|
|
15517
15521
|
properties: properties$2,
|
|
15518
15522
|
additionalProperties: additionalProperties$1
|
|
@@ -18512,14 +18516,14 @@ function requireFormat() {
|
|
|
18512
18516
|
format$7.default = format2;
|
|
18513
18517
|
return format$7;
|
|
18514
18518
|
}
|
|
18515
|
-
var metadata$
|
|
18519
|
+
var metadata$P = {};
|
|
18516
18520
|
var hasRequiredMetadata;
|
|
18517
18521
|
function requireMetadata() {
|
|
18518
|
-
if (hasRequiredMetadata) return metadata$
|
|
18522
|
+
if (hasRequiredMetadata) return metadata$P;
|
|
18519
18523
|
hasRequiredMetadata = 1;
|
|
18520
|
-
Object.defineProperty(metadata$
|
|
18521
|
-
metadata$
|
|
18522
|
-
metadata$
|
|
18524
|
+
Object.defineProperty(metadata$P, "__esModule", { value: true });
|
|
18525
|
+
metadata$P.contentVocabulary = metadata$P.metadataVocabulary = void 0;
|
|
18526
|
+
metadata$P.metadataVocabulary = [
|
|
18523
18527
|
"title",
|
|
18524
18528
|
"description",
|
|
18525
18529
|
"default",
|
|
@@ -18528,12 +18532,12 @@ function requireMetadata() {
|
|
|
18528
18532
|
"writeOnly",
|
|
18529
18533
|
"examples"
|
|
18530
18534
|
];
|
|
18531
|
-
metadata$
|
|
18535
|
+
metadata$P.contentVocabulary = [
|
|
18532
18536
|
"contentMediaType",
|
|
18533
18537
|
"contentEncoding",
|
|
18534
18538
|
"contentSchema"
|
|
18535
18539
|
];
|
|
18536
|
-
return metadata$
|
|
18540
|
+
return metadata$P;
|
|
18537
18541
|
}
|
|
18538
18542
|
var hasRequiredDraft7;
|
|
18539
18543
|
function requireDraft7() {
|
|
@@ -18679,14 +18683,14 @@ const $schema = "http://json-schema.org/draft-07/schema#";
|
|
|
18679
18683
|
const $id = "http://json-schema.org/draft-07/schema#";
|
|
18680
18684
|
const title = "Core schema meta-schema";
|
|
18681
18685
|
const definitions = { "schemaArray": { "type": "array", "minItems": 1, "items": { "$ref": "#" } }, "nonNegativeInteger": { "type": "integer", "minimum": 0 }, "nonNegativeIntegerDefault0": { "allOf": [{ "$ref": "#/definitions/nonNegativeInteger" }, { "default": 0 }] }, "simpleTypes": { "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] }, "stringArray": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "default": [] } };
|
|
18682
|
-
const type$
|
|
18686
|
+
const type$P = ["object", "boolean"];
|
|
18683
18687
|
const properties = { "$id": { "type": "string", "format": "uri-reference" }, "$schema": { "type": "string", "format": "uri" }, "$ref": { "type": "string", "format": "uri-reference" }, "$comment": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "default": true, "readOnly": { "type": "boolean", "default": false }, "examples": { "type": "array", "items": true }, "multipleOf": { "type": "number", "exclusiveMinimum": 0 }, "maximum": { "type": "number" }, "exclusiveMaximum": { "type": "number" }, "minimum": { "type": "number" }, "exclusiveMinimum": { "type": "number" }, "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "pattern": { "type": "string", "format": "regex" }, "additionalItems": { "$ref": "#" }, "items": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }], "default": true }, "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "uniqueItems": { "type": "boolean", "default": false }, "contains": { "$ref": "#" }, "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "required": { "$ref": "#/definitions/stringArray" }, "additionalProperties": { "$ref": "#" }, "definitions": { "type": "object", "additionalProperties": { "$ref": "#" }, "default": {} }, "properties": { "type": "object", "additionalProperties": { "$ref": "#" }, "default": {} }, "patternProperties": { "type": "object", "additionalProperties": { "$ref": "#" }, "propertyNames": { "format": "regex" }, "default": {} }, "dependencies": { "type": "object", "additionalProperties": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }] } }, "propertyNames": { "$ref": "#" }, "const": true, "enum": { "type": "array", "items": true, "minItems": 1, "uniqueItems": true }, "type": { "anyOf": [{ "$ref": "#/definitions/simpleTypes" }, { "type": "array", "items": { "$ref": "#/definitions/simpleTypes" }, "minItems": 1, "uniqueItems": true }] }, "format": { "type": "string" }, "contentMediaType": { "type": "string" }, "contentEncoding": { "type": "string" }, "if": { "$ref": "#" }, "then": { "$ref": "#" }, "else": { "$ref": "#" }, "allOf": { "$ref": "#/definitions/schemaArray" }, "anyOf": { "$ref": "#/definitions/schemaArray" }, "oneOf": { "$ref": "#/definitions/schemaArray" }, "not": { "$ref": "#" } };
|
|
18684
18688
|
const require$$3 = {
|
|
18685
18689
|
$schema,
|
|
18686
18690
|
$id,
|
|
18687
18691
|
title,
|
|
18688
18692
|
definitions,
|
|
18689
|
-
type: type$
|
|
18693
|
+
type: type$P,
|
|
18690
18694
|
properties,
|
|
18691
18695
|
"default": true
|
|
18692
18696
|
};
|
|
@@ -20717,6 +20721,111 @@ class StdioServerTransport {
|
|
|
20717
20721
|
});
|
|
20718
20722
|
}
|
|
20719
20723
|
}
|
|
20724
|
+
const ASSETS_DIR = fileURLToPath(new URL("./preview/", import.meta.url));
|
|
20725
|
+
const MIME = {
|
|
20726
|
+
".html": "text/html; charset=utf-8",
|
|
20727
|
+
".js": "application/javascript; charset=utf-8",
|
|
20728
|
+
".mjs": "application/javascript; charset=utf-8",
|
|
20729
|
+
".css": "text/css; charset=utf-8",
|
|
20730
|
+
".json": "application/json; charset=utf-8",
|
|
20731
|
+
".svg": "image/svg+xml",
|
|
20732
|
+
".png": "image/png",
|
|
20733
|
+
".jpg": "image/jpeg",
|
|
20734
|
+
".jpeg": "image/jpeg",
|
|
20735
|
+
".gif": "image/gif",
|
|
20736
|
+
".ico": "image/x-icon",
|
|
20737
|
+
".woff": "font/woff",
|
|
20738
|
+
".woff2": "font/woff2",
|
|
20739
|
+
".map": "application/json; charset=utf-8"
|
|
20740
|
+
};
|
|
20741
|
+
function mimeFor(path) {
|
|
20742
|
+
const dot = path.lastIndexOf(".");
|
|
20743
|
+
if (dot === -1) return "application/octet-stream";
|
|
20744
|
+
return MIME[path.slice(dot).toLowerCase()] ?? "application/octet-stream";
|
|
20745
|
+
}
|
|
20746
|
+
let server$1 = null;
|
|
20747
|
+
let serverUrl = null;
|
|
20748
|
+
let currentConfig = null;
|
|
20749
|
+
async function assetsAvailable() {
|
|
20750
|
+
try {
|
|
20751
|
+
const s = await stat(resolve$1(ASSETS_DIR, "index.html"));
|
|
20752
|
+
return s.isFile();
|
|
20753
|
+
} catch {
|
|
20754
|
+
return false;
|
|
20755
|
+
}
|
|
20756
|
+
}
|
|
20757
|
+
function injectConfig(html, config2) {
|
|
20758
|
+
const json = JSON.stringify(config2).replace(/</g, "\\u003c");
|
|
20759
|
+
const script = `<script>window.__SHWFED_PREVIEW_CONFIG__ = ${json};<\/script>`;
|
|
20760
|
+
const marker = '<script type="module"';
|
|
20761
|
+
const idx = html.indexOf(marker);
|
|
20762
|
+
if (idx === -1) return html.replace("</head>", `${script}</head>`);
|
|
20763
|
+
return `${html.slice(0, idx)}${script}${html.slice(idx)}`;
|
|
20764
|
+
}
|
|
20765
|
+
async function handleRequest(url) {
|
|
20766
|
+
const cleanPath = url.split("?")[0].split("#")[0];
|
|
20767
|
+
const route = cleanPath === "/" || cleanPath === "" ? "/index.html" : cleanPath;
|
|
20768
|
+
const absolute = resolve$1(ASSETS_DIR, `.${route}`);
|
|
20769
|
+
const root = ASSETS_DIR.endsWith(sep) ? ASSETS_DIR : `${ASSETS_DIR}${sep}`;
|
|
20770
|
+
if (absolute !== ASSETS_DIR.replace(/\/$/, "") && !absolute.startsWith(root)) {
|
|
20771
|
+
return { status: 403, headers: { "content-type": "text/plain" }, body: "forbidden" };
|
|
20772
|
+
}
|
|
20773
|
+
try {
|
|
20774
|
+
const file = await readFile(absolute);
|
|
20775
|
+
if (route === "/index.html") {
|
|
20776
|
+
const injected = injectConfig(file.toString("utf8"), currentConfig);
|
|
20777
|
+
return {
|
|
20778
|
+
status: 200,
|
|
20779
|
+
headers: { "content-type": MIME[".html"], "cache-control": "no-store" },
|
|
20780
|
+
body: injected
|
|
20781
|
+
};
|
|
20782
|
+
}
|
|
20783
|
+
return {
|
|
20784
|
+
status: 200,
|
|
20785
|
+
headers: { "content-type": mimeFor(route), "cache-control": "no-store" },
|
|
20786
|
+
body: file
|
|
20787
|
+
};
|
|
20788
|
+
} catch {
|
|
20789
|
+
return { status: 404, headers: { "content-type": "text/plain" }, body: "not found" };
|
|
20790
|
+
}
|
|
20791
|
+
}
|
|
20792
|
+
async function startPreview(config2) {
|
|
20793
|
+
if (!await assetsAvailable()) {
|
|
20794
|
+
throw new Error(
|
|
20795
|
+
`Preview assets not found at ${ASSETS_DIR}. The package's preview bundle is missing — reinstall @shwfed/config or run \`vite build --config vite.preview.config.ts\` if working from source.`
|
|
20796
|
+
);
|
|
20797
|
+
}
|
|
20798
|
+
currentConfig = config2;
|
|
20799
|
+
if (server$1 && serverUrl) return { url: serverUrl };
|
|
20800
|
+
const next = createServer((req, res) => {
|
|
20801
|
+
handleRequest(req.url ?? "/").then((result) => {
|
|
20802
|
+
res.writeHead(result.status, result.headers);
|
|
20803
|
+
res.end(result.body);
|
|
20804
|
+
}).catch((err) => {
|
|
20805
|
+
res.writeHead(500, { "content-type": "text/plain" });
|
|
20806
|
+
res.end(err instanceof Error ? err.message : String(err));
|
|
20807
|
+
});
|
|
20808
|
+
});
|
|
20809
|
+
await new Promise((resolve2, reject) => {
|
|
20810
|
+
next.once("error", reject);
|
|
20811
|
+
next.listen(0, "127.0.0.1", () => resolve2());
|
|
20812
|
+
});
|
|
20813
|
+
next.unref();
|
|
20814
|
+
const addr = next.address();
|
|
20815
|
+
const port = typeof addr === "object" && addr ? addr.port : 0;
|
|
20816
|
+
server$1 = next;
|
|
20817
|
+
serverUrl = `http://127.0.0.1:${port}/`;
|
|
20818
|
+
return { url: serverUrl };
|
|
20819
|
+
}
|
|
20820
|
+
async function stopPreview() {
|
|
20821
|
+
if (!server$1) return { stopped: false };
|
|
20822
|
+
const closing = server$1;
|
|
20823
|
+
server$1 = null;
|
|
20824
|
+
serverUrl = null;
|
|
20825
|
+
currentConfig = null;
|
|
20826
|
+
await new Promise((resolve2) => closing.close(() => resolve2()));
|
|
20827
|
+
return { stopped: true };
|
|
20828
|
+
}
|
|
20720
20829
|
const isFunction$2 = (input) => typeof input === "function";
|
|
20721
20830
|
const dual = function(arity, body) {
|
|
20722
20831
|
if (typeof arity === "function") {
|
|
@@ -20854,8 +20963,8 @@ const isNotUndefined = (input) => input !== void 0;
|
|
|
20854
20963
|
const isNotNull = (input) => input !== null;
|
|
20855
20964
|
const isNever = (_) => false;
|
|
20856
20965
|
const isRecordOrArray = (input) => typeof input === "object" && input !== null;
|
|
20857
|
-
const isObject$
|
|
20858
|
-
const hasProperty = /* @__PURE__ */ dual(2, (self2, property) => isObject$
|
|
20966
|
+
const isObject$3 = (input) => isRecordOrArray(input) || isFunction$1(input);
|
|
20967
|
+
const hasProperty = /* @__PURE__ */ dual(2, (self2, property) => isObject$3(self2) && property in self2);
|
|
20859
20968
|
const isTagged = /* @__PURE__ */ dual(2, (self2, tag2) => hasProperty(self2, "_tag") && self2["_tag"] === tag2);
|
|
20860
20969
|
const isNullable = (input) => input === null || input === void 0;
|
|
20861
20970
|
const isNotNullable = (input) => input !== null && input !== void 0;
|
|
@@ -21292,7 +21401,7 @@ function formatUnknown(input, options) {
|
|
|
21292
21401
|
seen.add(v);
|
|
21293
21402
|
return `${v.constructor.name}(${go2(Array.from(v), d)})`;
|
|
21294
21403
|
}
|
|
21295
|
-
if (isObject$
|
|
21404
|
+
if (isObject$3(v)) {
|
|
21296
21405
|
if (seen.has(v)) return CIRCULAR;
|
|
21297
21406
|
seen.add(v);
|
|
21298
21407
|
const keys2 = ownKeys(v);
|
|
@@ -21837,7 +21946,7 @@ const dedupeWith = /* @__PURE__ */ dual(2, (self2, isEquivalent) => {
|
|
|
21837
21946
|
return [];
|
|
21838
21947
|
});
|
|
21839
21948
|
const dedupe = (self2) => dedupeWith(self2, equivalence());
|
|
21840
|
-
const join$2 = /* @__PURE__ */ dual(2, (self2,
|
|
21949
|
+
const join$2 = /* @__PURE__ */ dual(2, (self2, sep2) => fromIterable$6(self2).join(sep2));
|
|
21841
21950
|
const getKeysForIndexSignature = (input, parameter) => {
|
|
21842
21951
|
switch (parameter._tag) {
|
|
21843
21952
|
case "StringKeyword":
|
|
@@ -26336,7 +26445,7 @@ const capture = (obj, span2) => {
|
|
|
26336
26445
|
}
|
|
26337
26446
|
return obj;
|
|
26338
26447
|
};
|
|
26339
|
-
const die$2 = (defect) => isObject$
|
|
26448
|
+
const die$2 = (defect) => isObject$3(defect) && !(spanSymbol in defect) ? withFiberRuntime$1((fiber) => failCause$5(die$3(capture(defect, currentSpanFromFiber(fiber))))) : failCause$5(die$3(defect));
|
|
26340
26449
|
const dieMessage$1 = (message2) => failCauseSync$1(() => die$3(new RuntimeException$1(message2)));
|
|
26341
26450
|
const either$1 = (self2) => matchEffect(self2, {
|
|
26342
26451
|
onFailure: (e) => succeed$8(left(e)),
|
|
@@ -26346,7 +26455,7 @@ const exit$1 = (self2) => matchCause$1(self2, {
|
|
|
26346
26455
|
onFailure: exitFailCause$1,
|
|
26347
26456
|
onSuccess: exitSucceed$1
|
|
26348
26457
|
});
|
|
26349
|
-
const fail$5 = (error2) => isObject$
|
|
26458
|
+
const fail$5 = (error2) => isObject$3(error2) && !(spanSymbol in error2) ? withFiberRuntime$1((fiber) => failCause$5(fail$6(capture(error2, currentSpanFromFiber(fiber))))) : failCause$5(fail$6(error2));
|
|
26350
26459
|
const failSync = (evaluate2) => flatMap$5(sync$2(evaluate2), fail$5);
|
|
26351
26460
|
const failCause$5 = (cause) => {
|
|
26352
26461
|
const effect2 = new EffectPrimitiveFailure(OP_FAILURE);
|
|
@@ -26481,7 +26590,7 @@ const sync$2 = (thunk) => {
|
|
|
26481
26590
|
effect2.effect_instruction_i0 = thunk;
|
|
26482
26591
|
return effect2;
|
|
26483
26592
|
};
|
|
26484
|
-
const tap$1 = /* @__PURE__ */ dual((args2) => args2.length === 3 || args2.length === 2 && !(isObject$
|
|
26593
|
+
const tap$1 = /* @__PURE__ */ dual((args2) => args2.length === 3 || args2.length === 2 && !(isObject$3(args2[1]) && "onlyEffect" in args2[1]), (self2, f) => flatMap$5(self2, (a) => {
|
|
26485
26594
|
const b = typeof f === "function" ? f(a) : f;
|
|
26486
26595
|
if (isEffect$1(b)) {
|
|
26487
26596
|
return as$1(b, a);
|
|
@@ -34947,7 +35056,7 @@ const go$1 = (ast, isDecoding) => {
|
|
|
34947
35056
|
case "SymbolKeyword":
|
|
34948
35057
|
return fromRefinement(ast, isSymbol);
|
|
34949
35058
|
case "ObjectKeyword":
|
|
34950
|
-
return fromRefinement(ast, isObject$
|
|
35059
|
+
return fromRefinement(ast, isObject$3);
|
|
34951
35060
|
case "Enums":
|
|
34952
35061
|
return fromRefinement(ast, (u) => ast.enums.some(([_, value]) => value === u));
|
|
34953
35062
|
case "TemplateLiteral": {
|
|
@@ -36414,7 +36523,7 @@ function compactUnion(members) {
|
|
|
36414
36523
|
}
|
|
36415
36524
|
return out;
|
|
36416
36525
|
}
|
|
36417
|
-
const pick = /* @__PURE__ */ dual((args2) => isObject$
|
|
36526
|
+
const pick = /* @__PURE__ */ dual((args2) => isObject$3(args2[0]), (s, ...keys2) => {
|
|
36418
36527
|
const out = {};
|
|
36419
36528
|
for (const k of keys2) {
|
|
36420
36529
|
if (k in s) {
|
|
@@ -36423,7 +36532,7 @@ const pick = /* @__PURE__ */ dual((args2) => isObject$2(args2[0]), (s, ...keys2)
|
|
|
36423
36532
|
}
|
|
36424
36533
|
return out;
|
|
36425
36534
|
});
|
|
36426
|
-
const omit = /* @__PURE__ */ dual((args2) => isObject$
|
|
36535
|
+
const omit = /* @__PURE__ */ dual((args2) => isObject$3(args2[0]), (s, ...keys2) => {
|
|
36427
36536
|
const out = {
|
|
36428
36537
|
...s
|
|
36429
36538
|
};
|
|
@@ -36507,7 +36616,7 @@ const decodeUnknownEither = (schema2, options) => {
|
|
|
36507
36616
|
const decodeUnknownEither2 = decodeUnknownEither$1(schema2, options);
|
|
36508
36617
|
return (u, overrideOptions) => mapLeft(decodeUnknownEither2(u, overrideOptions), parseError$1);
|
|
36509
36618
|
};
|
|
36510
|
-
const isSchema = (u) => hasProperty(u, TypeId$3) && isObject$
|
|
36619
|
+
const isSchema = (u) => hasProperty(u, TypeId$3) && isObject$3(u[TypeId$3]);
|
|
36511
36620
|
function getDefaultLiteralAST(literals) {
|
|
36512
36621
|
return isMembers(literals) ? Union$1.make(mapMembers(literals, (literal2) => new Literal$1(literal2))) : new Literal$1(literals[0]);
|
|
36513
36622
|
}
|
|
@@ -40962,14 +41071,14 @@ function registerFunctions(registry2) {
|
|
|
40962
41071
|
throw evaluationError("invalid_regular_expression", `Invalid regular expression: ${b}`);
|
|
40963
41072
|
}
|
|
40964
41073
|
});
|
|
40965
|
-
functionOverload("string.split(string): list<string>", (s,
|
|
40966
|
-
functionOverload("string.split(string, number): list<string>", (s,
|
|
41074
|
+
functionOverload("string.split(string): list<string>", (s, sep2) => s.split(sep2));
|
|
41075
|
+
functionOverload("string.split(string, number): list<string>", (s, sep2, l) => {
|
|
40967
41076
|
const limit2 = toNum(l);
|
|
40968
41077
|
if (limit2 === 0) return [];
|
|
40969
|
-
const parts2 = s.split(
|
|
41078
|
+
const parts2 = s.split(sep2);
|
|
40970
41079
|
if (limit2 < 0 || parts2.length <= limit2) return parts2;
|
|
40971
41080
|
const limited = parts2.slice(0, limit2 - 1);
|
|
40972
|
-
limited.push(parts2.slice(limit2 - 1).join(
|
|
41081
|
+
limited.push(parts2.slice(limit2 - 1).join(sep2));
|
|
40973
41082
|
return limited;
|
|
40974
41083
|
});
|
|
40975
41084
|
functionOverload("list<string>.join(): string", (v) => {
|
|
@@ -40984,7 +41093,7 @@ function registerFunctions(registry2) {
|
|
|
40984
41093
|
}
|
|
40985
41094
|
return arr.join("");
|
|
40986
41095
|
});
|
|
40987
|
-
functionOverload("list<string>.join(string): string", (v,
|
|
41096
|
+
functionOverload("list<string>.join(string): string", (v, sep2) => {
|
|
40988
41097
|
const arr = v;
|
|
40989
41098
|
for (let i = 0; i < arr.length; i++) {
|
|
40990
41099
|
if (typeof arr[i] !== "string") {
|
|
@@ -40994,7 +41103,7 @@ function registerFunctions(registry2) {
|
|
|
40994
41103
|
);
|
|
40995
41104
|
}
|
|
40996
41105
|
}
|
|
40997
|
-
return arr.join(
|
|
41106
|
+
return arr.join(sep2);
|
|
40998
41107
|
});
|
|
40999
41108
|
const textEncoder = new TextEncoder();
|
|
41000
41109
|
const textDecoder = new TextDecoder("utf8");
|
|
@@ -81508,13 +81617,13 @@ function md(...args2) {
|
|
|
81508
81617
|
const indent = (original.startsWith("\n") ? original.slice(1) : original).split("\n", 1)[0]?.match(/^(\s*)/)?.[1]?.length ?? 0;
|
|
81509
81618
|
return original.trim().replaceAll("\\`", "`").split("\n").map((line) => line.replace(new RegExp(`^${String.raw`\s`.repeat(indent)}`), "")).join("\n");
|
|
81510
81619
|
}
|
|
81511
|
-
const type$
|
|
81512
|
-
const compatibilityDate$
|
|
81513
|
-
const metadata$
|
|
81620
|
+
const type$O = "com.shwfed.actions.button.http.request.json.confirm";
|
|
81621
|
+
const compatibilityDate$O = "2026-04-18";
|
|
81622
|
+
const metadata$O = {
|
|
81514
81623
|
name: "网络请求(JSON + 确认)",
|
|
81515
81624
|
icon: "fluent:shield-checkmark-20-regular"
|
|
81516
81625
|
};
|
|
81517
|
-
function schema$
|
|
81626
|
+
function schema$O(configure) {
|
|
81518
81627
|
const CelHttpRequest = Expression({ configure, resultType: "HttpRequest" });
|
|
81519
81628
|
const CelMessage = Expression({
|
|
81520
81629
|
configure: (env) => {
|
|
@@ -81526,8 +81635,8 @@ function schema$M(configure) {
|
|
|
81526
81635
|
resultType: "string"
|
|
81527
81636
|
});
|
|
81528
81637
|
return Struct({
|
|
81529
|
-
type: Literal2(type$
|
|
81530
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
81638
|
+
type: Literal2(type$O),
|
|
81639
|
+
compatibilityDate: Literal2(compatibilityDate$O),
|
|
81531
81640
|
expression: CelHttpRequest.annotations({
|
|
81532
81641
|
title: "请求",
|
|
81533
81642
|
description: md`
|
|
@@ -81585,18 +81694,18 @@ function schema$M(configure) {
|
|
|
81585
81694
|
}
|
|
81586
81695
|
const __vite_glob_0_0$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81587
81696
|
__proto__: null,
|
|
81588
|
-
compatibilityDate: compatibilityDate$
|
|
81589
|
-
metadata: metadata$
|
|
81590
|
-
schema: schema$
|
|
81591
|
-
type: type$
|
|
81697
|
+
compatibilityDate: compatibilityDate$O,
|
|
81698
|
+
metadata: metadata$O,
|
|
81699
|
+
schema: schema$O,
|
|
81700
|
+
type: type$O
|
|
81592
81701
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
81593
|
-
const type$
|
|
81594
|
-
const compatibilityDate$
|
|
81595
|
-
const metadata$
|
|
81702
|
+
const type$N = "com.shwfed.actions.button.http.request.json";
|
|
81703
|
+
const compatibilityDate$N = "2026-04-18";
|
|
81704
|
+
const metadata$N = {
|
|
81596
81705
|
name: "网络请求(JSON)",
|
|
81597
81706
|
icon: "fluent:cloud-arrow-up-20-regular"
|
|
81598
81707
|
};
|
|
81599
|
-
function schema$
|
|
81708
|
+
function schema$N(configure) {
|
|
81600
81709
|
const CelHttpRequest = Expression({ configure, resultType: "HttpRequest" });
|
|
81601
81710
|
const CelMessage = Expression({
|
|
81602
81711
|
configure: (env) => {
|
|
@@ -81608,8 +81717,8 @@ function schema$L(configure) {
|
|
|
81608
81717
|
resultType: "string"
|
|
81609
81718
|
});
|
|
81610
81719
|
return Struct({
|
|
81611
|
-
type: Literal2(type$
|
|
81612
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
81720
|
+
type: Literal2(type$N),
|
|
81721
|
+
compatibilityDate: Literal2(compatibilityDate$N),
|
|
81613
81722
|
expression: CelHttpRequest.annotations({
|
|
81614
81723
|
title: "请求",
|
|
81615
81724
|
description: md`
|
|
@@ -81655,21 +81764,21 @@ function schema$L(configure) {
|
|
|
81655
81764
|
}
|
|
81656
81765
|
const __vite_glob_0_1$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81657
81766
|
__proto__: null,
|
|
81658
|
-
compatibilityDate: compatibilityDate$
|
|
81659
|
-
metadata: metadata$
|
|
81660
|
-
schema: schema$
|
|
81661
|
-
type: type$
|
|
81767
|
+
compatibilityDate: compatibilityDate$N,
|
|
81768
|
+
metadata: metadata$N,
|
|
81769
|
+
schema: schema$N,
|
|
81770
|
+
type: type$N
|
|
81662
81771
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
81663
|
-
const type$
|
|
81664
|
-
const compatibilityDate$
|
|
81665
|
-
const metadata$
|
|
81772
|
+
const type$M = "com.shwfed.actions.button.prototype";
|
|
81773
|
+
const compatibilityDate$M = "2026-04-18";
|
|
81774
|
+
const metadata$M = {
|
|
81666
81775
|
name: "原型",
|
|
81667
81776
|
icon: "fluent:predictions-20-regular"
|
|
81668
81777
|
};
|
|
81669
|
-
function schema$
|
|
81778
|
+
function schema$M(_configure) {
|
|
81670
81779
|
return Struct({
|
|
81671
|
-
type: Literal2(type$
|
|
81672
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
81780
|
+
type: Literal2(type$M),
|
|
81781
|
+
compatibilityDate: Literal2(compatibilityDate$M)
|
|
81673
81782
|
}).annotations({
|
|
81674
81783
|
title: "PrototypeAction",
|
|
81675
81784
|
description: "点击无副作用的原型按钮,可被一次性转换为其它类型"
|
|
@@ -81677,23 +81786,23 @@ function schema$K(_configure) {
|
|
|
81677
81786
|
}
|
|
81678
81787
|
const __vite_glob_0_2$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81679
81788
|
__proto__: null,
|
|
81680
|
-
compatibilityDate: compatibilityDate$
|
|
81681
|
-
metadata: metadata$
|
|
81682
|
-
schema: schema$
|
|
81683
|
-
type: type$
|
|
81789
|
+
compatibilityDate: compatibilityDate$M,
|
|
81790
|
+
metadata: metadata$M,
|
|
81791
|
+
schema: schema$M,
|
|
81792
|
+
type: type$M
|
|
81684
81793
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
81685
|
-
const type$
|
|
81686
|
-
const compatibilityDate$
|
|
81687
|
-
const metadata$
|
|
81794
|
+
const type$L = "com.shwfed.actions.button.navigation";
|
|
81795
|
+
const compatibilityDate$L = "2026-04-21";
|
|
81796
|
+
const metadata$L = {
|
|
81688
81797
|
name: "导航",
|
|
81689
81798
|
icon: "fluent:link-20-regular"
|
|
81690
81799
|
};
|
|
81691
81800
|
const Mode = Literal2("_self", "_blank");
|
|
81692
|
-
function schema$
|
|
81801
|
+
function schema$L(configure) {
|
|
81693
81802
|
const CelUrl = Expression({ configure, resultType: "string" });
|
|
81694
81803
|
return Struct({
|
|
81695
|
-
type: Literal2(type$
|
|
81696
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
81804
|
+
type: Literal2(type$L),
|
|
81805
|
+
compatibilityDate: Literal2(compatibilityDate$L),
|
|
81697
81806
|
url: CelUrl.annotations({
|
|
81698
81807
|
title: "链接",
|
|
81699
81808
|
description: "点击后将打开的链接,返回 `string`"
|
|
@@ -81709,10 +81818,10 @@ function schema$J(configure) {
|
|
|
81709
81818
|
}
|
|
81710
81819
|
const __vite_glob_0_3$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81711
81820
|
__proto__: null,
|
|
81712
|
-
compatibilityDate: compatibilityDate$
|
|
81713
|
-
metadata: metadata$
|
|
81714
|
-
schema: schema$
|
|
81715
|
-
type: type$
|
|
81821
|
+
compatibilityDate: compatibilityDate$L,
|
|
81822
|
+
metadata: metadata$L,
|
|
81823
|
+
schema: schema$L,
|
|
81824
|
+
type: type$L
|
|
81716
81825
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
81717
81826
|
const blockRefCache = /* @__PURE__ */ new WeakMap();
|
|
81718
81827
|
function registerBlockRef(configure, ref2) {
|
|
@@ -81721,9 +81830,9 @@ function registerBlockRef(configure, ref2) {
|
|
|
81721
81830
|
function lookupBlockRef(configure) {
|
|
81722
81831
|
return blockRefCache.get(configure);
|
|
81723
81832
|
}
|
|
81724
|
-
const type$
|
|
81725
|
-
const compatibilityDate$
|
|
81726
|
-
const metadata$
|
|
81833
|
+
const type$K = "com.shwfed.actions.button.modal.layout";
|
|
81834
|
+
const compatibilityDate$K = "2026-05-11";
|
|
81835
|
+
const metadata$K = {
|
|
81727
81836
|
name: "模态窗口",
|
|
81728
81837
|
icon: "fluent:window-edit-20-regular",
|
|
81729
81838
|
drillable: true,
|
|
@@ -81734,12 +81843,12 @@ const metadata$I = {
|
|
|
81734
81843
|
const CssLength = String$.pipe(
|
|
81735
81844
|
filter((s) => s.trim().length > 0 || "不能为空字符串")
|
|
81736
81845
|
);
|
|
81737
|
-
function schema$
|
|
81846
|
+
function schema$K(configure) {
|
|
81738
81847
|
const blockUnion = lookupBlockRef(configure) ?? Unknown;
|
|
81739
81848
|
const ModalSlot = Slot(blockUnion, configure);
|
|
81740
81849
|
return Struct({
|
|
81741
|
-
type: Literal2(type$
|
|
81742
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
81850
|
+
type: Literal2(type$K),
|
|
81851
|
+
compatibilityDate: Literal2(compatibilityDate$K),
|
|
81743
81852
|
modalTitle: optional(Locale.annotations({
|
|
81744
81853
|
title: "弹窗标题",
|
|
81745
81854
|
description: "弹窗顶部展示的本地化标题,支持行内 Markdown;不填则回退使用按钮自身的名称"
|
|
@@ -81768,38 +81877,40 @@ function defaultBody$6() {
|
|
|
81768
81877
|
}
|
|
81769
81878
|
const __vite_glob_0_4$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81770
81879
|
__proto__: null,
|
|
81771
|
-
compatibilityDate: compatibilityDate$
|
|
81880
|
+
compatibilityDate: compatibilityDate$K,
|
|
81772
81881
|
defaultBody: defaultBody$6,
|
|
81773
|
-
metadata: metadata$
|
|
81774
|
-
schema: schema$
|
|
81775
|
-
type: type$
|
|
81882
|
+
metadata: metadata$K,
|
|
81883
|
+
schema: schema$K,
|
|
81884
|
+
type: type$K
|
|
81776
81885
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
81777
|
-
const type$
|
|
81778
|
-
const compatibilityDate$
|
|
81779
|
-
const metadata$
|
|
81886
|
+
const type$J = "com.shwfed.actions.button.event.dispatch";
|
|
81887
|
+
const compatibilityDate$J = "2026-05-15";
|
|
81888
|
+
const metadata$J = {
|
|
81780
81889
|
name: "触发事件",
|
|
81781
81890
|
icon: "fluent:flash-20-regular"
|
|
81782
81891
|
};
|
|
81783
|
-
function schema$
|
|
81892
|
+
function schema$J(_configure) {
|
|
81784
81893
|
return Struct({
|
|
81785
|
-
type: Literal2(type$
|
|
81786
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
81894
|
+
type: Literal2(type$J),
|
|
81895
|
+
compatibilityDate: Literal2(compatibilityDate$J),
|
|
81787
81896
|
// This button's entire behaviour: the op-requests it bubbles up the
|
|
81788
81897
|
// component tree on click. Stored on the button itself — there is no
|
|
81789
81898
|
// host-level trigger field any more.
|
|
81790
|
-
triggers: optional(Triggers
|
|
81899
|
+
triggers: optional(Triggers.annotations({
|
|
81900
|
+
description: '按列表顺序执行;关闭弹窗类操作的 target 是承载该弹窗的按钮实例(如行操作里的"模态窗口"按钮),而非弹窗本身'
|
|
81901
|
+
}))
|
|
81791
81902
|
});
|
|
81792
81903
|
}
|
|
81793
81904
|
const __vite_glob_0_5$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81794
81905
|
__proto__: null,
|
|
81795
|
-
compatibilityDate: compatibilityDate$
|
|
81796
|
-
metadata: metadata$
|
|
81797
|
-
schema: schema$
|
|
81798
|
-
type: type$
|
|
81906
|
+
compatibilityDate: compatibilityDate$J,
|
|
81907
|
+
metadata: metadata$J,
|
|
81908
|
+
schema: schema$J,
|
|
81909
|
+
type: type$J
|
|
81799
81910
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
81800
|
-
const type$
|
|
81801
|
-
const compatibilityDate$
|
|
81802
|
-
const metadata$
|
|
81911
|
+
const type$I = "com.shwfed.actions.button.http.download";
|
|
81912
|
+
const compatibilityDate$I = "2026-05-21";
|
|
81913
|
+
const metadata$I = {
|
|
81803
81914
|
name: "下载文件",
|
|
81804
81915
|
icon: "fluent:arrow-download-20-regular"
|
|
81805
81916
|
};
|
|
@@ -81814,13 +81925,13 @@ function configureWithJson$2(configure) {
|
|
|
81814
81925
|
env.registerVariable("json", JSON_VAR$2.type, { description: JSON_VAR$2.description });
|
|
81815
81926
|
};
|
|
81816
81927
|
}
|
|
81817
|
-
function schema$
|
|
81928
|
+
function schema$I(configure) {
|
|
81818
81929
|
const CelHttpRequest = Expression({ configure, resultType: "HttpRequest" });
|
|
81819
81930
|
const CelDownloadRequest = Expression({ configure: configureWithJson$2(configure), resultType: "HttpRequest" });
|
|
81820
81931
|
const CelMessage = Expression({ configure: configureWithJson$2(configure), resultType: "string" });
|
|
81821
81932
|
return Struct({
|
|
81822
|
-
type: Literal2(type$
|
|
81823
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
81933
|
+
type: Literal2(type$I),
|
|
81934
|
+
compatibilityDate: Literal2(compatibilityDate$I),
|
|
81824
81935
|
template: Struct({
|
|
81825
81936
|
request: CelHttpRequest.annotations({
|
|
81826
81937
|
title: "请求",
|
|
@@ -81883,25 +81994,25 @@ function schema$G(configure) {
|
|
|
81883
81994
|
const __vite_glob_0_6$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81884
81995
|
__proto__: null,
|
|
81885
81996
|
JSON_VAR: JSON_VAR$2,
|
|
81886
|
-
compatibilityDate: compatibilityDate$
|
|
81887
|
-
metadata: metadata$
|
|
81888
|
-
schema: schema$
|
|
81889
|
-
type: type$
|
|
81997
|
+
compatibilityDate: compatibilityDate$I,
|
|
81998
|
+
metadata: metadata$I,
|
|
81999
|
+
schema: schema$I,
|
|
82000
|
+
type: type$I
|
|
81890
82001
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
81891
|
-
const type$
|
|
81892
|
-
const compatibilityDate$
|
|
81893
|
-
const metadata$
|
|
82002
|
+
const type$H = "com.shwfed.actions.item.markdown";
|
|
82003
|
+
const compatibilityDate$H = "2026-05-21";
|
|
82004
|
+
const metadata$H = {
|
|
81894
82005
|
name: "内联 Markdown",
|
|
81895
82006
|
icon: "fluent:markdown-20-regular"
|
|
81896
82007
|
};
|
|
81897
|
-
function schema$
|
|
82008
|
+
function schema$H(_configure) {
|
|
81898
82009
|
return Struct({
|
|
81899
82010
|
id: UUID.annotations({ description: "Markdown 项唯一标识" }),
|
|
81900
82011
|
// Present when the item sits at group level; absent when it lives as a
|
|
81901
82012
|
// dropdown sub-item (the parent is the dropdown itself).
|
|
81902
82013
|
groupId: optional(UUID.annotations({ description: "所属按钮组标识" })),
|
|
81903
|
-
type: Literal2(type$
|
|
81904
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82014
|
+
type: Literal2(type$H),
|
|
82015
|
+
compatibilityDate: Literal2(compatibilityDate$H),
|
|
81905
82016
|
name: String$.annotations({
|
|
81906
82017
|
title: "内部名称",
|
|
81907
82018
|
description: "仅用于编辑器内识别该 Markdown 项,不会展示给最终用户"
|
|
@@ -81917,10 +82028,10 @@ function schema$F(_configure) {
|
|
|
81917
82028
|
}
|
|
81918
82029
|
const __vite_glob_3_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
81919
82030
|
__proto__: null,
|
|
81920
|
-
compatibilityDate: compatibilityDate$
|
|
81921
|
-
metadata: metadata$
|
|
81922
|
-
schema: schema$
|
|
81923
|
-
type: type$
|
|
82031
|
+
compatibilityDate: compatibilityDate$H,
|
|
82032
|
+
metadata: metadata$H,
|
|
82033
|
+
schema: schema$H,
|
|
82034
|
+
type: type$H
|
|
81924
82035
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
81925
82036
|
function defineRegistry(options) {
|
|
81926
82037
|
const {
|
|
@@ -82285,20 +82396,20 @@ function defaultActionsConfig() {
|
|
|
82285
82396
|
items: []
|
|
82286
82397
|
};
|
|
82287
82398
|
}
|
|
82288
|
-
const type$
|
|
82289
|
-
const compatibilityDate$
|
|
82290
|
-
const metadata$
|
|
82399
|
+
const type$G = "com.shwfed.block.actions";
|
|
82400
|
+
const compatibilityDate$G = "2026-05-06";
|
|
82401
|
+
const metadata$G = {
|
|
82291
82402
|
name: "操作按钮",
|
|
82292
82403
|
icon: "fluent:cursor-click-20-regular",
|
|
82293
82404
|
w: { initial: 8, min: 8, max: Infinity },
|
|
82294
82405
|
h: { initial: 2, min: 2, max: Infinity }
|
|
82295
82406
|
};
|
|
82296
|
-
function schema$
|
|
82407
|
+
function schema$G(configure, _blockRef) {
|
|
82297
82408
|
const ActionsSchema = ActionsConfig(configure);
|
|
82298
82409
|
return Struct({
|
|
82299
82410
|
id: UUID.annotations({ description: "块唯一标识" }),
|
|
82300
|
-
type: tag(type$
|
|
82301
|
-
compatibilityDate: tag(compatibilityDate$
|
|
82411
|
+
type: tag(type$G),
|
|
82412
|
+
compatibilityDate: tag(compatibilityDate$G),
|
|
82302
82413
|
actions: ActionsSchema.annotations({
|
|
82303
82414
|
title: "操作按钮配置",
|
|
82304
82415
|
description: "内嵌的 Actions 组件配置"
|
|
@@ -82313,11 +82424,11 @@ function defaultBody$5() {
|
|
|
82313
82424
|
}
|
|
82314
82425
|
const __vite_glob_0_0$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82315
82426
|
__proto__: null,
|
|
82316
|
-
compatibilityDate: compatibilityDate$
|
|
82427
|
+
compatibilityDate: compatibilityDate$G,
|
|
82317
82428
|
defaultBody: defaultBody$5,
|
|
82318
|
-
metadata: metadata$
|
|
82319
|
-
schema: schema$
|
|
82320
|
-
type: type$
|
|
82429
|
+
metadata: metadata$G,
|
|
82430
|
+
schema: schema$G,
|
|
82431
|
+
type: type$G
|
|
82321
82432
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82322
82433
|
function commonFieldFields(configure) {
|
|
82323
82434
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
@@ -82364,18 +82475,18 @@ function derivedField(configure, resultType) {
|
|
|
82364
82475
|
})
|
|
82365
82476
|
);
|
|
82366
82477
|
}
|
|
82367
|
-
const type$
|
|
82368
|
-
const compatibilityDate$
|
|
82369
|
-
const metadata$
|
|
82478
|
+
const type$F = "com.shwfed.form.field.markdown";
|
|
82479
|
+
const compatibilityDate$F = "2026-04-22";
|
|
82480
|
+
const metadata$F = {
|
|
82370
82481
|
name: "Markdown",
|
|
82371
82482
|
icon: "fluent:markdown-20-regular",
|
|
82372
82483
|
w: { initial: 8, min: 2, max: Infinity },
|
|
82373
82484
|
h: { initial: 2, min: 2, max: Infinity }
|
|
82374
82485
|
};
|
|
82375
|
-
function schema$
|
|
82486
|
+
function schema$F(configure) {
|
|
82376
82487
|
return Struct({
|
|
82377
|
-
type: Literal2(type$
|
|
82378
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82488
|
+
type: Literal2(type$F),
|
|
82489
|
+
compatibilityDate: Literal2(compatibilityDate$F),
|
|
82379
82490
|
...commonFieldFields(configure),
|
|
82380
82491
|
content: Locale.annotations({
|
|
82381
82492
|
title: "内容",
|
|
@@ -82388,24 +82499,24 @@ function schema$D(configure) {
|
|
|
82388
82499
|
}
|
|
82389
82500
|
const __vite_glob_0_0$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82390
82501
|
__proto__: null,
|
|
82391
|
-
compatibilityDate: compatibilityDate$
|
|
82392
|
-
metadata: metadata$
|
|
82393
|
-
schema: schema$
|
|
82394
|
-
type: type$
|
|
82502
|
+
compatibilityDate: compatibilityDate$F,
|
|
82503
|
+
metadata: metadata$F,
|
|
82504
|
+
schema: schema$F,
|
|
82505
|
+
type: type$F
|
|
82395
82506
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82396
|
-
const type$
|
|
82397
|
-
const compatibilityDate$
|
|
82398
|
-
const metadata$
|
|
82507
|
+
const type$E = "com.shwfed.form.field.text";
|
|
82508
|
+
const compatibilityDate$E = "2026-04-22";
|
|
82509
|
+
const metadata$E = {
|
|
82399
82510
|
name: "文本输入",
|
|
82400
82511
|
icon: "fluent:text-field-20-regular",
|
|
82401
82512
|
w: { initial: 8, min: 4, max: Infinity },
|
|
82402
82513
|
h: { initial: 2, min: 2, max: 2 }
|
|
82403
82514
|
};
|
|
82404
|
-
function schema$
|
|
82515
|
+
function schema$E(configure) {
|
|
82405
82516
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
82406
82517
|
return Struct({
|
|
82407
|
-
type: Literal2(type$
|
|
82408
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82518
|
+
type: Literal2(type$E),
|
|
82519
|
+
compatibilityDate: Literal2(compatibilityDate$E),
|
|
82409
82520
|
...commonFieldFields(configure),
|
|
82410
82521
|
label: optional(Locale.annotations({
|
|
82411
82522
|
title: "标签",
|
|
@@ -82440,24 +82551,24 @@ function schema$C(configure) {
|
|
|
82440
82551
|
}
|
|
82441
82552
|
const __vite_glob_0_1$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82442
82553
|
__proto__: null,
|
|
82443
|
-
compatibilityDate: compatibilityDate$
|
|
82444
|
-
metadata: metadata$
|
|
82445
|
-
schema: schema$
|
|
82446
|
-
type: type$
|
|
82554
|
+
compatibilityDate: compatibilityDate$E,
|
|
82555
|
+
metadata: metadata$E,
|
|
82556
|
+
schema: schema$E,
|
|
82557
|
+
type: type$E
|
|
82447
82558
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82448
|
-
const type$
|
|
82449
|
-
const compatibilityDate$
|
|
82450
|
-
const metadata$
|
|
82559
|
+
const type$D = "com.shwfed.form.field.textarea";
|
|
82560
|
+
const compatibilityDate$D = "2026-04-22";
|
|
82561
|
+
const metadata$D = {
|
|
82451
82562
|
name: "多行文本输入",
|
|
82452
82563
|
icon: "fluent:text-description-20-regular",
|
|
82453
82564
|
w: { initial: 8, min: 4, max: Infinity },
|
|
82454
82565
|
h: { initial: 3, min: 2, max: Infinity, grow: true }
|
|
82455
82566
|
};
|
|
82456
|
-
function schema$
|
|
82567
|
+
function schema$D(configure) {
|
|
82457
82568
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
82458
82569
|
return Struct({
|
|
82459
|
-
type: Literal2(type$
|
|
82460
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82570
|
+
type: Literal2(type$D),
|
|
82571
|
+
compatibilityDate: Literal2(compatibilityDate$D),
|
|
82461
82572
|
...commonFieldFields(configure),
|
|
82462
82573
|
label: optional(Locale.annotations({
|
|
82463
82574
|
title: "标签",
|
|
@@ -82496,25 +82607,25 @@ function schema$B(configure) {
|
|
|
82496
82607
|
}
|
|
82497
82608
|
const __vite_glob_0_2$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82498
82609
|
__proto__: null,
|
|
82499
|
-
compatibilityDate: compatibilityDate$
|
|
82500
|
-
metadata: metadata$
|
|
82501
|
-
schema: schema$
|
|
82502
|
-
type: type$
|
|
82610
|
+
compatibilityDate: compatibilityDate$D,
|
|
82611
|
+
metadata: metadata$D,
|
|
82612
|
+
schema: schema$D,
|
|
82613
|
+
type: type$D
|
|
82503
82614
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82504
|
-
const type$
|
|
82505
|
-
const compatibilityDate$
|
|
82506
|
-
const metadata$
|
|
82615
|
+
const type$C = "com.shwfed.form.field.actions";
|
|
82616
|
+
const compatibilityDate$C = "2026-04-24";
|
|
82617
|
+
const metadata$C = {
|
|
82507
82618
|
name: "操作",
|
|
82508
82619
|
icon: "fluent:cursor-click-20-regular",
|
|
82509
82620
|
w: { initial: 8, min: 4, max: Infinity },
|
|
82510
82621
|
h: { initial: 2, min: 2, max: Infinity }
|
|
82511
82622
|
};
|
|
82512
|
-
function schema$
|
|
82623
|
+
function schema$C(configure) {
|
|
82513
82624
|
const { fields: actionFields } = ActionSchemaFields(configure);
|
|
82514
82625
|
const { size: _size, groups, items: items2, ...rest } = actionFields;
|
|
82515
82626
|
return Struct({
|
|
82516
|
-
type: Literal2(type$
|
|
82517
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82627
|
+
type: Literal2(type$C),
|
|
82628
|
+
compatibilityDate: Literal2(compatibilityDate$C),
|
|
82518
82629
|
...commonFieldFields(configure),
|
|
82519
82630
|
...rest,
|
|
82520
82631
|
// Form's add-field factory creates new fields with only { type, compatibilityDate, id },
|
|
@@ -82528,14 +82639,14 @@ function schema$A(configure) {
|
|
|
82528
82639
|
}
|
|
82529
82640
|
const __vite_glob_0_3$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82530
82641
|
__proto__: null,
|
|
82531
|
-
compatibilityDate: compatibilityDate$
|
|
82532
|
-
metadata: metadata$
|
|
82533
|
-
schema: schema$
|
|
82534
|
-
type: type$
|
|
82642
|
+
compatibilityDate: compatibilityDate$C,
|
|
82643
|
+
metadata: metadata$C,
|
|
82644
|
+
schema: schema$C,
|
|
82645
|
+
type: type$C
|
|
82535
82646
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82536
|
-
const type$
|
|
82537
|
-
const compatibilityDate$
|
|
82538
|
-
const metadata$
|
|
82647
|
+
const type$B = "com.shwfed.form.field.combobox.single";
|
|
82648
|
+
const compatibilityDate$B = "2026-04-24";
|
|
82649
|
+
const metadata$B = {
|
|
82539
82650
|
name: "下拉单选",
|
|
82540
82651
|
icon: "fluent:chevron-down-20-regular",
|
|
82541
82652
|
w: { initial: 8, min: 4, max: Infinity },
|
|
@@ -82548,14 +82659,14 @@ function configureWithOption$1(configure) {
|
|
|
82548
82659
|
};
|
|
82549
82660
|
}
|
|
82550
82661
|
const isListType$2 = (actual) => actual === "dyn" || actual.startsWith("list");
|
|
82551
|
-
function schema$
|
|
82662
|
+
function schema$B(configure) {
|
|
82552
82663
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
82553
82664
|
const CelOptions = Expression({ configure, resultType: isListType$2 });
|
|
82554
82665
|
const CelOptionValue = Expression({ configure: configureWithOption$1(configure), resultType: "dyn" });
|
|
82555
82666
|
const LocaleOptionLabel = LocaleMarkdown({ configure: configureWithOption$1(configure) });
|
|
82556
82667
|
return Struct({
|
|
82557
|
-
type: Literal2(type$
|
|
82558
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82668
|
+
type: Literal2(type$B),
|
|
82669
|
+
compatibilityDate: Literal2(compatibilityDate$B),
|
|
82559
82670
|
...commonFieldFields(configure),
|
|
82560
82671
|
label: optional(Locale.annotations({
|
|
82561
82672
|
title: "标签",
|
|
@@ -82602,14 +82713,14 @@ function schema$z(configure) {
|
|
|
82602
82713
|
}
|
|
82603
82714
|
const __vite_glob_0_4$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82604
82715
|
__proto__: null,
|
|
82605
|
-
compatibilityDate: compatibilityDate$
|
|
82606
|
-
metadata: metadata$
|
|
82607
|
-
schema: schema$
|
|
82608
|
-
type: type$
|
|
82716
|
+
compatibilityDate: compatibilityDate$B,
|
|
82717
|
+
metadata: metadata$B,
|
|
82718
|
+
schema: schema$B,
|
|
82719
|
+
type: type$B
|
|
82609
82720
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82610
|
-
const type$
|
|
82611
|
-
const compatibilityDate$
|
|
82612
|
-
const metadata$
|
|
82721
|
+
const type$A = "com.shwfed.form.field.date";
|
|
82722
|
+
const compatibilityDate$A = "2026-04-27";
|
|
82723
|
+
const metadata$A = {
|
|
82613
82724
|
name: "日期",
|
|
82614
82725
|
icon: "fluent:calendar-ltr-20-regular",
|
|
82615
82726
|
w: { initial: 8, min: 4, max: Infinity },
|
|
@@ -82631,12 +82742,12 @@ function presetSchema$3(configure) {
|
|
|
82631
82742
|
title: "DateFieldPreset"
|
|
82632
82743
|
});
|
|
82633
82744
|
}
|
|
82634
|
-
function schema$
|
|
82745
|
+
function schema$A(configure) {
|
|
82635
82746
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
82636
82747
|
const Preset = presetSchema$3(configure);
|
|
82637
82748
|
return Struct({
|
|
82638
|
-
type: Literal2(type$
|
|
82639
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82749
|
+
type: Literal2(type$A),
|
|
82750
|
+
compatibilityDate: Literal2(compatibilityDate$A),
|
|
82640
82751
|
...commonFieldFields(configure),
|
|
82641
82752
|
label: optional(Locale.annotations({
|
|
82642
82753
|
title: "标签",
|
|
@@ -82683,14 +82794,14 @@ function schema$y(configure) {
|
|
|
82683
82794
|
}
|
|
82684
82795
|
const __vite_glob_0_5$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82685
82796
|
__proto__: null,
|
|
82686
|
-
compatibilityDate: compatibilityDate$
|
|
82687
|
-
metadata: metadata$
|
|
82797
|
+
compatibilityDate: compatibilityDate$A,
|
|
82798
|
+
metadata: metadata$A,
|
|
82688
82799
|
presetSchema: presetSchema$3,
|
|
82689
|
-
schema: schema$
|
|
82690
|
-
type: type$
|
|
82800
|
+
schema: schema$A,
|
|
82801
|
+
type: type$A
|
|
82691
82802
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82692
|
-
const type$
|
|
82693
|
-
const compatibilityDate$
|
|
82803
|
+
const type$z = "com.shwfed.form.field.daterange";
|
|
82804
|
+
const compatibilityDate$z = "2026-04-27";
|
|
82694
82805
|
const BindingPath$3 = String$.pipe(minLength(1));
|
|
82695
82806
|
const SplitBinding$3 = Tuple(BindingPath$3, BindingPath$3).pipe(
|
|
82696
82807
|
filter(([a, b]) => a !== b, {
|
|
@@ -82701,7 +82812,7 @@ const bindingSchema$3 = Union2(BindingPath$3, SplitBinding$3).annotations({
|
|
|
82701
82812
|
title: "绑定路径",
|
|
82702
82813
|
description: "写入表单状态的 `dot-prop` 路径;填写单个路径时写入 `[start, end]` 字符串数组,例如 `event.range`;填写 `[起始路径, 结束路径]` 元组时分别写入两端;留空则为非受控字段"
|
|
82703
82814
|
});
|
|
82704
|
-
const metadata$
|
|
82815
|
+
const metadata$z = {
|
|
82705
82816
|
name: "日期范围",
|
|
82706
82817
|
icon: "fluent:calendar-arrow-right-20-regular",
|
|
82707
82818
|
w: { initial: 10, min: 10, max: Infinity },
|
|
@@ -82727,12 +82838,12 @@ function presetSchema$2(configure) {
|
|
|
82727
82838
|
title: "DateRangeFieldPreset"
|
|
82728
82839
|
});
|
|
82729
82840
|
}
|
|
82730
|
-
function schema$
|
|
82841
|
+
function schema$z(configure) {
|
|
82731
82842
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
82732
82843
|
const Preset = presetSchema$2(configure);
|
|
82733
82844
|
return Struct({
|
|
82734
|
-
type: Literal2(type$
|
|
82735
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82845
|
+
type: Literal2(type$z),
|
|
82846
|
+
compatibilityDate: Literal2(compatibilityDate$z),
|
|
82736
82847
|
...commonFieldFields(configure),
|
|
82737
82848
|
label: optional(Locale.annotations({
|
|
82738
82849
|
title: "标签",
|
|
@@ -82791,16 +82902,16 @@ function defaults$6() {
|
|
|
82791
82902
|
}
|
|
82792
82903
|
const __vite_glob_0_6$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82793
82904
|
__proto__: null,
|
|
82794
|
-
compatibilityDate: compatibilityDate$
|
|
82905
|
+
compatibilityDate: compatibilityDate$z,
|
|
82795
82906
|
defaults: defaults$6,
|
|
82796
|
-
metadata: metadata$
|
|
82907
|
+
metadata: metadata$z,
|
|
82797
82908
|
presetSchema: presetSchema$2,
|
|
82798
|
-
schema: schema$
|
|
82799
|
-
type: type$
|
|
82909
|
+
schema: schema$z,
|
|
82910
|
+
type: type$z
|
|
82800
82911
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82801
|
-
const type$
|
|
82802
|
-
const compatibilityDate$
|
|
82803
|
-
const metadata$
|
|
82912
|
+
const type$y = "com.shwfed.form.field.datetime";
|
|
82913
|
+
const compatibilityDate$y = "2026-04-27";
|
|
82914
|
+
const metadata$y = {
|
|
82804
82915
|
name: "日期时间",
|
|
82805
82916
|
icon: "fluent:calendar-clock-20-regular",
|
|
82806
82917
|
w: { initial: 8, min: 4, max: Infinity },
|
|
@@ -82832,12 +82943,12 @@ function presetSchema$1(configure) {
|
|
|
82832
82943
|
title: "DateTimeFieldPreset"
|
|
82833
82944
|
});
|
|
82834
82945
|
}
|
|
82835
|
-
function schema$
|
|
82946
|
+
function schema$y(configure) {
|
|
82836
82947
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
82837
82948
|
const Preset = presetSchema$1(configure);
|
|
82838
82949
|
return Struct({
|
|
82839
|
-
type: Literal2(type$
|
|
82840
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
82950
|
+
type: Literal2(type$y),
|
|
82951
|
+
compatibilityDate: Literal2(compatibilityDate$y),
|
|
82841
82952
|
...commonFieldFields(configure),
|
|
82842
82953
|
label: optional(Locale.annotations({
|
|
82843
82954
|
title: "标签",
|
|
@@ -82895,14 +83006,14 @@ const __vite_glob_0_7$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.d
|
|
|
82895
83006
|
HOUR_CYCLE_OPTIONS: HOUR_CYCLE_OPTIONS$3,
|
|
82896
83007
|
TIME_GRANULARITIES: TIME_GRANULARITIES$3,
|
|
82897
83008
|
TIME_GRANULARITY_OPTIONS: TIME_GRANULARITY_OPTIONS$3,
|
|
82898
|
-
compatibilityDate: compatibilityDate$
|
|
82899
|
-
metadata: metadata$
|
|
83009
|
+
compatibilityDate: compatibilityDate$y,
|
|
83010
|
+
metadata: metadata$y,
|
|
82900
83011
|
presetSchema: presetSchema$1,
|
|
82901
|
-
schema: schema$
|
|
82902
|
-
type: type$
|
|
83012
|
+
schema: schema$y,
|
|
83013
|
+
type: type$y
|
|
82903
83014
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
82904
|
-
const type$
|
|
82905
|
-
const compatibilityDate$
|
|
83015
|
+
const type$x = "com.shwfed.form.field.datetimerange";
|
|
83016
|
+
const compatibilityDate$x = "2026-04-27";
|
|
82906
83017
|
const BindingPath$2 = String$.pipe(minLength(1));
|
|
82907
83018
|
const SplitBinding$2 = Tuple(BindingPath$2, BindingPath$2).pipe(
|
|
82908
83019
|
filter(([a, b]) => a !== b, {
|
|
@@ -82913,7 +83024,7 @@ const bindingSchema$2 = Union2(BindingPath$2, SplitBinding$2).annotations({
|
|
|
82913
83024
|
title: "绑定路径",
|
|
82914
83025
|
description: "写入表单状态的 `dot-prop` 路径;填写单个路径时写入 `[start, end]` 字符串数组,例如 `event.range`;填写 `[起始路径, 结束路径]` 元组时分别写入两端;留空则为非受控字段"
|
|
82915
83026
|
});
|
|
82916
|
-
const metadata$
|
|
83027
|
+
const metadata$x = {
|
|
82917
83028
|
name: "日期时间范围",
|
|
82918
83029
|
icon: "fluent:calendar-clock-20-regular",
|
|
82919
83030
|
w: { initial: 14, min: 14, max: Infinity },
|
|
@@ -82949,12 +83060,12 @@ function presetSchema(configure) {
|
|
|
82949
83060
|
title: "DateTimeRangeFieldPreset"
|
|
82950
83061
|
});
|
|
82951
83062
|
}
|
|
82952
|
-
function schema$
|
|
83063
|
+
function schema$x(configure) {
|
|
82953
83064
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
82954
83065
|
const Preset = presetSchema(configure);
|
|
82955
83066
|
return Struct({
|
|
82956
|
-
type: Literal2(type$
|
|
82957
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
83067
|
+
type: Literal2(type$x),
|
|
83068
|
+
compatibilityDate: Literal2(compatibilityDate$x),
|
|
82958
83069
|
...commonFieldFields(configure),
|
|
82959
83070
|
label: optional(Locale.annotations({
|
|
82960
83071
|
title: "标签",
|
|
@@ -83024,16 +83135,16 @@ const __vite_glob_0_8$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.d
|
|
|
83024
83135
|
HOUR_CYCLE_OPTIONS: HOUR_CYCLE_OPTIONS$2,
|
|
83025
83136
|
TIME_GRANULARITIES: TIME_GRANULARITIES$2,
|
|
83026
83137
|
TIME_GRANULARITY_OPTIONS: TIME_GRANULARITY_OPTIONS$2,
|
|
83027
|
-
compatibilityDate: compatibilityDate$
|
|
83138
|
+
compatibilityDate: compatibilityDate$x,
|
|
83028
83139
|
defaults: defaults$5,
|
|
83029
|
-
metadata: metadata$
|
|
83140
|
+
metadata: metadata$x,
|
|
83030
83141
|
presetSchema,
|
|
83031
|
-
schema: schema$
|
|
83032
|
-
type: type$
|
|
83142
|
+
schema: schema$x,
|
|
83143
|
+
type: type$x
|
|
83033
83144
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
83034
|
-
const type$
|
|
83035
|
-
const compatibilityDate$
|
|
83036
|
-
const metadata$
|
|
83145
|
+
const type$w = "com.shwfed.form.field.time";
|
|
83146
|
+
const compatibilityDate$w = "2026-04-27";
|
|
83147
|
+
const metadata$w = {
|
|
83037
83148
|
name: "时间",
|
|
83038
83149
|
icon: "fluent:clock-20-regular",
|
|
83039
83150
|
w: { initial: 8, min: 4, max: Infinity },
|
|
@@ -83049,11 +83160,11 @@ const HOUR_CYCLE_OPTIONS$1 = [
|
|
|
83049
83160
|
{ value: 24, label: "24 小时制" },
|
|
83050
83161
|
{ value: 12, label: "12 小时制" }
|
|
83051
83162
|
];
|
|
83052
|
-
function schema$
|
|
83163
|
+
function schema$w(configure) {
|
|
83053
83164
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
83054
83165
|
return Struct({
|
|
83055
|
-
type: Literal2(type$
|
|
83056
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
83166
|
+
type: Literal2(type$w),
|
|
83167
|
+
compatibilityDate: Literal2(compatibilityDate$w),
|
|
83057
83168
|
...commonFieldFields(configure),
|
|
83058
83169
|
label: optional(Locale.annotations({
|
|
83059
83170
|
title: "标签",
|
|
@@ -83099,13 +83210,13 @@ const __vite_glob_0_9$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.d
|
|
|
83099
83210
|
HOUR_CYCLE_OPTIONS: HOUR_CYCLE_OPTIONS$1,
|
|
83100
83211
|
TIME_GRANULARITIES: TIME_GRANULARITIES$1,
|
|
83101
83212
|
TIME_GRANULARITY_OPTIONS: TIME_GRANULARITY_OPTIONS$1,
|
|
83102
|
-
compatibilityDate: compatibilityDate$
|
|
83103
|
-
metadata: metadata$
|
|
83104
|
-
schema: schema$
|
|
83105
|
-
type: type$
|
|
83213
|
+
compatibilityDate: compatibilityDate$w,
|
|
83214
|
+
metadata: metadata$w,
|
|
83215
|
+
schema: schema$w,
|
|
83216
|
+
type: type$w
|
|
83106
83217
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
83107
|
-
const type$
|
|
83108
|
-
const compatibilityDate$
|
|
83218
|
+
const type$v = "com.shwfed.form.field.timerange";
|
|
83219
|
+
const compatibilityDate$v = "2026-04-27";
|
|
83109
83220
|
const BindingPath$1 = String$.pipe(minLength(1));
|
|
83110
83221
|
const SplitBinding$1 = Tuple(BindingPath$1, BindingPath$1).pipe(
|
|
83111
83222
|
filter(([a, b]) => a !== b, {
|
|
@@ -83116,7 +83227,7 @@ const bindingSchema$1 = Union2(BindingPath$1, SplitBinding$1).annotations({
|
|
|
83116
83227
|
title: "绑定路径",
|
|
83117
83228
|
description: "写入表单状态的 `dot-prop` 路径;填写单个路径时写入 `[start, end]` 字符串数组,例如 `meeting.timeRange`;填写 `[起始路径, 结束路径]` 元组时分别写入两端;留空则为非受控字段"
|
|
83118
83229
|
});
|
|
83119
|
-
const metadata$
|
|
83230
|
+
const metadata$v = {
|
|
83120
83231
|
name: "时间范围",
|
|
83121
83232
|
icon: "fluent:clock-arrow-download-20-regular",
|
|
83122
83233
|
w: { initial: 14, min: 14, max: Infinity },
|
|
@@ -83132,11 +83243,11 @@ const HOUR_CYCLE_OPTIONS = [
|
|
|
83132
83243
|
{ value: 24, label: "24 小时制" },
|
|
83133
83244
|
{ value: 12, label: "12 小时制" }
|
|
83134
83245
|
];
|
|
83135
|
-
function schema$
|
|
83246
|
+
function schema$v(configure) {
|
|
83136
83247
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
83137
83248
|
return Struct({
|
|
83138
|
-
type: Literal2(type$
|
|
83139
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
83249
|
+
type: Literal2(type$v),
|
|
83250
|
+
compatibilityDate: Literal2(compatibilityDate$v),
|
|
83140
83251
|
...commonFieldFields(configure),
|
|
83141
83252
|
label: optional(Locale.annotations({
|
|
83142
83253
|
title: "标签",
|
|
@@ -83186,26 +83297,26 @@ const __vite_glob_0_10$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
83186
83297
|
HOUR_CYCLE_OPTIONS,
|
|
83187
83298
|
TIME_GRANULARITIES,
|
|
83188
83299
|
TIME_GRANULARITY_OPTIONS,
|
|
83189
|
-
compatibilityDate: compatibilityDate$
|
|
83300
|
+
compatibilityDate: compatibilityDate$v,
|
|
83190
83301
|
defaults: defaults$4,
|
|
83191
|
-
metadata: metadata$
|
|
83192
|
-
schema: schema$
|
|
83193
|
-
type: type$
|
|
83302
|
+
metadata: metadata$v,
|
|
83303
|
+
schema: schema$v,
|
|
83304
|
+
type: type$v
|
|
83194
83305
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
83195
|
-
const type$
|
|
83196
|
-
const compatibilityDate$
|
|
83197
|
-
const metadata$
|
|
83306
|
+
const type$u = "com.shwfed.form.field.number";
|
|
83307
|
+
const compatibilityDate$u = "2026-04-28";
|
|
83308
|
+
const metadata$u = {
|
|
83198
83309
|
name: "数值输入",
|
|
83199
83310
|
icon: "fluent:number-symbol-20-regular",
|
|
83200
83311
|
w: { initial: 8, min: 4, max: Infinity },
|
|
83201
83312
|
h: { initial: 2, min: 2, max: 2 }
|
|
83202
83313
|
};
|
|
83203
|
-
function schema$
|
|
83314
|
+
function schema$u(configure) {
|
|
83204
83315
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
83205
83316
|
const CelNumber = Expression({ configure, resultType: "number" });
|
|
83206
83317
|
return Struct({
|
|
83207
|
-
type: Literal2(type$
|
|
83208
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
83318
|
+
type: Literal2(type$u),
|
|
83319
|
+
compatibilityDate: Literal2(compatibilityDate$u),
|
|
83209
83320
|
...commonFieldFields(configure),
|
|
83210
83321
|
label: optional(Locale.annotations({
|
|
83211
83322
|
title: "标签",
|
|
@@ -83264,13 +83375,13 @@ function schema$s(configure) {
|
|
|
83264
83375
|
}
|
|
83265
83376
|
const __vite_glob_0_11$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
83266
83377
|
__proto__: null,
|
|
83267
|
-
compatibilityDate: compatibilityDate$
|
|
83268
|
-
metadata: metadata$
|
|
83269
|
-
schema: schema$
|
|
83270
|
-
type: type$
|
|
83378
|
+
compatibilityDate: compatibilityDate$u,
|
|
83379
|
+
metadata: metadata$u,
|
|
83380
|
+
schema: schema$u,
|
|
83381
|
+
type: type$u
|
|
83271
83382
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
83272
|
-
const type$
|
|
83273
|
-
const compatibilityDate$
|
|
83383
|
+
const type$t = "com.shwfed.form.field.numberrange";
|
|
83384
|
+
const compatibilityDate$t = "2026-04-28";
|
|
83274
83385
|
const BindingPath = String$.pipe(minLength(1));
|
|
83275
83386
|
const SplitBinding = Tuple(BindingPath, BindingPath).pipe(
|
|
83276
83387
|
filter(([a, b]) => a !== b, {
|
|
@@ -83281,18 +83392,18 @@ const bindingSchema = Union2(BindingPath, SplitBinding).annotations({
|
|
|
83281
83392
|
title: "绑定路径",
|
|
83282
83393
|
description: "写入表单状态的 `dot-prop` 路径;填写单个路径时写入 `[start, end]` 数值数组,例如 `score.range`;填写 `[起始路径, 结束路径]` 元组时分别写入两端;留空则为非受控字段"
|
|
83283
83394
|
});
|
|
83284
|
-
const metadata$
|
|
83395
|
+
const metadata$t = {
|
|
83285
83396
|
name: "数值范围",
|
|
83286
83397
|
icon: "fluent:arrow-bidirectional-left-right-20-regular",
|
|
83287
83398
|
w: { initial: 8, min: 4, max: Infinity },
|
|
83288
83399
|
h: { initial: 2, min: 2, max: 2 }
|
|
83289
83400
|
};
|
|
83290
|
-
function schema$
|
|
83401
|
+
function schema$t(configure) {
|
|
83291
83402
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
83292
83403
|
const CelNumber = Expression({ configure, resultType: "number" });
|
|
83293
83404
|
return Struct({
|
|
83294
|
-
type: Literal2(type$
|
|
83295
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
83405
|
+
type: Literal2(type$t),
|
|
83406
|
+
compatibilityDate: Literal2(compatibilityDate$t),
|
|
83296
83407
|
...commonFieldFields(configure),
|
|
83297
83408
|
label: optional(Locale.annotations({
|
|
83298
83409
|
title: "标签",
|
|
@@ -83359,25 +83470,25 @@ function defaults$3() {
|
|
|
83359
83470
|
}
|
|
83360
83471
|
const __vite_glob_0_12$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
83361
83472
|
__proto__: null,
|
|
83362
|
-
compatibilityDate: compatibilityDate$
|
|
83473
|
+
compatibilityDate: compatibilityDate$t,
|
|
83363
83474
|
defaults: defaults$3,
|
|
83364
|
-
metadata: metadata$
|
|
83365
|
-
schema: schema$
|
|
83366
|
-
type: type$
|
|
83475
|
+
metadata: metadata$t,
|
|
83476
|
+
schema: schema$t,
|
|
83477
|
+
type: type$t
|
|
83367
83478
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
83368
|
-
const type$
|
|
83369
|
-
const compatibilityDate$
|
|
83370
|
-
const metadata$
|
|
83479
|
+
const type$s = "com.shwfed.form.field.switch";
|
|
83480
|
+
const compatibilityDate$s = "2026-04-28";
|
|
83481
|
+
const metadata$s = {
|
|
83371
83482
|
name: "开关",
|
|
83372
83483
|
icon: "fluent:toggle-left-20-regular",
|
|
83373
83484
|
w: { initial: 4, min: 4, max: Infinity },
|
|
83374
83485
|
h: { initial: 2, min: 2, max: 2 }
|
|
83375
83486
|
};
|
|
83376
|
-
function schema$
|
|
83487
|
+
function schema$s(configure) {
|
|
83377
83488
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
83378
83489
|
return Struct({
|
|
83379
|
-
type: Literal2(type$
|
|
83380
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
83490
|
+
type: Literal2(type$s),
|
|
83491
|
+
compatibilityDate: Literal2(compatibilityDate$s),
|
|
83381
83492
|
...commonFieldFields(configure),
|
|
83382
83493
|
label: optional(Locale.annotations({
|
|
83383
83494
|
title: "标签",
|
|
@@ -83413,12 +83524,12 @@ function schema$q(configure) {
|
|
|
83413
83524
|
description: "布尔开关"
|
|
83414
83525
|
});
|
|
83415
83526
|
}
|
|
83416
|
-
const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
83527
|
+
const __vite_glob_0_13$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
83417
83528
|
__proto__: null,
|
|
83418
|
-
compatibilityDate: compatibilityDate$
|
|
83419
|
-
metadata: metadata$
|
|
83420
|
-
schema: schema$
|
|
83421
|
-
type: type$
|
|
83529
|
+
compatibilityDate: compatibilityDate$s,
|
|
83530
|
+
metadata: metadata$s,
|
|
83531
|
+
schema: schema$s,
|
|
83532
|
+
type: type$s
|
|
83422
83533
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
83423
83534
|
const decodeCache = {};
|
|
83424
83535
|
function getDecodeCache(exclude2) {
|
|
@@ -87711,7 +87822,7 @@ function _class(obj) {
|
|
|
87711
87822
|
function isString(obj) {
|
|
87712
87823
|
return _class(obj) === "[object String]";
|
|
87713
87824
|
}
|
|
87714
|
-
function isObject$
|
|
87825
|
+
function isObject$2(obj) {
|
|
87715
87826
|
return _class(obj) === "[object Object]";
|
|
87716
87827
|
}
|
|
87717
87828
|
function isRegExp(obj) {
|
|
@@ -87838,7 +87949,7 @@ function compile(self2) {
|
|
|
87838
87949
|
}
|
|
87839
87950
|
const compiled = { validate: null, link: null };
|
|
87840
87951
|
self2.__compiled__[name] = compiled;
|
|
87841
|
-
if (isObject$
|
|
87952
|
+
if (isObject$2(val)) {
|
|
87842
87953
|
if (isRegExp(val.validate)) {
|
|
87843
87954
|
compiled.validate = createValidator(val.validate);
|
|
87844
87955
|
} else if (isFunction(val.validate)) {
|
|
@@ -88669,9 +88780,9 @@ function interpolateMarkdown(template, $cel, context2) {
|
|
|
88669
88780
|
}
|
|
88670
88781
|
});
|
|
88671
88782
|
}
|
|
88672
|
-
const type$
|
|
88673
|
-
const compatibilityDate$
|
|
88674
|
-
const metadata$
|
|
88783
|
+
const type$r = "com.shwfed.form.field.combobox.single";
|
|
88784
|
+
const compatibilityDate$r = "2026-04-29";
|
|
88785
|
+
const metadata$r = {
|
|
88675
88786
|
name: "下拉单选(硬编码)",
|
|
88676
88787
|
icon: "fluent:chevron-down-20-regular",
|
|
88677
88788
|
w: { initial: 8, min: 4, max: Infinity },
|
|
@@ -88706,12 +88817,12 @@ function itemSchema$3(configure) {
|
|
|
88706
88817
|
title: "ComboboxSingleItem"
|
|
88707
88818
|
});
|
|
88708
88819
|
}
|
|
88709
|
-
function schema$
|
|
88820
|
+
function schema$r(configure) {
|
|
88710
88821
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
88711
88822
|
const Item = itemSchema$3(configure);
|
|
88712
88823
|
return Struct({
|
|
88713
|
-
type: Literal2(type$
|
|
88714
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
88824
|
+
type: Literal2(type$r),
|
|
88825
|
+
compatibilityDate: Literal2(compatibilityDate$r),
|
|
88715
88826
|
...commonFieldFields(configure),
|
|
88716
88827
|
label: optional(Locale.annotations({
|
|
88717
88828
|
title: "标签",
|
|
@@ -88764,7 +88875,7 @@ function formatErrorMessage(err) {
|
|
|
88764
88875
|
return String(err);
|
|
88765
88876
|
}
|
|
88766
88877
|
}
|
|
88767
|
-
const migrate = (prev, ctx) => {
|
|
88878
|
+
const migrate$2 = (prev, ctx) => {
|
|
88768
88879
|
const legacy = prev;
|
|
88769
88880
|
return gen(function* () {
|
|
88770
88881
|
const rawOptions = yield* mapError$1(
|
|
@@ -88803,23 +88914,23 @@ const migrate = (prev, ctx) => {
|
|
|
88803
88914
|
} = legacy;
|
|
88804
88915
|
return {
|
|
88805
88916
|
...carryover,
|
|
88806
|
-
compatibilityDate: compatibilityDate$
|
|
88917
|
+
compatibilityDate: compatibilityDate$r,
|
|
88807
88918
|
items: items2
|
|
88808
88919
|
};
|
|
88809
88920
|
});
|
|
88810
88921
|
};
|
|
88811
|
-
const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
88922
|
+
const __vite_glob_0_14$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
88812
88923
|
__proto__: null,
|
|
88813
|
-
compatibilityDate: compatibilityDate$
|
|
88924
|
+
compatibilityDate: compatibilityDate$r,
|
|
88814
88925
|
itemSchema: itemSchema$3,
|
|
88815
|
-
metadata: metadata$
|
|
88816
|
-
migrate,
|
|
88817
|
-
schema: schema$
|
|
88818
|
-
type: type$
|
|
88926
|
+
metadata: metadata$r,
|
|
88927
|
+
migrate: migrate$2,
|
|
88928
|
+
schema: schema$r,
|
|
88929
|
+
type: type$r
|
|
88819
88930
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
88820
|
-
const type$
|
|
88821
|
-
const compatibilityDate$
|
|
88822
|
-
const metadata$
|
|
88931
|
+
const type$q = "com.shwfed.form.field.upload";
|
|
88932
|
+
const compatibilityDate$q = "2026-05-12";
|
|
88933
|
+
const metadata$q = {
|
|
88823
88934
|
name: "文件上传",
|
|
88824
88935
|
icon: "fluent:cloud-arrow-up-20-regular",
|
|
88825
88936
|
w: { initial: 8, min: 8, max: Infinity },
|
|
@@ -88836,14 +88947,14 @@ function configureWithJson$1(configure) {
|
|
|
88836
88947
|
env.registerVariable("json", JSON_VAR$1.type, { description: JSON_VAR$1.description });
|
|
88837
88948
|
};
|
|
88838
88949
|
}
|
|
88839
|
-
function schema$
|
|
88950
|
+
function schema$q(configure) {
|
|
88840
88951
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
88841
88952
|
const CelHttpRequest = Expression({ configure, resultType: "HttpRequest" });
|
|
88842
88953
|
const CelDownloadRequest = Expression({ configure: configureWithJson$1(configure), resultType: "HttpRequest" });
|
|
88843
88954
|
const LocaleMd = LocaleMarkdown({ configure });
|
|
88844
88955
|
return Struct({
|
|
88845
|
-
type: Literal2(type$
|
|
88846
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
88956
|
+
type: Literal2(type$q),
|
|
88957
|
+
compatibilityDate: Literal2(compatibilityDate$q),
|
|
88847
88958
|
...commonFieldFields(configure),
|
|
88848
88959
|
label: optional(Locale.annotations({
|
|
88849
88960
|
title: "标签",
|
|
@@ -88923,14 +89034,14 @@ function schema$o(configure) {
|
|
|
88923
89034
|
const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
88924
89035
|
__proto__: null,
|
|
88925
89036
|
JSON_VAR: JSON_VAR$1,
|
|
88926
|
-
compatibilityDate: compatibilityDate$
|
|
88927
|
-
metadata: metadata$
|
|
88928
|
-
schema: schema$
|
|
88929
|
-
type: type$
|
|
89037
|
+
compatibilityDate: compatibilityDate$q,
|
|
89038
|
+
metadata: metadata$q,
|
|
89039
|
+
schema: schema$q,
|
|
89040
|
+
type: type$q
|
|
88930
89041
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
88931
|
-
const type$
|
|
88932
|
-
const compatibilityDate$
|
|
88933
|
-
const metadata$
|
|
89042
|
+
const type$p = "com.shwfed.form.field.combobox.single.remote";
|
|
89043
|
+
const compatibilityDate$p = "2026-05-13";
|
|
89044
|
+
const metadata$p = {
|
|
88934
89045
|
name: "下拉单选(远程)",
|
|
88935
89046
|
icon: "fluent:cloud-arrow-down-20-regular",
|
|
88936
89047
|
w: { initial: 8, min: 4, max: Infinity },
|
|
@@ -88959,15 +89070,15 @@ function configureWithJson(configure) {
|
|
|
88959
89070
|
};
|
|
88960
89071
|
}
|
|
88961
89072
|
const isListType$1 = (actual) => actual === "dyn" || actual.startsWith("list");
|
|
88962
|
-
function schema$
|
|
89073
|
+
function schema$p(configure) {
|
|
88963
89074
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
88964
89075
|
const CelHttpRequest = Expression({ configure, resultType: "HttpRequest" });
|
|
88965
89076
|
const CelOptions = Expression({ configure: configureWithJson(configure), resultType: isListType$1 });
|
|
88966
89077
|
const CelOptionValue = Expression({ configure: configureWithOption(configure), resultType: "dyn" });
|
|
88967
89078
|
const LocaleOptionLabel = LocaleMarkdown({ configure: configureWithOption(configure) });
|
|
88968
89079
|
return Struct({
|
|
88969
|
-
type: Literal2(type$
|
|
88970
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
89080
|
+
type: Literal2(type$p),
|
|
89081
|
+
compatibilityDate: Literal2(compatibilityDate$p),
|
|
88971
89082
|
...commonFieldFields(configure),
|
|
88972
89083
|
label: optional(Locale.annotations({
|
|
88973
89084
|
title: "标签",
|
|
@@ -89020,20 +89131,20 @@ const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
89020
89131
|
__proto__: null,
|
|
89021
89132
|
JSON_VAR,
|
|
89022
89133
|
OPTION_VAR,
|
|
89023
|
-
compatibilityDate: compatibilityDate$
|
|
89024
|
-
metadata: metadata$
|
|
89025
|
-
schema: schema$
|
|
89026
|
-
type: type$
|
|
89134
|
+
compatibilityDate: compatibilityDate$p,
|
|
89135
|
+
metadata: metadata$p,
|
|
89136
|
+
schema: schema$p,
|
|
89137
|
+
type: type$p
|
|
89027
89138
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
89028
|
-
const type$
|
|
89029
|
-
const compatibilityDate$
|
|
89030
|
-
const metadata$
|
|
89139
|
+
const type$o = "com.shwfed.form.field.list";
|
|
89140
|
+
const compatibilityDate$o = "2026-05-13";
|
|
89141
|
+
const metadata$o = {
|
|
89031
89142
|
name: "列表",
|
|
89032
89143
|
icon: "fluent:list-20-regular",
|
|
89033
89144
|
w: { initial: 12, min: 4, max: Infinity },
|
|
89034
89145
|
h: { initial: 6, min: 4, max: Infinity, grow: true }
|
|
89035
89146
|
};
|
|
89036
|
-
function schema$
|
|
89147
|
+
function schema$o(configure) {
|
|
89037
89148
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
89038
89149
|
const unitConfigure = (env) => {
|
|
89039
89150
|
configure(env);
|
|
@@ -89047,8 +89158,8 @@ function schema$m(configure) {
|
|
|
89047
89158
|
};
|
|
89048
89159
|
const Unit = suspend(() => FormUnit(unitConfigure));
|
|
89049
89160
|
return Struct({
|
|
89050
|
-
type: Literal2(type$
|
|
89051
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
89161
|
+
type: Literal2(type$o),
|
|
89162
|
+
compatibilityDate: Literal2(compatibilityDate$o),
|
|
89052
89163
|
...commonFieldFields(configure),
|
|
89053
89164
|
label: optional(Locale.annotations({
|
|
89054
89165
|
title: "标签",
|
|
@@ -89115,15 +89226,15 @@ function defaults$2() {
|
|
|
89115
89226
|
}
|
|
89116
89227
|
const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
89117
89228
|
__proto__: null,
|
|
89118
|
-
compatibilityDate: compatibilityDate$
|
|
89229
|
+
compatibilityDate: compatibilityDate$o,
|
|
89119
89230
|
defaults: defaults$2,
|
|
89120
|
-
metadata: metadata$
|
|
89121
|
-
schema: schema$
|
|
89122
|
-
type: type$
|
|
89231
|
+
metadata: metadata$o,
|
|
89232
|
+
schema: schema$o,
|
|
89233
|
+
type: type$o
|
|
89123
89234
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
89124
|
-
const type$
|
|
89125
|
-
const compatibilityDate$
|
|
89126
|
-
const metadata$
|
|
89235
|
+
const type$n = "com.shwfed.form.field.checkbox.group";
|
|
89236
|
+
const compatibilityDate$n = "2026-05-17";
|
|
89237
|
+
const metadata$n = {
|
|
89127
89238
|
name: "复选框组",
|
|
89128
89239
|
icon: "fluent:checkbox-checked-20-regular",
|
|
89129
89240
|
w: { initial: 8, min: 2, max: Infinity },
|
|
@@ -89158,12 +89269,12 @@ function itemSchema$2(configure) {
|
|
|
89158
89269
|
title: "CheckboxGroupItem"
|
|
89159
89270
|
});
|
|
89160
89271
|
}
|
|
89161
|
-
function schema$
|
|
89272
|
+
function schema$n(configure) {
|
|
89162
89273
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
89163
89274
|
const Item = itemSchema$2(configure);
|
|
89164
89275
|
return Struct({
|
|
89165
|
-
type: Literal2(type$
|
|
89166
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
89276
|
+
type: Literal2(type$n),
|
|
89277
|
+
compatibilityDate: Literal2(compatibilityDate$n),
|
|
89167
89278
|
...commonFieldFields(configure),
|
|
89168
89279
|
label: optional(Locale.annotations({
|
|
89169
89280
|
title: "标签",
|
|
@@ -89197,15 +89308,15 @@ function schema$l(configure) {
|
|
|
89197
89308
|
}
|
|
89198
89309
|
const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
89199
89310
|
__proto__: null,
|
|
89200
|
-
compatibilityDate: compatibilityDate$
|
|
89311
|
+
compatibilityDate: compatibilityDate$n,
|
|
89201
89312
|
itemSchema: itemSchema$2,
|
|
89202
|
-
metadata: metadata$
|
|
89203
|
-
schema: schema$
|
|
89204
|
-
type: type$
|
|
89313
|
+
metadata: metadata$n,
|
|
89314
|
+
schema: schema$n,
|
|
89315
|
+
type: type$n
|
|
89205
89316
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
89206
|
-
const type$
|
|
89207
|
-
const compatibilityDate$
|
|
89208
|
-
const metadata$
|
|
89317
|
+
const type$m = "com.shwfed.form.field.radio.group";
|
|
89318
|
+
const compatibilityDate$m = "2026-05-17";
|
|
89319
|
+
const metadata$m = {
|
|
89209
89320
|
name: "单选框组",
|
|
89210
89321
|
icon: "fluent:radio-button-20-regular",
|
|
89211
89322
|
w: { initial: 8, min: 2, max: Infinity },
|
|
@@ -89240,12 +89351,12 @@ function itemSchema$1(configure) {
|
|
|
89240
89351
|
title: "RadioGroupItem"
|
|
89241
89352
|
});
|
|
89242
89353
|
}
|
|
89243
|
-
function schema$
|
|
89354
|
+
function schema$m(configure) {
|
|
89244
89355
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
89245
89356
|
const Item = itemSchema$1(configure);
|
|
89246
89357
|
return Struct({
|
|
89247
|
-
type: Literal2(type$
|
|
89248
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
89358
|
+
type: Literal2(type$m),
|
|
89359
|
+
compatibilityDate: Literal2(compatibilityDate$m),
|
|
89249
89360
|
...commonFieldFields(configure),
|
|
89250
89361
|
label: optional(Locale.annotations({
|
|
89251
89362
|
title: "标签",
|
|
@@ -89279,11 +89390,11 @@ function schema$k(configure) {
|
|
|
89279
89390
|
}
|
|
89280
89391
|
const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
89281
89392
|
__proto__: null,
|
|
89282
|
-
compatibilityDate: compatibilityDate$
|
|
89393
|
+
compatibilityDate: compatibilityDate$m,
|
|
89283
89394
|
itemSchema: itemSchema$1,
|
|
89284
|
-
metadata: metadata$
|
|
89285
|
-
schema: schema$
|
|
89286
|
-
type: type$
|
|
89395
|
+
metadata: metadata$m,
|
|
89396
|
+
schema: schema$m,
|
|
89397
|
+
type: type$m
|
|
89287
89398
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
89288
89399
|
const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
89289
89400
|
const stringToIcon = (value, validate2, allowSimpleName, provider = "") => {
|
|
@@ -90767,14 +90878,14 @@ function LocaleMarkdownWithRow(configure) {
|
|
|
90767
90878
|
function derivedRowField(configure, resultType) {
|
|
90768
90879
|
return derivedField(configureWithRow(configure), resultType);
|
|
90769
90880
|
}
|
|
90770
|
-
const type$
|
|
90771
|
-
const compatibilityDate$
|
|
90772
|
-
const metadata$
|
|
90881
|
+
const type$l = "com.shwfed.table.column.actions";
|
|
90882
|
+
const compatibilityDate$l = "2026-04-14";
|
|
90883
|
+
const metadata$l = {
|
|
90773
90884
|
name: "操作",
|
|
90774
90885
|
icon: "fluent:cursor-click-20-regular"
|
|
90775
90886
|
};
|
|
90776
90887
|
const registerRowVariables = registerRowVariablesIfAbsent;
|
|
90777
|
-
function schema$
|
|
90888
|
+
function schema$l(configure) {
|
|
90778
90889
|
const configureWithRow2 = (env) => {
|
|
90779
90890
|
configure(env);
|
|
90780
90891
|
registerRowVariables(env);
|
|
@@ -90782,8 +90893,8 @@ function schema$j(configure) {
|
|
|
90782
90893
|
const { fields: actionFields } = ActionSchemaFields(configureWithRow2);
|
|
90783
90894
|
const { size: _buttonSize, ...actionFieldsForColumn } = actionFields;
|
|
90784
90895
|
return Struct({
|
|
90785
|
-
type: Literal2(type$
|
|
90786
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
90896
|
+
type: Literal2(type$l),
|
|
90897
|
+
compatibilityDate: Literal2(compatibilityDate$l),
|
|
90787
90898
|
...columnIdentityFields(),
|
|
90788
90899
|
title: optional(Locale.annotations({ title: "标题", description: "列标题" })),
|
|
90789
90900
|
size: optional(Number$.pipe(finite(), positive()).annotations({
|
|
@@ -90797,7 +90908,7 @@ function schema$j(configure) {
|
|
|
90797
90908
|
...actionFieldsForColumn
|
|
90798
90909
|
}).annotations({ title: "ActionsRenderer", description: "操作渲染器" });
|
|
90799
90910
|
}
|
|
90800
|
-
function toColumnDef$
|
|
90911
|
+
function toColumnDef$e(value, { getLocaleText }) {
|
|
90801
90912
|
return {
|
|
90802
90913
|
header: value.title ? getLocaleText(value.title) : void 0,
|
|
90803
90914
|
enableSorting: false,
|
|
@@ -90810,23 +90921,23 @@ function toColumnDef$c(value, { getLocaleText }) {
|
|
|
90810
90921
|
}
|
|
90811
90922
|
const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
90812
90923
|
__proto__: null,
|
|
90813
|
-
compatibilityDate: compatibilityDate$
|
|
90814
|
-
metadata: metadata$
|
|
90924
|
+
compatibilityDate: compatibilityDate$l,
|
|
90925
|
+
metadata: metadata$l,
|
|
90815
90926
|
registerRowVariables,
|
|
90816
|
-
schema: schema$
|
|
90817
|
-
toColumnDef: toColumnDef$
|
|
90818
|
-
type: type$
|
|
90927
|
+
schema: schema$l,
|
|
90928
|
+
toColumnDef: toColumnDef$e,
|
|
90929
|
+
type: type$l
|
|
90819
90930
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
90820
|
-
const type$
|
|
90821
|
-
const compatibilityDate$
|
|
90822
|
-
const metadata$
|
|
90931
|
+
const type$k = "com.shwfed.table.column.date";
|
|
90932
|
+
const compatibilityDate$k = "2026-04-14";
|
|
90933
|
+
const metadata$k = {
|
|
90823
90934
|
name: "日期",
|
|
90824
90935
|
icon: "fluent:calendar-ltr-20-regular"
|
|
90825
90936
|
};
|
|
90826
|
-
function schema$
|
|
90937
|
+
function schema$k(configure) {
|
|
90827
90938
|
return Struct({
|
|
90828
|
-
type: Literal2(type$
|
|
90829
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
90939
|
+
type: Literal2(type$k),
|
|
90940
|
+
compatibilityDate: Literal2(compatibilityDate$k),
|
|
90830
90941
|
...columnFields(configure),
|
|
90831
90942
|
align: optionalWith(Align.annotations({ title: "对齐" }), { default: () => "left" }),
|
|
90832
90943
|
format: String$.annotations({
|
|
@@ -90837,7 +90948,7 @@ function schema$i(configure) {
|
|
|
90837
90948
|
})
|
|
90838
90949
|
}).annotations({ title: "DateRenderer", description: "日期渲染器" });
|
|
90839
90950
|
}
|
|
90840
|
-
function toColumnDef$
|
|
90951
|
+
function toColumnDef$d(value, { getLocaleText, $cel, inheritedContext }) {
|
|
90841
90952
|
return {
|
|
90842
90953
|
header: getLocaleText(value.title),
|
|
90843
90954
|
accessorFn: (row, index) => {
|
|
@@ -90858,22 +90969,22 @@ function toColumnDef$b(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
90858
90969
|
}
|
|
90859
90970
|
const __vite_glob_0_1$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
90860
90971
|
__proto__: null,
|
|
90861
|
-
compatibilityDate: compatibilityDate$
|
|
90862
|
-
metadata: metadata$
|
|
90863
|
-
schema: schema$
|
|
90864
|
-
toColumnDef: toColumnDef$
|
|
90865
|
-
type: type$
|
|
90972
|
+
compatibilityDate: compatibilityDate$k,
|
|
90973
|
+
metadata: metadata$k,
|
|
90974
|
+
schema: schema$k,
|
|
90975
|
+
toColumnDef: toColumnDef$d,
|
|
90976
|
+
type: type$k
|
|
90866
90977
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
90867
|
-
const type$
|
|
90868
|
-
const compatibilityDate$
|
|
90869
|
-
const metadata$
|
|
90978
|
+
const type$j = "com.shwfed.table.column.icon";
|
|
90979
|
+
const compatibilityDate$j = "2026-04-14";
|
|
90980
|
+
const metadata$j = {
|
|
90870
90981
|
name: "图标",
|
|
90871
90982
|
icon: "fluent:shapes-20-regular"
|
|
90872
90983
|
};
|
|
90873
|
-
function schema$
|
|
90984
|
+
function schema$j(configure) {
|
|
90874
90985
|
return Struct({
|
|
90875
|
-
type: Literal2(type$
|
|
90876
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
90986
|
+
type: Literal2(type$j),
|
|
90987
|
+
compatibilityDate: Literal2(compatibilityDate$j),
|
|
90877
90988
|
...columnFields(configure),
|
|
90878
90989
|
accessor: CelRowAccess(configure).annotations({
|
|
90879
90990
|
title: "图标",
|
|
@@ -90888,7 +90999,7 @@ function schema$h(configure) {
|
|
|
90888
90999
|
align: optionalWith(Align.annotations({ title: "对齐" }), { default: () => "center" })
|
|
90889
91000
|
}).annotations({ title: "IconRenderer", description: "图标渲染器" });
|
|
90890
91001
|
}
|
|
90891
|
-
function toColumnDef$
|
|
91002
|
+
function toColumnDef$c(value, { getLocaleText, $cel, inheritedContext }) {
|
|
90892
91003
|
return {
|
|
90893
91004
|
header: getLocaleText(value.title),
|
|
90894
91005
|
accessorFn: (row, index) => {
|
|
@@ -90909,25 +91020,25 @@ function toColumnDef$a(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
90909
91020
|
}
|
|
90910
91021
|
const __vite_glob_0_2$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
90911
91022
|
__proto__: null,
|
|
90912
|
-
compatibilityDate: compatibilityDate$
|
|
90913
|
-
metadata: metadata$
|
|
90914
|
-
schema: schema$
|
|
90915
|
-
toColumnDef: toColumnDef$
|
|
90916
|
-
type: type$
|
|
91023
|
+
compatibilityDate: compatibilityDate$j,
|
|
91024
|
+
metadata: metadata$j,
|
|
91025
|
+
schema: schema$j,
|
|
91026
|
+
toColumnDef: toColumnDef$c,
|
|
91027
|
+
type: type$j
|
|
90917
91028
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
90918
|
-
const type$
|
|
90919
|
-
const compatibilityDate$
|
|
90920
|
-
const metadata$
|
|
91029
|
+
const type$i = "com.shwfed.table.column.markdown";
|
|
91030
|
+
const compatibilityDate$i = "2026-04-14";
|
|
91031
|
+
const metadata$i = {
|
|
90921
91032
|
name: "MD",
|
|
90922
91033
|
icon: "fluent:markdown-20-regular"
|
|
90923
91034
|
};
|
|
90924
91035
|
const isCopyExpressionType$1 = (t) => t === "string" || t === "dyn" || t.startsWith("optional");
|
|
90925
|
-
function schema$
|
|
91036
|
+
function schema$i(configure) {
|
|
90926
91037
|
const cel = CelRowAccess(configure, { resultType: isCopyExpressionType$1 });
|
|
90927
91038
|
const localeMarkdown = LocaleMarkdownWithRow(configure);
|
|
90928
91039
|
return Struct({
|
|
90929
|
-
type: Literal2(type$
|
|
90930
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
91040
|
+
type: Literal2(type$i),
|
|
91041
|
+
compatibilityDate: Literal2(compatibilityDate$i),
|
|
90931
91042
|
...columnIdentityFields(),
|
|
90932
91043
|
title: Locale.annotations({ title: "标题", description: "列标题" }),
|
|
90933
91044
|
align: optionalWith(Align.annotations({ title: "对齐" }), { default: () => "left" }),
|
|
@@ -90953,7 +91064,7 @@ function schema$g(configure) {
|
|
|
90953
91064
|
}))
|
|
90954
91065
|
}).annotations({ title: "MarkdownRenderer", description: "MD" });
|
|
90955
91066
|
}
|
|
90956
|
-
function toColumnDef$
|
|
91067
|
+
function toColumnDef$b(value, { getLocaleText }) {
|
|
90957
91068
|
return {
|
|
90958
91069
|
header: getLocaleText(value.title),
|
|
90959
91070
|
enableSorting: false,
|
|
@@ -90966,22 +91077,22 @@ function toColumnDef$9(value, { getLocaleText }) {
|
|
|
90966
91077
|
}
|
|
90967
91078
|
const __vite_glob_0_3$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
90968
91079
|
__proto__: null,
|
|
90969
|
-
compatibilityDate: compatibilityDate$
|
|
90970
|
-
metadata: metadata$
|
|
90971
|
-
schema: schema$
|
|
90972
|
-
toColumnDef: toColumnDef$
|
|
90973
|
-
type: type$
|
|
91080
|
+
compatibilityDate: compatibilityDate$i,
|
|
91081
|
+
metadata: metadata$i,
|
|
91082
|
+
schema: schema$i,
|
|
91083
|
+
toColumnDef: toColumnDef$b,
|
|
91084
|
+
type: type$i
|
|
90974
91085
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
90975
|
-
const type$
|
|
90976
|
-
const compatibilityDate$
|
|
90977
|
-
const metadata$
|
|
91086
|
+
const type$h = "com.shwfed.table.column.number";
|
|
91087
|
+
const compatibilityDate$h = "2026-04-14";
|
|
91088
|
+
const metadata$h = {
|
|
90978
91089
|
name: "数值",
|
|
90979
91090
|
icon: "fluent:number-symbol-20-regular"
|
|
90980
91091
|
};
|
|
90981
|
-
function schema$
|
|
91092
|
+
function schema$h(configure) {
|
|
90982
91093
|
return Struct({
|
|
90983
|
-
type: Literal2(type$
|
|
90984
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
91094
|
+
type: Literal2(type$h),
|
|
91095
|
+
compatibilityDate: Literal2(compatibilityDate$h),
|
|
90985
91096
|
...columnFields(configure),
|
|
90986
91097
|
align: optionalWith(Align.annotations({ title: "对齐" }), { default: () => "right" }),
|
|
90987
91098
|
displayMode: optionalWith(
|
|
@@ -91001,7 +91112,7 @@ function schema$f(configure) {
|
|
|
91001
91112
|
}))
|
|
91002
91113
|
}).annotations({ title: "NumberRenderer", description: "数值渲染器" });
|
|
91003
91114
|
}
|
|
91004
|
-
function toColumnDef$
|
|
91115
|
+
function toColumnDef$a(value, { getLocaleText, $cel, inheritedContext }) {
|
|
91005
91116
|
return {
|
|
91006
91117
|
header: getLocaleText(value.title),
|
|
91007
91118
|
accessorFn: (row, index) => {
|
|
@@ -91022,24 +91133,24 @@ function toColumnDef$8(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
91022
91133
|
}
|
|
91023
91134
|
const __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91024
91135
|
__proto__: null,
|
|
91025
|
-
compatibilityDate: compatibilityDate$
|
|
91026
|
-
metadata: metadata$
|
|
91027
|
-
schema: schema$
|
|
91028
|
-
toColumnDef: toColumnDef$
|
|
91029
|
-
type: type$
|
|
91136
|
+
compatibilityDate: compatibilityDate$h,
|
|
91137
|
+
metadata: metadata$h,
|
|
91138
|
+
schema: schema$h,
|
|
91139
|
+
toColumnDef: toColumnDef$a,
|
|
91140
|
+
type: type$h
|
|
91030
91141
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91031
91142
|
const __vite_glob_2_5 = {};
|
|
91032
91143
|
const _stubVue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91033
91144
|
__proto__: null,
|
|
91034
91145
|
default: __vite_glob_2_5
|
|
91035
91146
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91036
|
-
const type$
|
|
91037
|
-
const compatibilityDate$
|
|
91038
|
-
const metadata$
|
|
91147
|
+
const type$g = "com.shwfed.table.column.select";
|
|
91148
|
+
const compatibilityDate$g = "2026-04-14";
|
|
91149
|
+
const metadata$g = {
|
|
91039
91150
|
name: "选择",
|
|
91040
91151
|
icon: "fluent:checkbox-checked-20-regular"
|
|
91041
91152
|
};
|
|
91042
|
-
function schema$
|
|
91153
|
+
function schema$g(configure) {
|
|
91043
91154
|
const CelRowSelectionPredicate = Expression({
|
|
91044
91155
|
configure: (env) => {
|
|
91045
91156
|
configure(env);
|
|
@@ -91048,8 +91159,8 @@ function schema$e(configure) {
|
|
|
91048
91159
|
resultType: "bool"
|
|
91049
91160
|
});
|
|
91050
91161
|
return Struct({
|
|
91051
|
-
type: Literal2(type$
|
|
91052
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
91162
|
+
type: Literal2(type$g),
|
|
91163
|
+
compatibilityDate: Literal2(compatibilityDate$g),
|
|
91053
91164
|
...columnIdentityFields(),
|
|
91054
91165
|
mode: optionalWith(Literal2("radio", "checkbox").annotations({
|
|
91055
91166
|
title: "模式",
|
|
@@ -91069,7 +91180,7 @@ function schema$e(configure) {
|
|
|
91069
91180
|
})
|
|
91070
91181
|
}).annotations({ title: "SelectRenderer", description: "选择渲染器" });
|
|
91071
91182
|
}
|
|
91072
|
-
function toColumnDef$
|
|
91183
|
+
function toColumnDef$9(value) {
|
|
91073
91184
|
return {
|
|
91074
91185
|
header: (ctx) => vueExports.h(__vite_glob_2_5, { column: value, ctx }),
|
|
91075
91186
|
size: 40,
|
|
@@ -91080,24 +91191,24 @@ function toColumnDef$7(value) {
|
|
|
91080
91191
|
}
|
|
91081
91192
|
const __vite_glob_0_5$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91082
91193
|
__proto__: null,
|
|
91083
|
-
compatibilityDate: compatibilityDate$
|
|
91084
|
-
metadata: metadata$
|
|
91085
|
-
schema: schema$
|
|
91086
|
-
toColumnDef: toColumnDef$
|
|
91087
|
-
type: type$
|
|
91194
|
+
compatibilityDate: compatibilityDate$g,
|
|
91195
|
+
metadata: metadata$g,
|
|
91196
|
+
schema: schema$g,
|
|
91197
|
+
toColumnDef: toColumnDef$9,
|
|
91198
|
+
type: type$g
|
|
91088
91199
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91089
|
-
const type$
|
|
91090
|
-
const compatibilityDate$
|
|
91091
|
-
const metadata$
|
|
91200
|
+
const type$f = "com.shwfed.table.column.text";
|
|
91201
|
+
const compatibilityDate$f = "2026-04-14";
|
|
91202
|
+
const metadata$f = {
|
|
91092
91203
|
name: "文本",
|
|
91093
91204
|
icon: "fluent:text-field-20-regular"
|
|
91094
91205
|
};
|
|
91095
91206
|
const isCopyExpressionType = (t) => t === "string" || t === "dyn" || t.startsWith("optional");
|
|
91096
|
-
function schema$
|
|
91207
|
+
function schema$f(configure) {
|
|
91097
91208
|
const cel = CelRowAccess(configure, { resultType: isCopyExpressionType });
|
|
91098
91209
|
return Struct({
|
|
91099
|
-
type: Literal2(type$
|
|
91100
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
91210
|
+
type: Literal2(type$f),
|
|
91211
|
+
compatibilityDate: Literal2(compatibilityDate$f),
|
|
91101
91212
|
...columnFields(configure),
|
|
91102
91213
|
align: optionalWith(Align.annotations({ title: "对齐" }), { default: () => "left" }),
|
|
91103
91214
|
displayMode: optionalWith(
|
|
@@ -91113,7 +91224,7 @@ function schema$d(configure) {
|
|
|
91113
91224
|
}))
|
|
91114
91225
|
}).annotations({ title: "TextRenderer", description: "文本渲染器" });
|
|
91115
91226
|
}
|
|
91116
|
-
function toColumnDef$
|
|
91227
|
+
function toColumnDef$8(value, { getLocaleText, $cel, inheritedContext }) {
|
|
91117
91228
|
return {
|
|
91118
91229
|
header: getLocaleText(value.title),
|
|
91119
91230
|
accessorFn: (row, index) => {
|
|
@@ -91135,19 +91246,19 @@ function toColumnDef$6(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
91135
91246
|
}
|
|
91136
91247
|
const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91137
91248
|
__proto__: null,
|
|
91138
|
-
compatibilityDate: compatibilityDate$
|
|
91139
|
-
metadata: metadata$
|
|
91140
|
-
schema: schema$
|
|
91141
|
-
toColumnDef: toColumnDef$
|
|
91142
|
-
type: type$
|
|
91249
|
+
compatibilityDate: compatibilityDate$f,
|
|
91250
|
+
metadata: metadata$f,
|
|
91251
|
+
schema: schema$f,
|
|
91252
|
+
toColumnDef: toColumnDef$8,
|
|
91253
|
+
type: type$f
|
|
91143
91254
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91144
|
-
const type$
|
|
91145
|
-
const compatibilityDate$
|
|
91146
|
-
const metadata$
|
|
91255
|
+
const type$e = "com.shwfed.table.column.switch.remote";
|
|
91256
|
+
const compatibilityDate$e = "2026-05-13";
|
|
91257
|
+
const metadata$e = {
|
|
91147
91258
|
name: "开关(远程)",
|
|
91148
91259
|
icon: "fluent:toggle-left-20-regular"
|
|
91149
91260
|
};
|
|
91150
|
-
function schema$
|
|
91261
|
+
function schema$e(configure) {
|
|
91151
91262
|
const CelBool = CelRowAccess(configure, { resultType: "bool" });
|
|
91152
91263
|
const CelOnChange = Expression({
|
|
91153
91264
|
configure: (env) => {
|
|
@@ -91165,8 +91276,8 @@ function schema$c(configure) {
|
|
|
91165
91276
|
resultType: "string"
|
|
91166
91277
|
});
|
|
91167
91278
|
return Struct({
|
|
91168
|
-
type: Literal2(type$
|
|
91169
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
91279
|
+
type: Literal2(type$e),
|
|
91280
|
+
compatibilityDate: Literal2(compatibilityDate$e),
|
|
91170
91281
|
...columnFields(configure),
|
|
91171
91282
|
align: optionalWith(Align.annotations({ title: "对齐" }), { default: () => "center" }),
|
|
91172
91283
|
disabled: optional(CelBool.annotations({
|
|
@@ -91187,7 +91298,19 @@ function schema$c(configure) {
|
|
|
91187
91298
|
}))
|
|
91188
91299
|
}).annotations({ title: "SwitchRenderer", description: "开关渲染器(可编辑)" });
|
|
91189
91300
|
}
|
|
91190
|
-
|
|
91301
|
+
const migrateFrom$1 = [
|
|
91302
|
+
{ type: "com.shwfed.table.column.switch", compatibilityDate: compatibilityDate$e }
|
|
91303
|
+
];
|
|
91304
|
+
const migrate$1 = (prev) => try_({
|
|
91305
|
+
try: () => {
|
|
91306
|
+
if (!prev || typeof prev !== "object") {
|
|
91307
|
+
throw new Error("开关(远程)迁移失败:原值不是对象");
|
|
91308
|
+
}
|
|
91309
|
+
return { ...prev, type: type$e, compatibilityDate: compatibilityDate$e };
|
|
91310
|
+
},
|
|
91311
|
+
catch: (e) => e instanceof Error ? e : new Error(String(e))
|
|
91312
|
+
});
|
|
91313
|
+
function toColumnDef$7(value, { getLocaleText, $cel, inheritedContext }) {
|
|
91191
91314
|
return {
|
|
91192
91315
|
header: getLocaleText(value.title),
|
|
91193
91316
|
accessorFn: (row, index) => {
|
|
@@ -91209,13 +91332,89 @@ function toColumnDef$5(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
91209
91332
|
}
|
|
91210
91333
|
const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91211
91334
|
__proto__: null,
|
|
91212
|
-
compatibilityDate: compatibilityDate$
|
|
91213
|
-
metadata: metadata$
|
|
91214
|
-
|
|
91215
|
-
|
|
91216
|
-
|
|
91335
|
+
compatibilityDate: compatibilityDate$e,
|
|
91336
|
+
metadata: metadata$e,
|
|
91337
|
+
migrate: migrate$1,
|
|
91338
|
+
migrateFrom: migrateFrom$1,
|
|
91339
|
+
schema: schema$e,
|
|
91340
|
+
toColumnDef: toColumnDef$7,
|
|
91341
|
+
type: type$e
|
|
91342
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
91343
|
+
const type$d = "com.shwfed.table.column.switch";
|
|
91344
|
+
const compatibilityDate$d = "2026-05-13";
|
|
91345
|
+
const metadata$d = {
|
|
91346
|
+
name: "开关(远程)",
|
|
91347
|
+
icon: "fluent:toggle-left-20-regular"
|
|
91348
|
+
};
|
|
91349
|
+
function schema$d(configure) {
|
|
91350
|
+
const CelBool = CelRowAccess(configure, { resultType: "bool" });
|
|
91351
|
+
const CelOnChange = Expression({
|
|
91352
|
+
configure: (env) => {
|
|
91353
|
+
configure(env);
|
|
91354
|
+
registerRowVariablesIfAbsent(env);
|
|
91355
|
+
env.registerVariable("value", "bool", { description: "切换后的新值" });
|
|
91356
|
+
},
|
|
91357
|
+
resultType: "HttpRequest"
|
|
91358
|
+
});
|
|
91359
|
+
const CelMessage = Expression({
|
|
91360
|
+
configure: (env) => {
|
|
91361
|
+
configure(env);
|
|
91362
|
+
env.registerVariable("json", "dyn", { description: "HTTP 响应体(已解析 JSON)" });
|
|
91363
|
+
},
|
|
91364
|
+
resultType: "string"
|
|
91365
|
+
});
|
|
91366
|
+
return Struct({
|
|
91367
|
+
type: Literal2(type$d),
|
|
91368
|
+
compatibilityDate: Literal2(compatibilityDate$d),
|
|
91369
|
+
...columnFields(configure),
|
|
91370
|
+
align: optionalWith(Align.annotations({ title: "对齐" }), { default: () => "center" }),
|
|
91371
|
+
disabled: optional(CelBool.annotations({
|
|
91372
|
+
title: "禁用条件",
|
|
91373
|
+
description: "返回 `true` 时开关仍然渲染但不可切换"
|
|
91374
|
+
})),
|
|
91375
|
+
onChange: optional(CelOnChange.annotations({
|
|
91376
|
+
title: "切换请求",
|
|
91377
|
+
description: "用户切换后立即求值并发起的 HTTP 请求;`value` 为切换后的新值。未配置时开关只读"
|
|
91378
|
+
})),
|
|
91379
|
+
successMessage: optional(CelMessage.annotations({
|
|
91380
|
+
title: "成功消息",
|
|
91381
|
+
description: "请求成功后弹出的 toast 内容;未配置则静默"
|
|
91382
|
+
})),
|
|
91383
|
+
triggers: optional(Triggers.annotations({
|
|
91384
|
+
title: "成功后触发",
|
|
91385
|
+
description: "请求成功后按列表顺序冒泡的操作请求;未配置则什么都不做"
|
|
91386
|
+
}))
|
|
91387
|
+
}).annotations({ title: "SwitchRenderer", description: "开关渲染器(可编辑)" });
|
|
91388
|
+
}
|
|
91389
|
+
function toColumnDef$6(value, { getLocaleText, $cel, inheritedContext }) {
|
|
91390
|
+
return {
|
|
91391
|
+
header: getLocaleText(value.title),
|
|
91392
|
+
accessorFn: (row, index) => {
|
|
91393
|
+
try {
|
|
91394
|
+
return runSync($cel(value.accessor, { ...inheritedContext, row, index }));
|
|
91395
|
+
} catch (e) {
|
|
91396
|
+
console.error("[shwfed-table] switch accessor failed", e);
|
|
91397
|
+
return void 0;
|
|
91398
|
+
}
|
|
91399
|
+
},
|
|
91400
|
+
enableSorting: value.enableSorting ?? false,
|
|
91401
|
+
sortingFn: "basic",
|
|
91402
|
+
size: value.size,
|
|
91403
|
+
meta: {
|
|
91404
|
+
grow: value.grow ?? false,
|
|
91405
|
+
tooltip: getLocaleText(value.tooltip)
|
|
91406
|
+
}
|
|
91407
|
+
};
|
|
91408
|
+
}
|
|
91409
|
+
const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91410
|
+
__proto__: null,
|
|
91411
|
+
compatibilityDate: compatibilityDate$d,
|
|
91412
|
+
metadata: metadata$d,
|
|
91413
|
+
schema: schema$d,
|
|
91414
|
+
toColumnDef: toColumnDef$6,
|
|
91415
|
+
type: type$d
|
|
91217
91416
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91218
|
-
const isObject = (value) => {
|
|
91417
|
+
const isObject$1 = (value) => {
|
|
91219
91418
|
const type2 = typeof value;
|
|
91220
91419
|
return value !== null && (type2 === "object" || type2 === "function");
|
|
91221
91420
|
};
|
|
@@ -91393,7 +91592,7 @@ function normalizePath(path) {
|
|
|
91393
91592
|
return [];
|
|
91394
91593
|
}
|
|
91395
91594
|
function getProperty(object2, path, value) {
|
|
91396
|
-
if (!isObject(object2) || typeof path !== "string" && !Array.isArray(path)) {
|
|
91595
|
+
if (!isObject$1(object2) || typeof path !== "string" && !Array.isArray(path)) {
|
|
91397
91596
|
return value === void 0 ? object2 : value;
|
|
91398
91597
|
}
|
|
91399
91598
|
const pathArray = normalizePath(path);
|
|
@@ -91412,9 +91611,9 @@ function getProperty(object2, path, value) {
|
|
|
91412
91611
|
}
|
|
91413
91612
|
return object2 === void 0 ? value : object2;
|
|
91414
91613
|
}
|
|
91415
|
-
const type$
|
|
91416
|
-
const compatibilityDate$
|
|
91417
|
-
const metadata$
|
|
91614
|
+
const type$c = "com.shwfed.table.column.combobox-single";
|
|
91615
|
+
const compatibilityDate$c = "2026-05-20";
|
|
91616
|
+
const metadata$c = {
|
|
91418
91617
|
name: "下拉单选",
|
|
91419
91618
|
icon: "fluent:chevron-down-20-regular"
|
|
91420
91619
|
};
|
|
@@ -91447,12 +91646,12 @@ function itemSchema(configure) {
|
|
|
91447
91646
|
title: "ComboboxSingleItem"
|
|
91448
91647
|
});
|
|
91449
91648
|
}
|
|
91450
|
-
function schema$
|
|
91649
|
+
function schema$c(configure) {
|
|
91451
91650
|
const CelBool = CelRowAccess(configure, { resultType: "bool" });
|
|
91452
91651
|
const Item = itemSchema(configure);
|
|
91453
91652
|
return Struct({
|
|
91454
|
-
type: Literal2(type$
|
|
91455
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
91653
|
+
type: Literal2(type$c),
|
|
91654
|
+
compatibilityDate: Literal2(compatibilityDate$c),
|
|
91456
91655
|
...editableColumnFields(),
|
|
91457
91656
|
placeholder: optional(Locale.annotations({
|
|
91458
91657
|
title: "占位符",
|
|
@@ -91477,7 +91676,7 @@ function schema$b(configure) {
|
|
|
91477
91676
|
}), { default: () => [] })
|
|
91478
91677
|
}).annotations({ title: "ComboboxSingleRenderer", description: "下拉单选渲染器(可编辑)" });
|
|
91479
91678
|
}
|
|
91480
|
-
function toColumnDef$
|
|
91679
|
+
function toColumnDef$5(value, { getLocaleText }) {
|
|
91481
91680
|
return {
|
|
91482
91681
|
header: editableHeader(getLocaleText(value.title)),
|
|
91483
91682
|
// `binding` is a dot-prop path (validated non-empty); the cell renderer
|
|
@@ -91498,27 +91697,27 @@ function toColumnDef$4(value, { getLocaleText }) {
|
|
|
91498
91697
|
}
|
|
91499
91698
|
};
|
|
91500
91699
|
}
|
|
91501
|
-
const
|
|
91700
|
+
const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91502
91701
|
__proto__: null,
|
|
91503
|
-
compatibilityDate: compatibilityDate$
|
|
91702
|
+
compatibilityDate: compatibilityDate$c,
|
|
91504
91703
|
itemSchema,
|
|
91505
|
-
metadata: metadata$
|
|
91506
|
-
schema: schema$
|
|
91507
|
-
toColumnDef: toColumnDef$
|
|
91508
|
-
type: type$
|
|
91704
|
+
metadata: metadata$c,
|
|
91705
|
+
schema: schema$c,
|
|
91706
|
+
toColumnDef: toColumnDef$5,
|
|
91707
|
+
type: type$c
|
|
91509
91708
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
91510
|
-
const type$
|
|
91511
|
-
const compatibilityDate$
|
|
91512
|
-
const metadata$
|
|
91709
|
+
const type$b = "com.shwfed.table.column.number-input";
|
|
91710
|
+
const compatibilityDate$b = "2026-05-20";
|
|
91711
|
+
const metadata$b = {
|
|
91513
91712
|
name: "数值输入",
|
|
91514
91713
|
icon: "fluent:number-symbol-20-regular"
|
|
91515
91714
|
};
|
|
91516
|
-
function schema$
|
|
91715
|
+
function schema$b(configure) {
|
|
91517
91716
|
const CelBool = CelRowAccess(configure, { resultType: "bool" });
|
|
91518
91717
|
const CelNumber = CelRowAccess(configure, { resultType: "number" });
|
|
91519
91718
|
return Struct({
|
|
91520
|
-
type: Literal2(type$
|
|
91521
|
-
compatibilityDate: Literal2(compatibilityDate$
|
|
91719
|
+
type: Literal2(type$b),
|
|
91720
|
+
compatibilityDate: Literal2(compatibilityDate$b),
|
|
91522
91721
|
...editableColumnFields(),
|
|
91523
91722
|
placeholder: optional(Locale.annotations({
|
|
91524
91723
|
title: "占位符",
|
|
@@ -91563,7 +91762,7 @@ function schema$a(configure) {
|
|
|
91563
91762
|
derived: derivedRowField(configure, "number")
|
|
91564
91763
|
}).annotations({ title: "NumberInputRenderer", description: "数值输入渲染器(可编辑)" });
|
|
91565
91764
|
}
|
|
91566
|
-
function toColumnDef$
|
|
91765
|
+
function toColumnDef$4(value, { getLocaleText }) {
|
|
91567
91766
|
return {
|
|
91568
91767
|
header: editableHeader(getLocaleText(value.title)),
|
|
91569
91768
|
// `binding` is a dot-prop path (validated non-empty); the cell renderer
|
|
@@ -91584,10 +91783,87 @@ function toColumnDef$3(value, { getLocaleText }) {
|
|
|
91584
91783
|
}
|
|
91585
91784
|
};
|
|
91586
91785
|
}
|
|
91587
|
-
const
|
|
91786
|
+
const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91787
|
+
__proto__: null,
|
|
91788
|
+
compatibilityDate: compatibilityDate$b,
|
|
91789
|
+
metadata: metadata$b,
|
|
91790
|
+
schema: schema$b,
|
|
91791
|
+
toColumnDef: toColumnDef$4,
|
|
91792
|
+
type: type$b
|
|
91793
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
91794
|
+
const type$a = "com.shwfed.table.column.switch.local";
|
|
91795
|
+
const compatibilityDate$a = "2026-05-20";
|
|
91796
|
+
const metadata$a = {
|
|
91797
|
+
name: "开关",
|
|
91798
|
+
icon: "fluent:toggle-left-20-regular"
|
|
91799
|
+
};
|
|
91800
|
+
function schema$a(configure) {
|
|
91801
|
+
const CelBool = CelRowAccess(configure, { resultType: "bool" });
|
|
91802
|
+
return Struct({
|
|
91803
|
+
type: Literal2(type$a),
|
|
91804
|
+
compatibilityDate: Literal2(compatibilityDate$a),
|
|
91805
|
+
...editableColumnFields(),
|
|
91806
|
+
hidden: optional(CelBool.annotations({
|
|
91807
|
+
title: "隐藏条件",
|
|
91808
|
+
description: "返回 `true` 时该行的开关不渲染(其余行不受影响)"
|
|
91809
|
+
})),
|
|
91810
|
+
disabled: optional(CelBool.annotations({
|
|
91811
|
+
title: "禁用条件",
|
|
91812
|
+
description: "返回 `true` 时开关仍然渲染但不可切换"
|
|
91813
|
+
})),
|
|
91814
|
+
readonly: optional(CelBool.annotations({
|
|
91815
|
+
title: "只读条件",
|
|
91816
|
+
description: "返回 `true` 时仅以纯文本展示当前值"
|
|
91817
|
+
})),
|
|
91818
|
+
trueLabel: optional(Locale.annotations({
|
|
91819
|
+
title: "开启文案",
|
|
91820
|
+
description: "只读状态下,值为 `true` 时展示的文本;留空使用默认 `是`"
|
|
91821
|
+
})),
|
|
91822
|
+
falseLabel: optional(Locale.annotations({
|
|
91823
|
+
title: "关闭文案",
|
|
91824
|
+
description: "只读状态下,值为 `false` 时展示的文本;留空使用默认 `否`"
|
|
91825
|
+
})),
|
|
91826
|
+
derived: derivedRowField(configure, "bool")
|
|
91827
|
+
}).annotations({ title: "SwitchRenderer", description: "开关渲染器(可编辑、本地)" });
|
|
91828
|
+
}
|
|
91829
|
+
const migrateFrom = [
|
|
91830
|
+
{ type: "com.shwfed.table.column.switch", compatibilityDate: compatibilityDate$a }
|
|
91831
|
+
];
|
|
91832
|
+
const migrate = (prev) => try_({
|
|
91833
|
+
try: () => {
|
|
91834
|
+
if (!prev || typeof prev !== "object") {
|
|
91835
|
+
throw new Error("开关(本地)迁移失败:原值不是对象");
|
|
91836
|
+
}
|
|
91837
|
+
return { ...prev, type: type$a, compatibilityDate: compatibilityDate$a };
|
|
91838
|
+
},
|
|
91839
|
+
catch: (e) => e instanceof Error ? e : new Error(String(e))
|
|
91840
|
+
});
|
|
91841
|
+
function toColumnDef$3(value, { getLocaleText }) {
|
|
91842
|
+
return {
|
|
91843
|
+
header: editableHeader(getLocaleText(value.title)),
|
|
91844
|
+
// `binding` is a dot-prop path (validated non-empty); the cell renderer
|
|
91845
|
+
// reads through the same path it writes to. No CEL — accessor is literal.
|
|
91846
|
+
accessorFn: (row) => {
|
|
91847
|
+
if (!row || typeof row !== "object") return void 0;
|
|
91848
|
+
return getProperty(row, value.binding);
|
|
91849
|
+
},
|
|
91850
|
+
enableSorting: value.enableSorting ?? false,
|
|
91851
|
+
// `basic` orders by JS `<` — for booleans that yields `false < true`,
|
|
91852
|
+
// which is the obvious grouping. Mirrors the remote switch column.
|
|
91853
|
+
sortingFn: "basic",
|
|
91854
|
+
size: value.size,
|
|
91855
|
+
meta: {
|
|
91856
|
+
grow: value.grow ?? false,
|
|
91857
|
+
tooltip: getLocaleText(value.tooltip)
|
|
91858
|
+
}
|
|
91859
|
+
};
|
|
91860
|
+
}
|
|
91861
|
+
const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91588
91862
|
__proto__: null,
|
|
91589
91863
|
compatibilityDate: compatibilityDate$a,
|
|
91590
91864
|
metadata: metadata$a,
|
|
91865
|
+
migrate,
|
|
91866
|
+
migrateFrom,
|
|
91591
91867
|
schema: schema$a,
|
|
91592
91868
|
toColumnDef: toColumnDef$3,
|
|
91593
91869
|
type: type$a
|
|
@@ -91647,7 +91923,7 @@ function toColumnDef$2(value, { getLocaleText }) {
|
|
|
91647
91923
|
}
|
|
91648
91924
|
};
|
|
91649
91925
|
}
|
|
91650
|
-
const
|
|
91926
|
+
const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91651
91927
|
__proto__: null,
|
|
91652
91928
|
compatibilityDate: compatibilityDate$9,
|
|
91653
91929
|
metadata: metadata$9,
|
|
@@ -91704,7 +91980,7 @@ function toColumnDef$1(value, { getLocaleText }) {
|
|
|
91704
91980
|
}
|
|
91705
91981
|
};
|
|
91706
91982
|
}
|
|
91707
|
-
const
|
|
91983
|
+
const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91708
91984
|
__proto__: null,
|
|
91709
91985
|
compatibilityDate: compatibilityDate$8,
|
|
91710
91986
|
metadata: metadata$8,
|
|
@@ -91739,7 +92015,7 @@ function toColumnDef(_value) {
|
|
|
91739
92015
|
meta: { grow: false }
|
|
91740
92016
|
};
|
|
91741
92017
|
}
|
|
91742
|
-
const
|
|
92018
|
+
const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91743
92019
|
__proto__: null,
|
|
91744
92020
|
compatibilityDate: compatibilityDate$7,
|
|
91745
92021
|
metadata: metadata$7,
|
|
@@ -91755,12 +92031,14 @@ const schemaModules$2 = /* @__PURE__ */ Object.assign({
|
|
|
91755
92031
|
"../columns/2026-04-14/com.shwfed.table.column.number/schema.ts": __vite_glob_0_4$1,
|
|
91756
92032
|
"../columns/2026-04-14/com.shwfed.table.column.select/schema.ts": __vite_glob_0_5$1,
|
|
91757
92033
|
"../columns/2026-04-14/com.shwfed.table.column.text/schema.ts": __vite_glob_0_6,
|
|
91758
|
-
"../columns/2026-05-13/com.shwfed.table.column.switch/schema.ts": __vite_glob_0_7,
|
|
91759
|
-
"../columns/2026-05-
|
|
91760
|
-
"../columns/2026-05-20/com.shwfed.table.column.
|
|
91761
|
-
"../columns/2026-05-20/com.shwfed.table.column.
|
|
91762
|
-
"../columns/2026-05-20/com.shwfed.table.column.
|
|
91763
|
-
"../columns/2026-05-
|
|
92034
|
+
"../columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.ts": __vite_glob_0_7,
|
|
92035
|
+
"../columns/2026-05-13/com.shwfed.table.column.switch/schema.ts": __vite_glob_0_8,
|
|
92036
|
+
"../columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.ts": __vite_glob_0_9,
|
|
92037
|
+
"../columns/2026-05-20/com.shwfed.table.column.number-input/schema.ts": __vite_glob_0_10,
|
|
92038
|
+
"../columns/2026-05-20/com.shwfed.table.column.switch.local/schema.ts": __vite_glob_0_11,
|
|
92039
|
+
"../columns/2026-05-20/com.shwfed.table.column.switch/schema.ts": __vite_glob_0_12,
|
|
92040
|
+
"../columns/2026-05-20/com.shwfed.table.column.text-input/schema.ts": __vite_glob_0_13,
|
|
92041
|
+
"../columns/2026-05-21/com.shwfed.table.column.drag-handle/schema.ts": __vite_glob_0_14
|
|
91764
92042
|
});
|
|
91765
92043
|
const configModules$2 = /* @__PURE__ */ Object.assign({
|
|
91766
92044
|
"../columns/2026-04-14/com.shwfed.table.column.actions/config.vue": __vite_glob_2_5,
|
|
@@ -91770,9 +92048,11 @@ const configModules$2 = /* @__PURE__ */ Object.assign({
|
|
|
91770
92048
|
"../columns/2026-04-14/com.shwfed.table.column.number/config.vue": __vite_glob_2_5,
|
|
91771
92049
|
"../columns/2026-04-14/com.shwfed.table.column.select/config.vue": __vite_glob_2_5,
|
|
91772
92050
|
"../columns/2026-04-14/com.shwfed.table.column.text/config.vue": __vite_glob_2_5,
|
|
92051
|
+
"../columns/2026-05-13/com.shwfed.table.column.switch.remote/config.vue": __vite_glob_2_5,
|
|
91773
92052
|
"../columns/2026-05-13/com.shwfed.table.column.switch/config.vue": __vite_glob_2_5,
|
|
91774
92053
|
"../columns/2026-05-20/com.shwfed.table.column.combobox-single/config.vue": __vite_glob_2_5,
|
|
91775
92054
|
"../columns/2026-05-20/com.shwfed.table.column.number-input/config.vue": __vite_glob_2_5,
|
|
92055
|
+
"../columns/2026-05-20/com.shwfed.table.column.switch.local/config.vue": __vite_glob_2_5,
|
|
91776
92056
|
"../columns/2026-05-20/com.shwfed.table.column.switch/config.vue": __vite_glob_2_5,
|
|
91777
92057
|
"../columns/2026-05-20/com.shwfed.table.column.text-input/config.vue": __vite_glob_2_5,
|
|
91778
92058
|
"../columns/2026-05-21/com.shwfed.table.column.drag-handle/config.vue": __vite_glob_2_5
|
|
@@ -91785,13 +92065,16 @@ const runtimeModules$2 = /* @__PURE__ */ Object.assign({
|
|
|
91785
92065
|
"../columns/2026-04-14/com.shwfed.table.column.number/runtime.vue": __vite_glob_2_5,
|
|
91786
92066
|
"../columns/2026-04-14/com.shwfed.table.column.select/runtime.vue": __vite_glob_2_5,
|
|
91787
92067
|
"../columns/2026-04-14/com.shwfed.table.column.text/runtime.vue": __vite_glob_2_5,
|
|
92068
|
+
"../columns/2026-05-13/com.shwfed.table.column.switch.remote/runtime.vue": __vite_glob_2_5,
|
|
91788
92069
|
"../columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue": __vite_glob_2_5,
|
|
91789
92070
|
"../columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.vue": __vite_glob_2_5,
|
|
91790
92071
|
"../columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue": __vite_glob_2_5,
|
|
92072
|
+
"../columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue": __vite_glob_2_5,
|
|
91791
92073
|
"../columns/2026-05-20/com.shwfed.table.column.switch/runtime.vue": __vite_glob_2_5,
|
|
91792
92074
|
"../columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue": __vite_glob_2_5,
|
|
91793
92075
|
"../columns/2026-05-21/com.shwfed.table.column.drag-handle/runtime.vue": __vite_glob_2_5
|
|
91794
92076
|
});
|
|
92077
|
+
const sourceKey$1 = (type2, compatibilityDate2) => `${type2}@${compatibilityDate2}`;
|
|
91795
92078
|
const registry$2 = defineRegistry({
|
|
91796
92079
|
hostName: "shwfed-table",
|
|
91797
92080
|
dirSegment: "columns",
|
|
@@ -91802,6 +92085,47 @@ const registry$2 = defineRegistry({
|
|
|
91802
92085
|
if (typeof mod.toColumnDef !== "function") {
|
|
91803
92086
|
throw new TypeError(`[shwfed-table] column "${type2}@${date2}" is missing toColumnDef export`);
|
|
91804
92087
|
}
|
|
92088
|
+
},
|
|
92089
|
+
// Deprecation rules mirror the form host:
|
|
92090
|
+
// (a) date-versioned: another entry shares this entry's `type` with a
|
|
92091
|
+
// strictly greater `compatibilityDate`;
|
|
92092
|
+
// (b) explicit cross-type: another entry declares this one in its
|
|
92093
|
+
// `migrateFrom`. Same source claimed twice → throw.
|
|
92094
|
+
deriveEntryExtras: (drafts) => {
|
|
92095
|
+
const latestByType = /* @__PURE__ */ new Map();
|
|
92096
|
+
for (const d of drafts) {
|
|
92097
|
+
const prev = latestByType.get(d.type);
|
|
92098
|
+
if (!prev || d.compatibilityDate > prev) latestByType.set(d.type, d.compatibilityDate);
|
|
92099
|
+
}
|
|
92100
|
+
const migrationTargets2 = /* @__PURE__ */ new Map();
|
|
92101
|
+
for (const d of drafts) {
|
|
92102
|
+
const sources = d.module.migrateFrom;
|
|
92103
|
+
if (!sources || sources.length === 0) continue;
|
|
92104
|
+
for (const src of sources) {
|
|
92105
|
+
const key = sourceKey$1(src.type, src.compatibilityDate);
|
|
92106
|
+
const existing = migrationTargets2.get(key);
|
|
92107
|
+
if (existing) {
|
|
92108
|
+
throw new Error(
|
|
92109
|
+
`[shwfed-table] migrateFrom collision: source "${key}" is claimed by both "${sourceKey$1(existing.type, existing.compatibilityDate)}" and "${sourceKey$1(d.type, d.compatibilityDate)}"`
|
|
92110
|
+
);
|
|
92111
|
+
}
|
|
92112
|
+
migrationTargets2.set(key, { type: d.type, compatibilityDate: d.compatibilityDate });
|
|
92113
|
+
}
|
|
92114
|
+
}
|
|
92115
|
+
return (draft) => {
|
|
92116
|
+
const declared = migrationTargets2.get(sourceKey$1(draft.type, draft.compatibilityDate));
|
|
92117
|
+
if (declared) {
|
|
92118
|
+
return { deprecated: true, supersededBy: declared };
|
|
92119
|
+
}
|
|
92120
|
+
const latest = latestByType.get(draft.type);
|
|
92121
|
+
if (draft.compatibilityDate < latest) {
|
|
92122
|
+
return {
|
|
92123
|
+
deprecated: true,
|
|
92124
|
+
supersededBy: { type: draft.type, compatibilityDate: latest }
|
|
92125
|
+
};
|
|
92126
|
+
}
|
|
92127
|
+
return { deprecated: false };
|
|
92128
|
+
};
|
|
91805
92129
|
}
|
|
91806
92130
|
});
|
|
91807
92131
|
const COLUMNS = registry$2.ENTRIES.map((e) => ({
|
|
@@ -91811,8 +92135,26 @@ const COLUMNS = registry$2.ENTRIES.map((e) => ({
|
|
|
91811
92135
|
schema: e.module.schema,
|
|
91812
92136
|
config: e.config,
|
|
91813
92137
|
runtime: e.runtime,
|
|
91814
|
-
toColumnDef: e.module.toColumnDef
|
|
92138
|
+
toColumnDef: e.module.toColumnDef,
|
|
92139
|
+
deprecated: e.deprecated,
|
|
92140
|
+
...e.supersededBy !== void 0 ? { supersededBy: e.supersededBy } : {},
|
|
92141
|
+
...e.module.migrate !== void 0 ? { migrate: e.module.migrate } : {},
|
|
92142
|
+
...e.module.migrateFrom !== void 0 ? { migrateFrom: e.module.migrateFrom } : {}
|
|
91815
92143
|
}));
|
|
92144
|
+
(() => {
|
|
92145
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
92146
|
+
for (const entry of COLUMNS) {
|
|
92147
|
+
const sources = entry.migrateFrom;
|
|
92148
|
+
if (!sources || sources.length === 0) continue;
|
|
92149
|
+
for (const src of sources) {
|
|
92150
|
+
map2.set(sourceKey$1(src.type, src.compatibilityDate), {
|
|
92151
|
+
type: entry.type,
|
|
92152
|
+
compatibilityDate: entry.compatibilityDate
|
|
92153
|
+
});
|
|
92154
|
+
}
|
|
92155
|
+
}
|
|
92156
|
+
return map2;
|
|
92157
|
+
})();
|
|
91816
92158
|
function allColumnSchemas(configure) {
|
|
91817
92159
|
return COLUMNS.map((entry) => entry.schema(configure));
|
|
91818
92160
|
}
|
|
@@ -92240,8 +92582,8 @@ const schemaModules$1 = /* @__PURE__ */ Object.assign({
|
|
|
92240
92582
|
"../fields/2026-04-27/com.shwfed.form.field.timerange/schema.ts": __vite_glob_0_10$1,
|
|
92241
92583
|
"../fields/2026-04-28/com.shwfed.form.field.number/schema.ts": __vite_glob_0_11$1,
|
|
92242
92584
|
"../fields/2026-04-28/com.shwfed.form.field.numberrange/schema.ts": __vite_glob_0_12$1,
|
|
92243
|
-
"../fields/2026-04-28/com.shwfed.form.field.switch/schema.ts": __vite_glob_0_13,
|
|
92244
|
-
"../fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.ts": __vite_glob_0_14,
|
|
92585
|
+
"../fields/2026-04-28/com.shwfed.form.field.switch/schema.ts": __vite_glob_0_13$1,
|
|
92586
|
+
"../fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.ts": __vite_glob_0_14$1,
|
|
92245
92587
|
"../fields/2026-05-12/com.shwfed.form.field.upload/schema.ts": __vite_glob_0_15,
|
|
92246
92588
|
"../fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.ts": __vite_glob_0_16,
|
|
92247
92589
|
"../fields/2026-05-13/com.shwfed.form.field.list/schema.ts": __vite_glob_0_17,
|
|
@@ -92298,25 +92640,56 @@ const runtimeModules$1 = /* @__PURE__ */ Object.assign({
|
|
|
92298
92640
|
"../fields/2026-05-18/com.shwfed.form.field.table/runtime.vue": __vite_glob_2_5,
|
|
92299
92641
|
"../fields/2026-05-20/com.shwfed.form.field.collapsible/runtime.vue": __vite_glob_2_5
|
|
92300
92642
|
});
|
|
92643
|
+
const sourceKey = (type2, compatibilityDate2) => `${type2}@${compatibilityDate2}`;
|
|
92301
92644
|
const registry$1 = defineRegistry({
|
|
92302
92645
|
hostName: "shwfed-form",
|
|
92303
92646
|
dirSegment: "fields",
|
|
92304
92647
|
schemaModules: schemaModules$1,
|
|
92305
92648
|
configModules: configModules$1,
|
|
92306
92649
|
runtimeModules: runtimeModules$1,
|
|
92307
|
-
// An entry is deprecated
|
|
92308
|
-
//
|
|
92309
|
-
//
|
|
92650
|
+
// An entry is deprecated by one of two rules:
|
|
92651
|
+
// (a) another entry shares its `type` with a strictly greater
|
|
92652
|
+
// `compatibilityDate` — date-versioned supersession;
|
|
92653
|
+
// (b) another entry declares this one in its `migrateFrom` — explicit
|
|
92654
|
+
// cross-type supersession (rename, split, merge).
|
|
92655
|
+
// Rule (a) wins on overlap, since the date-versioned rule is the implicit
|
|
92656
|
+
// convention; an explicit `migrateFrom` against a still-current entry is
|
|
92657
|
+
// almost always a mistake, but we let it slide as long as no two targets
|
|
92658
|
+
// claim the same source (that collision throws below).
|
|
92310
92659
|
deriveEntryExtras: (drafts) => {
|
|
92311
92660
|
const latestByType = /* @__PURE__ */ new Map();
|
|
92312
92661
|
for (const d of drafts) {
|
|
92313
92662
|
const prev = latestByType.get(d.type);
|
|
92314
92663
|
if (!prev || d.compatibilityDate > prev) latestByType.set(d.type, d.compatibilityDate);
|
|
92315
92664
|
}
|
|
92665
|
+
const migrationTargets = /* @__PURE__ */ new Map();
|
|
92666
|
+
for (const d of drafts) {
|
|
92667
|
+
const sources = d.module.migrateFrom;
|
|
92668
|
+
if (!sources || sources.length === 0) continue;
|
|
92669
|
+
for (const src of sources) {
|
|
92670
|
+
const key = sourceKey(src.type, src.compatibilityDate);
|
|
92671
|
+
const existing = migrationTargets.get(key);
|
|
92672
|
+
if (existing) {
|
|
92673
|
+
throw new Error(
|
|
92674
|
+
`[shwfed-form] migrateFrom collision: source "${key}" is claimed by both "${sourceKey(existing.type, existing.compatibilityDate)}" and "${sourceKey(d.type, d.compatibilityDate)}"`
|
|
92675
|
+
);
|
|
92676
|
+
}
|
|
92677
|
+
migrationTargets.set(key, { type: d.type, compatibilityDate: d.compatibilityDate });
|
|
92678
|
+
}
|
|
92679
|
+
}
|
|
92316
92680
|
return (draft) => {
|
|
92681
|
+
const declared = migrationTargets.get(sourceKey(draft.type, draft.compatibilityDate));
|
|
92682
|
+
if (declared) {
|
|
92683
|
+
return { deprecated: true, supersededBy: declared };
|
|
92684
|
+
}
|
|
92317
92685
|
const latest = latestByType.get(draft.type);
|
|
92318
|
-
|
|
92319
|
-
|
|
92686
|
+
if (draft.compatibilityDate < latest) {
|
|
92687
|
+
return {
|
|
92688
|
+
deprecated: true,
|
|
92689
|
+
supersededBy: { type: draft.type, compatibilityDate: latest }
|
|
92690
|
+
};
|
|
92691
|
+
}
|
|
92692
|
+
return { deprecated: false };
|
|
92320
92693
|
};
|
|
92321
92694
|
}
|
|
92322
92695
|
});
|
|
@@ -92333,6 +92706,7 @@ function getFields() {
|
|
|
92333
92706
|
deprecated: e.deprecated,
|
|
92334
92707
|
...e.supersededBy !== void 0 ? { supersededBy: e.supersededBy } : {},
|
|
92335
92708
|
migrate: e.module.migrate,
|
|
92709
|
+
...e.module.migrateFrom !== void 0 ? { migrateFrom: e.module.migrateFrom } : {},
|
|
92336
92710
|
defaults: e.module.defaults
|
|
92337
92711
|
}));
|
|
92338
92712
|
return _fields;
|
|
@@ -92971,11 +93345,157 @@ function validateConfig(input) {
|
|
|
92971
93345
|
function getSchema() {
|
|
92972
93346
|
return make$2(pageSchema);
|
|
92973
93347
|
}
|
|
93348
|
+
const isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
93349
|
+
const branchesOf = (node) => {
|
|
93350
|
+
const list2 = node.anyOf ?? node.oneOf;
|
|
93351
|
+
if (!Array.isArray(list2)) return void 0;
|
|
93352
|
+
return list2.filter(isObject);
|
|
93353
|
+
};
|
|
93354
|
+
const typeEnumOf = (branch) => {
|
|
93355
|
+
const props = isObject(branch.properties) ? branch.properties : void 0;
|
|
93356
|
+
const typeProp = props && isObject(props.type) ? props.type : void 0;
|
|
93357
|
+
const en = typeProp?.enum;
|
|
93358
|
+
return Array.isArray(en) ? en.filter((v) => typeof v === "string") : [];
|
|
93359
|
+
};
|
|
93360
|
+
const compatDateOf = (branch) => {
|
|
93361
|
+
const props = isObject(branch.properties) ? branch.properties : void 0;
|
|
93362
|
+
const cd = props && isObject(props.compatibilityDate) ? props.compatibilityDate : void 0;
|
|
93363
|
+
const en = cd?.enum;
|
|
93364
|
+
if (Array.isArray(en) && typeof en[0] === "string") return en[0];
|
|
93365
|
+
return void 0;
|
|
93366
|
+
};
|
|
93367
|
+
const resolveRef = (node, root) => {
|
|
93368
|
+
if (!isObject(node) || typeof node.$ref !== "string") return node;
|
|
93369
|
+
const ref2 = node.$ref;
|
|
93370
|
+
if (!ref2.startsWith("#/")) return node;
|
|
93371
|
+
const parts2 = ref2.slice(2).split("/");
|
|
93372
|
+
let cur = root;
|
|
93373
|
+
for (const raw of parts2) {
|
|
93374
|
+
const key = raw.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
93375
|
+
if (!isObject(cur)) return node;
|
|
93376
|
+
cur = cur[key];
|
|
93377
|
+
}
|
|
93378
|
+
return cur;
|
|
93379
|
+
};
|
|
93380
|
+
const parseSegment = (raw) => {
|
|
93381
|
+
let s = raw;
|
|
93382
|
+
const array2 = s.endsWith("[]");
|
|
93383
|
+
if (array2) s = s.slice(0, -2);
|
|
93384
|
+
const at = s.indexOf("@");
|
|
93385
|
+
if (at >= 0) return { name: s.slice(0, at), pin: s.slice(at + 1), array: array2 };
|
|
93386
|
+
return { name: s, array: array2 };
|
|
93387
|
+
};
|
|
93388
|
+
const describeOptions = (node) => {
|
|
93389
|
+
const branches = branchesOf(node);
|
|
93390
|
+
if (branches) {
|
|
93391
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
93392
|
+
for (const b of branches) {
|
|
93393
|
+
for (const t of typeEnumOf(b)) {
|
|
93394
|
+
const dates = grouped.get(t) ?? [];
|
|
93395
|
+
const d = compatDateOf(b);
|
|
93396
|
+
if (d) dates.push(d);
|
|
93397
|
+
grouped.set(t, dates);
|
|
93398
|
+
}
|
|
93399
|
+
}
|
|
93400
|
+
if (grouped.size === 0) return "<unnamed union branches>";
|
|
93401
|
+
return [...grouped.entries()].map(([t, ds]) => ds.length > 1 ? `${t} (${ds.sort().join(", ")})` : t).join(", ");
|
|
93402
|
+
}
|
|
93403
|
+
if (isObject(node.properties)) {
|
|
93404
|
+
const keys2 = Object.keys(node.properties);
|
|
93405
|
+
return keys2.length ? keys2.join(", ") : "<no properties>";
|
|
93406
|
+
}
|
|
93407
|
+
if (node.type === "array") return "[]";
|
|
93408
|
+
return `<${node.type ?? "unknown"}>`;
|
|
93409
|
+
};
|
|
93410
|
+
function narrowSchema(root, path) {
|
|
93411
|
+
const segments = path.split("/").map((s) => s.trim()).filter(Boolean);
|
|
93412
|
+
let node = root;
|
|
93413
|
+
const walked = [];
|
|
93414
|
+
for (const raw of segments) {
|
|
93415
|
+
node = resolveRef(node, root);
|
|
93416
|
+
if (!isObject(node)) {
|
|
93417
|
+
return {
|
|
93418
|
+
ok: false,
|
|
93419
|
+
error: `can't descend into non-object at '${walked.join("/")}'`,
|
|
93420
|
+
atPath: walked.join("/"),
|
|
93421
|
+
options: ""
|
|
93422
|
+
};
|
|
93423
|
+
}
|
|
93424
|
+
const { name, pin, array: array2 } = parseSegment(raw);
|
|
93425
|
+
const branches = branchesOf(node);
|
|
93426
|
+
if (branches) {
|
|
93427
|
+
const matches = branches.filter((b) => typeEnumOf(b).includes(name));
|
|
93428
|
+
if (matches.length === 0) {
|
|
93429
|
+
return {
|
|
93430
|
+
ok: false,
|
|
93431
|
+
error: `no '${name}' branch at '${walked.join("/") || "<root>"}'`,
|
|
93432
|
+
atPath: walked.join("/"),
|
|
93433
|
+
options: describeOptions(node)
|
|
93434
|
+
};
|
|
93435
|
+
}
|
|
93436
|
+
let picked;
|
|
93437
|
+
if (pin) {
|
|
93438
|
+
const pinned = matches.find((b) => compatDateOf(b) === pin);
|
|
93439
|
+
if (!pinned) {
|
|
93440
|
+
const dates = matches.map(compatDateOf).filter(Boolean).join(", ");
|
|
93441
|
+
return {
|
|
93442
|
+
ok: false,
|
|
93443
|
+
error: `no '${name}@${pin}' — available compatibilityDates: ${dates || "<none>"}`,
|
|
93444
|
+
atPath: walked.join("/"),
|
|
93445
|
+
options: dates
|
|
93446
|
+
};
|
|
93447
|
+
}
|
|
93448
|
+
picked = pinned;
|
|
93449
|
+
} else {
|
|
93450
|
+
picked = matches.reduce((best, cur) => {
|
|
93451
|
+
const a = compatDateOf(best) ?? "";
|
|
93452
|
+
const b = compatDateOf(cur) ?? "";
|
|
93453
|
+
return b > a ? cur : best;
|
|
93454
|
+
});
|
|
93455
|
+
}
|
|
93456
|
+
const d = compatDateOf(picked);
|
|
93457
|
+
walked.push(d ? `${name}@${d}` : name);
|
|
93458
|
+
node = picked;
|
|
93459
|
+
} else if (isObject(node.properties) && name in node.properties) {
|
|
93460
|
+
walked.push(raw.replace(/\[\]$/, ""));
|
|
93461
|
+
node = node.properties[name];
|
|
93462
|
+
} else {
|
|
93463
|
+
return {
|
|
93464
|
+
ok: false,
|
|
93465
|
+
error: `can't resolve '${name}' at '${walked.join("/") || "<root>"}'`,
|
|
93466
|
+
atPath: walked.join("/"),
|
|
93467
|
+
options: describeOptions(node)
|
|
93468
|
+
};
|
|
93469
|
+
}
|
|
93470
|
+
if (array2) {
|
|
93471
|
+
node = resolveRef(node, root);
|
|
93472
|
+
if (!isObject(node) || node.type !== "array" || node.items === void 0) {
|
|
93473
|
+
return {
|
|
93474
|
+
ok: false,
|
|
93475
|
+
error: `'${name}' is not an array`,
|
|
93476
|
+
atPath: walked.join("/"),
|
|
93477
|
+
options: ""
|
|
93478
|
+
};
|
|
93479
|
+
}
|
|
93480
|
+
walked[walked.length - 1] = `${walked[walked.length - 1]}[]`;
|
|
93481
|
+
node = node.items;
|
|
93482
|
+
}
|
|
93483
|
+
}
|
|
93484
|
+
node = resolveRef(node, root);
|
|
93485
|
+
return { ok: true, schema: node, resolvedPath: walked.join("/") };
|
|
93486
|
+
}
|
|
92974
93487
|
const server = new McpServer({
|
|
92975
93488
|
name: "@shwfed/config",
|
|
92976
93489
|
version: "0.1.0"
|
|
92977
93490
|
}, {
|
|
92978
|
-
instructions:
|
|
93491
|
+
instructions: [
|
|
93492
|
+
"Tools for authoring ShwfedConfig JSON. Use `get_schema` once to learn the shape, then iterate with `validate_config` until it returns `{ valid: true }`. Optionally call `preview_config` to render the result in the user's browser via a localhost-only playground; `stop_preview` shuts it down.",
|
|
93493
|
+
"",
|
|
93494
|
+
"Versioned types (`type` + `compatibilityDate`): the same `type` may appear at multiple `compatibilityDate`s with DIFFERENT contracts — they are not interchangeable. Rules:",
|
|
93495
|
+
"1. When creating a new entry, ALWAYS pick the LATEST `compatibilityDate` available for that `type` in the schema. Do not select an older one because it looks simpler or familiar.",
|
|
93496
|
+
"2. When editing an existing config that uses an older `compatibilityDate`, prefer migrating it to the latest version (translate its fields into the newer contract) and tell the user you did so, instead of preserving the old version silently.",
|
|
93497
|
+
"3. Never mix versions of the same `type` across a single config when the latest covers the use case."
|
|
93498
|
+
].join("\n")
|
|
92979
93499
|
});
|
|
92980
93500
|
server.registerTool("validate_config", {
|
|
92981
93501
|
title: "Validate ShwfedConfig JSON",
|
|
@@ -92993,12 +93513,81 @@ server.registerTool("validate_config", {
|
|
|
92993
93513
|
});
|
|
92994
93514
|
server.registerTool("get_schema", {
|
|
92995
93515
|
title: "Get ShwfedConfig JSON Schema",
|
|
92996
|
-
description:
|
|
92997
|
-
|
|
93516
|
+
description: [
|
|
93517
|
+
"Returns the JSON Schema (draft-07) describing the ShwfedConfig shape. The same `type` may be published at multiple `compatibilityDate` values with incompatible contracts; for new entries always select the latest `compatibilityDate` for that `type`, and prefer migrating older entries to it.",
|
|
93518
|
+
"",
|
|
93519
|
+
"Pass `path` to narrow into a sub-schema and avoid pulling the full schema into context. Path syntax (`/`-separated because type names contain dots):",
|
|
93520
|
+
" - `foo` step into `properties.foo`",
|
|
93521
|
+
" - `foo[]` step into an array's `items` after resolving `foo`",
|
|
93522
|
+
" - `<type>` on a union, pick the branch whose `type` discriminator matches; if multiple `compatibilityDate` versions exist, picks the latest",
|
|
93523
|
+
" - `<type>@<date>` pin to a specific compatibilityDate",
|
|
93524
|
+
"Example: `blocks[]/com.shwfed.block.table/columns[]/com.shwfed.table.column.switch.local`. On a bad segment the error lists the legal next steps."
|
|
93525
|
+
].join("\n"),
|
|
93526
|
+
inputSchema: {
|
|
93527
|
+
path: string$1().optional().describe("Optional `/`-separated path to narrow into. Omit to return the full schema.")
|
|
93528
|
+
}
|
|
93529
|
+
}, async ({ path }) => {
|
|
92998
93530
|
const schema2 = getSchema();
|
|
93531
|
+
if (!path) {
|
|
93532
|
+
return {
|
|
93533
|
+
content: [{ type: "text", text: JSON.stringify(schema2, null, 2) }],
|
|
93534
|
+
structuredContent: schema2
|
|
93535
|
+
};
|
|
93536
|
+
}
|
|
93537
|
+
const result = narrowSchema(schema2, path);
|
|
93538
|
+
if (!result.ok) {
|
|
93539
|
+
const payload2 = { error: result.error, atPath: result.atPath, options: result.options };
|
|
93540
|
+
return {
|
|
93541
|
+
content: [{ type: "text", text: JSON.stringify(payload2, null, 2) }],
|
|
93542
|
+
structuredContent: payload2,
|
|
93543
|
+
isError: true
|
|
93544
|
+
};
|
|
93545
|
+
}
|
|
93546
|
+
const payload = { path: result.resolvedPath, schema: result.schema };
|
|
92999
93547
|
return {
|
|
93000
|
-
content: [{ type: "text", text: JSON.stringify(
|
|
93001
|
-
structuredContent:
|
|
93548
|
+
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
93549
|
+
structuredContent: payload
|
|
93550
|
+
};
|
|
93551
|
+
});
|
|
93552
|
+
server.registerTool("preview_config", {
|
|
93553
|
+
title: "Preview ShwfedConfig in browser",
|
|
93554
|
+
description: "Boots a localhost-only preview server (127.0.0.1) that renders the given ShwfedConfig in a real browser using the package's shipped components. Returns the URL for the user to open. The config is validated first; invalid configs are rejected without starting the server. Subsequent calls hot-swap the rendered config and return the same URL — the user reloads the tab to see updates. The preview only knows about components shipped by this package; user-defined extensions in their host app are not visible here. CEL variables (e.g. `token`) are user-managed in the page itself — the agent never sees their values.",
|
|
93555
|
+
inputSchema: {
|
|
93556
|
+
config: looseObject({}).describe("The ShwfedConfig JSON value to render")
|
|
93557
|
+
}
|
|
93558
|
+
}, async ({ config: config2 }) => {
|
|
93559
|
+
const validation2 = validateConfig(config2);
|
|
93560
|
+
if (!validation2.valid) {
|
|
93561
|
+
return {
|
|
93562
|
+
content: [{ type: "text", text: JSON.stringify(validation2, null, 2) }],
|
|
93563
|
+
structuredContent: validation2,
|
|
93564
|
+
isError: true
|
|
93565
|
+
};
|
|
93566
|
+
}
|
|
93567
|
+
try {
|
|
93568
|
+
const { url } = await startPreview(config2);
|
|
93569
|
+
const payload = { url, hint: "Open the URL in a browser. Reload the tab after each preview_config call to pick up changes." };
|
|
93570
|
+
return {
|
|
93571
|
+
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
93572
|
+
structuredContent: payload
|
|
93573
|
+
};
|
|
93574
|
+
} catch (err) {
|
|
93575
|
+
const message2 = err instanceof Error ? err.message : String(err);
|
|
93576
|
+
return {
|
|
93577
|
+
content: [{ type: "text", text: message2 }],
|
|
93578
|
+
structuredContent: { error: message2 },
|
|
93579
|
+
isError: true
|
|
93580
|
+
};
|
|
93581
|
+
}
|
|
93582
|
+
});
|
|
93583
|
+
server.registerTool("stop_preview", {
|
|
93584
|
+
title: "Stop the ShwfedConfig preview server",
|
|
93585
|
+
description: "Shuts down the localhost preview server if one is running. Safe to call when nothing is running — returns `{ stopped: false }` in that case."
|
|
93586
|
+
}, async () => {
|
|
93587
|
+
const result = await stopPreview();
|
|
93588
|
+
return {
|
|
93589
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
93590
|
+
structuredContent: result
|
|
93002
93591
|
};
|
|
93003
93592
|
});
|
|
93004
93593
|
const transport = new StdioServerTransport();
|