@plitzi/sdk-mcp 0.33.2 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/modules/mcp/catalogs/index.d.ts +2 -7
- package/dist/modules/mcp/catalogs/index.js +4 -0
- package/dist/modules/mcp/catalogs/observed.d.ts +1 -1
- package/dist/modules/mcp/catalogs/observed.js +2 -5
- package/dist/modules/mcp/catalogs/pluginCatalog.d.ts +17 -0
- package/dist/modules/mcp/catalogs/pluginCatalog.js +91 -0
- package/dist/modules/mcp/catalogs/registry.js +2 -3
- package/dist/modules/mcp/helpers/agentPrompt.js +9 -9
- package/dist/modules/mcp/helpers/guide.d.ts +2 -2
- package/dist/modules/mcp/helpers/guide.js +117 -50
- package/dist/modules/mcp/helpers/interactions.d.ts +5 -1
- package/dist/modules/mcp/helpers/interactions.js +15 -6
- package/dist/modules/mcp/helpers/space.d.ts +45 -28
- package/dist/modules/mcp/helpers/space.js +87 -87
- package/dist/modules/mcp/helpers/uris.d.ts +9 -0
- package/dist/modules/mcp/helpers/uris.js +10 -1
- package/dist/modules/mcp/index.d.ts +2 -0
- package/dist/modules/mcp/localScreenshotClient.d.ts +51 -0
- package/dist/modules/mcp/localScreenshotClient.js +106 -0
- package/dist/modules/mcp/proxy/rewrite.js +15 -1
- package/dist/modules/mcp/resources/actions.d.ts +25 -0
- package/dist/modules/mcp/resources/actions.js +54 -0
- package/dist/modules/mcp/resources/canonical.d.ts +1 -1
- package/dist/modules/mcp/resources/canonical.js +1 -1
- package/dist/modules/mcp/resources/connectors.d.ts +1 -1
- package/dist/modules/mcp/resources/core.js +1 -1
- package/dist/modules/mcp/resources/index.d.ts +1 -0
- package/dist/modules/mcp/resources/primer.d.ts +8 -1
- package/dist/modules/mcp/resources/primer.js +139 -15
- package/dist/modules/mcp/resources/register.js +24 -4
- package/dist/modules/mcp/resources/renderGuide.js +66 -14
- package/dist/modules/mcp/resources/router.js +3 -1
- package/dist/modules/mcp/resources/schema.js +6 -5
- package/dist/modules/mcp/resources/style.d.ts +2 -1
- package/dist/modules/mcp/resources/style.js +10 -3
- package/dist/modules/mcp/screenshotClient.js +3 -2
- package/dist/modules/mcp/server.js +12 -6
- package/dist/modules/mcp/tests/agentRoundtrip.test.d.ts +1 -0
- package/dist/modules/mcp/tests/layouts.test.d.ts +1 -0
- package/dist/modules/mcp/tools/apply/dispatch.js +30 -1
- package/dist/modules/mcp/tools/apply/index.d.ts +149 -15
- package/dist/modules/mcp/tools/apply/index.js +12 -2
- package/dist/modules/mcp/tools/operations/actions/actions.test.d.ts +1 -0
- package/dist/modules/mcp/tools/operations/actions/deleteAction.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/actions/deleteAction.js +20 -0
- package/dist/modules/mcp/tools/operations/actions/document.d.ts +69 -0
- package/dist/modules/mcp/tools/operations/actions/document.js +73 -0
- package/dist/modules/mcp/tools/operations/actions/index.d.ts +90 -0
- package/dist/modules/mcp/tools/operations/actions/index.js +12 -0
- package/dist/modules/mcp/tools/operations/actions/patchAction.d.ts +45 -0
- package/dist/modules/mcp/tools/operations/actions/patchAction.js +71 -0
- package/dist/modules/mcp/tools/operations/actions/upsertAction.d.ts +47 -0
- package/dist/modules/mcp/tools/operations/actions/upsertAction.js +83 -0
- package/dist/modules/mcp/tools/operations/connectors/index.d.ts +10 -10
- package/dist/modules/mcp/tools/operations/connectors/manifest.d.ts +5 -5
- package/dist/modules/mcp/tools/operations/connectors/patchConnector.d.ts +5 -5
- package/dist/modules/mcp/tools/operations/connectors/upsertConnector.d.ts +5 -5
- package/dist/modules/mcp/tools/operations/index.d.ts +415 -40
- package/dist/modules/mcp/tools/operations/index.js +11 -2
- package/dist/modules/mcp/tools/operations/schema/bindings/deleteBinding.js +2 -2
- package/dist/modules/mcp/tools/operations/schema/bindings/patchBinding.d.ts +1 -1
- package/dist/modules/mcp/tools/operations/schema/bindings/patchBinding.js +2 -2
- package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.d.ts +1 -1
- package/dist/modules/mcp/tools/operations/schema/bindings/upsertBinding.js +4 -4
- package/dist/modules/mcp/tools/operations/schema/elements/deleteElement.js +5 -5
- package/dist/modules/mcp/tools/operations/schema/elements/moveElement.js +6 -6
- package/dist/modules/mcp/tools/operations/schema/elements/patchElement.d.ts +1 -1
- package/dist/modules/mcp/tools/operations/schema/elements/patchElement.js +11 -12
- package/dist/modules/mcp/tools/operations/schema/elements/repeatElement.js +1 -1
- package/dist/modules/mcp/tools/operations/schema/elements/upsertElement.js +4 -4
- package/dist/modules/mcp/tools/operations/schema/index.d.ts +2 -0
- package/dist/modules/mcp/tools/operations/schema/interactions/deleteInteraction.js +2 -2
- package/dist/modules/mcp/tools/operations/schema/interactions/patchInteractionNode.d.ts +1 -1
- package/dist/modules/mcp/tools/operations/schema/interactions/patchInteractionNode.js +2 -2
- package/dist/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.d.ts +1 -1
- package/dist/modules/mcp/tools/operations/schema/interactions/upsertInteractionFlow.js +4 -4
- package/dist/modules/mcp/tools/operations/schema/operations.d.ts +28 -5
- package/dist/modules/mcp/tools/operations/schema/operations.js +4 -0
- package/dist/modules/mcp/tools/operations/schema/pages/deleteLayout.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/schema/pages/deleteLayout.js +33 -0
- package/dist/modules/mcp/tools/operations/schema/pages/deletePage.js +1 -1
- package/dist/modules/mcp/tools/operations/schema/pages/upsertLayout.d.ts +22 -0
- package/dist/modules/mcp/tools/operations/schema/pages/upsertLayout.js +61 -0
- package/dist/modules/mcp/tools/operations/schema/pages/upsertPage.d.ts +2 -0
- package/dist/modules/mcp/tools/operations/schema/pages/upsertPage.js +53 -18
- package/dist/modules/mcp/tools/operations/schema/shared.d.ts +5 -1
- package/dist/modules/mcp/tools/operations/schema/shared.js +2 -2
- package/dist/modules/mcp/tools/operations/schema/translator.d.ts +2 -1
- package/dist/modules/mcp/tools/operations/schema/translator.js +21 -9
- package/dist/modules/mcp/tools/operations/schema/write.d.ts +9 -22
- package/dist/modules/mcp/tools/operations/schema/write.js +23 -43
- package/dist/modules/mcp/tools/operations/schemaIds.js +7 -1
- package/dist/modules/mcp/tools/operations/style/fonts/deleteFont.d.ts +9 -0
- package/dist/modules/mcp/tools/operations/style/fonts/deleteFont.js +21 -0
- package/dist/modules/mcp/tools/operations/style/fonts/fonts.test.d.ts +1 -0
- package/dist/modules/mcp/tools/operations/style/fonts/upsertFont.d.ts +35 -0
- package/dist/modules/mcp/tools/operations/style/fonts/upsertFont.js +66 -0
- package/dist/modules/mcp/tools/operations/style/index.d.ts +2 -0
- package/dist/modules/mcp/tools/operations/style/operations.d.ts +34 -0
- package/dist/modules/mcp/tools/operations/style/operations.js +5 -1
- package/dist/modules/mcp/tools/operations/style/translator.d.ts +13 -1
- package/dist/modules/mcp/tools/operations/style/translator.js +18 -1
- package/dist/modules/mcp/tools/operations/style/write.js +1 -1
- package/dist/modules/mcp/tools/preview.d.ts +58 -5
- package/dist/modules/mcp/tools/preview.js +1 -1
- package/dist/modules/mcp/tools/render.d.ts +61 -5
- package/dist/modules/mcp/tools/render.js +10 -3
- package/dist/modules/mcp/tools/screenshot.d.ts +151 -16
- package/dist/modules/mcp/tools/screenshot.js +22 -13
- package/dist/modules/mcp/tools/search.js +3 -3
- package/dist/modules/mcp/tools/shared/interactionReport.d.ts +7 -0
- package/dist/modules/mcp/tools/shared/interactionReport.js +48 -0
- package/dist/modules/mcp/tools/shared/validator/audit.js +4 -4
- package/dist/modules/mcp/tools/shared/validator/batch.d.ts +1 -0
- package/dist/modules/mcp/tools/shared/validator/batch.js +11 -2
- package/dist/modules/mcp/tools/shared/validator/bindings.js +6 -6
- package/dist/modules/mcp/tools/shared/validator/connectors.js +1 -1
- package/dist/modules/mcp/tools/shared/validator/context.d.ts +3 -0
- package/dist/modules/mcp/tools/shared/validator/css.js +1 -1
- package/dist/modules/mcp/tools/shared/validator/index.js +29 -9
- package/dist/modules/mcp/tools/shared/validator/interactions.js +41 -7
- package/dist/modules/mcp/tools/shared/validator/refs.js +4 -4
- package/dist/modules/mcp/tools/validate.d.ts +149 -15
- package/dist/modules/mcp/types/aiSchema.d.ts +33 -4
- package/dist/modules/mcp/types/previewTypes.d.ts +19 -0
- package/dist/modules/mcp/types/screenshotTypes.d.ts +1 -0
- package/dist/modules/mcp/types/toolTypes.d.ts +6 -1
- package/dist/pipeline.js +1 -1
- package/dist/preview/createPreview.d.ts +4 -2
- package/dist/preview/createPreview.js +16 -6
- package/dist/server.d.ts +3 -0
- package/dist/server.js +3 -1
- package/dist/stages/preview.js +20 -1
- package/dist/tests/httpRequest.d.ts +2 -0
- package/package.json +20 -16
- package/skills/plitzi-render/SKILL.md +84 -11
- package/dist/modules/mcp/catalogs/builtinCallbacks.d.ts +0 -19
- package/dist/modules/mcp/catalogs/builtinCallbacks.js +0 -139
- package/dist/modules/mcp/catalogs/builtinComponents.d.ts +0 -4
- package/dist/modules/mcp/catalogs/builtinComponents.js +0 -165
- package/dist/modules/mcp/catalogs/builtinElementCallbacks.d.ts +0 -17
- package/dist/modules/mcp/catalogs/builtinElementCallbacks.js +0 -50
- package/dist/modules/mcp/catalogs/builtinTransformers.d.ts +0 -28
- package/dist/modules/mcp/catalogs/builtinTransformers.js +0 -148
- package/dist/modules/mcp/catalogs/builtinUtilities.d.ts +0 -15
- package/dist/modules/mcp/catalogs/builtinUtilities.js +0 -90
- package/dist/modules/mcp/catalogs/cssCatalog/border.d.ts +0 -4
- package/dist/modules/mcp/catalogs/cssCatalog/border.js +0 -30
- package/dist/modules/mcp/catalogs/cssCatalog/box.d.ts +0 -4
- package/dist/modules/mcp/catalogs/cssCatalog/box.js +0 -31
- package/dist/modules/mcp/catalogs/cssCatalog/helpers.d.ts +0 -34
- package/dist/modules/mcp/catalogs/cssCatalog/helpers.js +0 -185
- package/dist/modules/mcp/catalogs/cssCatalog/index.d.ts +0 -18
- package/dist/modules/mcp/catalogs/cssCatalog/index.js +0 -131
- package/dist/modules/mcp/catalogs/cssCatalog/layout.d.ts +0 -9
- package/dist/modules/mcp/catalogs/cssCatalog/layout.js +0 -99
- package/dist/modules/mcp/catalogs/cssCatalog/visual.d.ts +0 -8
- package/dist/modules/mcp/catalogs/cssCatalog/visual.js +0 -147
- package/dist/modules/mcp/catalogs/paramSpec.d.ts +0 -39
- package/dist/modules/mcp/catalogs/paramSpec.js +0 -69
- package/dist/modules/oauth/authorize.d.ts +0 -7
- package/dist/modules/oauth/authorize.js +0 -177
- package/dist/modules/oauth/challenge.d.ts +0 -11
- package/dist/modules/oauth/challenge.js +0 -33
- package/dist/modules/oauth/consentPage.d.ts +0 -7
- package/dist/modules/oauth/consentPage.js +0 -118
- package/dist/modules/oauth/metadata.d.ts +0 -40
- package/dist/modules/oauth/metadata.js +0 -69
- package/dist/modules/oauth/params.d.ts +0 -5
- package/dist/modules/oauth/params.js +0 -5
- package/dist/modules/oauth/pkce.d.ts +0 -6
- package/dist/modules/oauth/pkce.js +0 -15
- package/dist/modules/oauth/records.d.ts +0 -71
- package/dist/modules/oauth/records.js +0 -46
- package/dist/modules/oauth/register.d.ts +0 -5
- package/dist/modules/oauth/register.js +0 -55
- package/dist/modules/oauth/respond.d.ts +0 -13
- package/dist/modules/oauth/respond.js +0 -44
- package/dist/modules/oauth/token.d.ts +0 -5
- package/dist/modules/oauth/token.js +0 -100
- package/dist/stages/oauth.d.ts +0 -19
- package/dist/stages/oauth.js +0 -114
- /package/dist/modules/mcp/catalogs/{builtinTransformers.test.d.ts → pluginCatalog.test.d.ts} +0 -0
- /package/dist/modules/mcp/{catalogs/cssCatalog/cssCatalog.test.d.ts → localScreenshotClient.test.d.ts} +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ParamSpec } from './paramSpec';
|
|
2
|
-
export interface BuiltinTransformer {
|
|
3
|
-
title: string;
|
|
4
|
-
description: string;
|
|
5
|
-
strictParams: boolean;
|
|
6
|
-
params: ParamSpec;
|
|
7
|
-
}
|
|
8
|
-
export declare const BUILTIN_TRANSFORMERS: Record<string, BuiltinTransformer>;
|
|
9
|
-
/** The built-in transformer for an action, or undefined when the action is not a known built-in transformer. */
|
|
10
|
-
export declare const getTransformer: (action: string) => BuiltinTransformer | undefined;
|
|
11
|
-
/** The closest known transformer action to a mistyped one (substring match either way), so a wrong action like
|
|
12
|
-
* "template" teaches "twigTemplate". Undefined when nothing is close. */
|
|
13
|
-
export declare const suggestTransformer: (action: string) => string | undefined;
|
|
14
|
-
export interface TransformerInfo {
|
|
15
|
-
action: string;
|
|
16
|
-
title: string;
|
|
17
|
-
description: string;
|
|
18
|
-
params: {
|
|
19
|
-
name: string;
|
|
20
|
-
type: string;
|
|
21
|
-
description: string;
|
|
22
|
-
default?: string | number | boolean;
|
|
23
|
-
options?: string[];
|
|
24
|
-
}[];
|
|
25
|
-
}
|
|
26
|
-
/** The transformer catalog projected for the data-sources resource / primer, so the agent knows the exact action
|
|
27
|
-
* names and params up front (the real fix for the "agent can't write transformers" problem). */
|
|
28
|
-
export declare const transformerCatalog: () => TransformerInfo[];
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/catalogs/builtinTransformers.ts
|
|
2
|
-
var boolParam = (description, dflt) => ({
|
|
3
|
-
type: "select",
|
|
4
|
-
description,
|
|
5
|
-
default: dflt,
|
|
6
|
-
options: ["true", "false"]
|
|
7
|
-
});
|
|
8
|
-
var BUILTIN_TRANSFORMERS = {
|
|
9
|
-
twigTemplate: {
|
|
10
|
-
title: "Twig Template",
|
|
11
|
-
description: "Render a Twig template around the bound value — the way to format/wrap a value (add units, compose a label). The incoming value is the token {{source}} (NOT {{value}}); {{sourceTo}} is the field’s previous value, and other data-source tokens are in scope too.",
|
|
12
|
-
strictParams: true,
|
|
13
|
-
params: { template: {
|
|
14
|
-
type: "textarea",
|
|
15
|
-
required: true,
|
|
16
|
-
description: "The Twig template string. Reference the incoming value as {{source}} — e.g. \"{{source}} min de cocción\". There is NO {{value}} token; {{sourceTo}} is the field’s original value."
|
|
17
|
-
} }
|
|
18
|
-
},
|
|
19
|
-
dateConverter: {
|
|
20
|
-
title: "Date Converter",
|
|
21
|
-
description: "Format a date/timestamp value. Reads a unix-seconds number (isUnix) or a parseable date string and outputs a formatted date, or a relative \"x ago\" string (asAge).",
|
|
22
|
-
strictParams: true,
|
|
23
|
-
params: {
|
|
24
|
-
format: {
|
|
25
|
-
type: "text",
|
|
26
|
-
default: "dd/MM/yyyy",
|
|
27
|
-
description: "date-fns format pattern, e.g. \"dd/MM/yyyy\" or \"PPpp\". Ignored when asAge is true."
|
|
28
|
-
},
|
|
29
|
-
asAge: boolParam("Output a relative \"x ago\" string instead of a formatted date.", "false"),
|
|
30
|
-
isUnix: boolParam("The source value is a unix timestamp in SECONDS (not milliseconds).", "true"),
|
|
31
|
-
isUtc: boolParam("Format in UTC instead of local time.", "false"),
|
|
32
|
-
locale: {
|
|
33
|
-
type: "select",
|
|
34
|
-
default: "en",
|
|
35
|
-
options: [
|
|
36
|
-
"en",
|
|
37
|
-
"es",
|
|
38
|
-
"pt"
|
|
39
|
-
],
|
|
40
|
-
description: "Locale for month/day names and relative text."
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
capitalize: {
|
|
45
|
-
title: "Capitalize",
|
|
46
|
-
description: "Capitalize the first letter of a string value. Takes no params.",
|
|
47
|
-
strictParams: true,
|
|
48
|
-
params: {}
|
|
49
|
-
},
|
|
50
|
-
staticValue: {
|
|
51
|
-
title: "Static Value",
|
|
52
|
-
description: "Ignore the source and emit a fixed value — use to hard-code a bound field. With valueType \"select\" the value is coerced to a boolean (\"true\"→true).",
|
|
53
|
-
strictParams: true,
|
|
54
|
-
params: {
|
|
55
|
-
valueType: {
|
|
56
|
-
type: "select",
|
|
57
|
-
default: "text",
|
|
58
|
-
options: [
|
|
59
|
-
"text",
|
|
60
|
-
"textarea",
|
|
61
|
-
"select"
|
|
62
|
-
],
|
|
63
|
-
description: "How `value` is interpreted: \"text\"/\"textarea\" → string, \"select\" → boolean (\"true\"/\"false\")."
|
|
64
|
-
},
|
|
65
|
-
value: {
|
|
66
|
-
type: "text",
|
|
67
|
-
description: "The constant value to emit (a string; \"true\"/\"false\" when valueType is select)."
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
arrayMap: {
|
|
72
|
-
title: "Array Map",
|
|
73
|
-
description: "Reshape each object of a source array by remapping keys — pick/rename fields for a list. Input must be an array; a non-array passes through unchanged.",
|
|
74
|
-
strictParams: true,
|
|
75
|
-
params: { keys: {
|
|
76
|
-
type: "textarea",
|
|
77
|
-
required: true,
|
|
78
|
-
default: "[{\"from\": \"\", \"to\": \"\"}]",
|
|
79
|
-
description: "A JSON array of { \"from\": <source path>, \"to\": <output key> } mappings, e.g. [{\"from\":\"title\",\"to\":\"label\"},{\"from\":\"id\",\"to\":\"value\"}]."
|
|
80
|
-
} }
|
|
81
|
-
},
|
|
82
|
-
stringToArray: {
|
|
83
|
-
title: "Text to List",
|
|
84
|
-
description: "Split a string into an array on a separator (each item trimmed). A non-string passes through unchanged.",
|
|
85
|
-
strictParams: true,
|
|
86
|
-
params: { separator: {
|
|
87
|
-
type: "text",
|
|
88
|
-
default: ",",
|
|
89
|
-
description: "The delimiter to split on, e.g. \",\" or \"|\"."
|
|
90
|
-
} }
|
|
91
|
-
},
|
|
92
|
-
styleSelector: {
|
|
93
|
-
title: "Style Selector",
|
|
94
|
-
description: "Compute a style-class selector from data — bind a `style` target to switch an element’s class at runtime. Builder-oriented (its `selector` options come from the style schema); prefer style variants for most cases.",
|
|
95
|
-
strictParams: true,
|
|
96
|
-
params: {
|
|
97
|
-
append: boolParam("Append `selector` to the existing selector instead of replacing it.", "false"),
|
|
98
|
-
originalSelector: boolParam("When appending, keep the element’s original base selector (requires append).", "false"),
|
|
99
|
-
selector: {
|
|
100
|
-
type: "text",
|
|
101
|
-
description: "The class-selector name to apply (a class from the style schema)."
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
styleVariant: {
|
|
106
|
-
title: "Style Variant",
|
|
107
|
-
description: "Compute an applied style-variant map from data — bind an `initialState` target to switch a variant at runtime. Builder-oriented (key/variant options come from the element’s style schema); prefer static variants for most cases.",
|
|
108
|
-
strictParams: true,
|
|
109
|
-
params: {
|
|
110
|
-
key: {
|
|
111
|
-
type: "text",
|
|
112
|
-
description: "The selector key to target, e.g. \"<type>.base\"."
|
|
113
|
-
},
|
|
114
|
-
variant: {
|
|
115
|
-
type: "text",
|
|
116
|
-
description: "The variant name to apply under `key`."
|
|
117
|
-
},
|
|
118
|
-
append: boolParam("Merge with the existing variant map instead of replacing it.", "false")
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
/** The built-in transformer for an action, or undefined when the action is not a known built-in transformer. */
|
|
123
|
-
var getTransformer = (action) => Object.hasOwn(BUILTIN_TRANSFORMERS, action) ? BUILTIN_TRANSFORMERS[action] : void 0;
|
|
124
|
-
/** The closest known transformer action to a mistyped one (substring match either way), so a wrong action like
|
|
125
|
-
* "template" teaches "twigTemplate". Undefined when nothing is close. */
|
|
126
|
-
var suggestTransformer = (action) => {
|
|
127
|
-
const needle = action.toLowerCase();
|
|
128
|
-
return Object.keys(BUILTIN_TRANSFORMERS).find((name) => {
|
|
129
|
-
const known = name.toLowerCase();
|
|
130
|
-
return known.includes(needle) || needle.includes(known);
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
/** The transformer catalog projected for the data-sources resource / primer, so the agent knows the exact action
|
|
134
|
-
* names and params up front (the real fix for the "agent can't write transformers" problem). */
|
|
135
|
-
var transformerCatalog = () => Object.entries(BUILTIN_TRANSFORMERS).map(([action, { title, description, params }]) => ({
|
|
136
|
-
action,
|
|
137
|
-
title,
|
|
138
|
-
description,
|
|
139
|
-
params: Object.entries(params).map(([name, spec]) => ({
|
|
140
|
-
name,
|
|
141
|
-
type: spec.type,
|
|
142
|
-
description: spec.description,
|
|
143
|
-
...spec.default !== void 0 ? { default: spec.default } : {},
|
|
144
|
-
...spec.options ? { options: spec.options } : {}
|
|
145
|
-
}))
|
|
146
|
-
}));
|
|
147
|
-
//#endregion
|
|
148
|
-
export { BUILTIN_TRANSFORMERS, getTransformer, suggestTransformer, transformerCatalog };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ParamSpec } from './paramSpec';
|
|
2
|
-
export interface BuiltinUtility {
|
|
3
|
-
title: string;
|
|
4
|
-
strictParams: boolean;
|
|
5
|
-
params: ParamSpec;
|
|
6
|
-
}
|
|
7
|
-
export declare const BUILTIN_UTILITIES: Record<string, BuiltinUtility>;
|
|
8
|
-
/** The built-in utility for an action, or undefined when the action is not a known built-in utility. */
|
|
9
|
-
export declare const getUtility: (action: string) => BuiltinUtility | undefined;
|
|
10
|
-
/** Reconcile a `utility` action against the utility catalog: unknown keys dropped for a closed utility, then missing
|
|
11
|
-
* defaults filled. An unknown action yields unchanged params. */
|
|
12
|
-
export declare const applyUtility: (action: string, params: Record<string, unknown>) => {
|
|
13
|
-
known: boolean;
|
|
14
|
-
params: Record<string, unknown>;
|
|
15
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { reconcileParams } from "./paramSpec.js";
|
|
2
|
-
//#region src/modules/mcp/catalogs/builtinUtilities.ts
|
|
3
|
-
var BUILTIN_UTILITIES = {
|
|
4
|
-
delayTime: {
|
|
5
|
-
title: "Delay Time",
|
|
6
|
-
strictParams: true,
|
|
7
|
-
params: { time: {
|
|
8
|
-
type: "number",
|
|
9
|
-
description: "Milliseconds to wait before the next step runs. The key is \"time\" (not \"delay\")."
|
|
10
|
-
} }
|
|
11
|
-
},
|
|
12
|
-
twigTemplate: {
|
|
13
|
-
title: "Twig Template",
|
|
14
|
-
strictParams: true,
|
|
15
|
-
params: {
|
|
16
|
-
returnMode: {
|
|
17
|
-
type: "select",
|
|
18
|
-
description: "How the rendered template is returned.",
|
|
19
|
-
default: "text",
|
|
20
|
-
options: [
|
|
21
|
-
"text",
|
|
22
|
-
"json",
|
|
23
|
-
"jsonObject"
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
template: {
|
|
27
|
-
type: "textarea",
|
|
28
|
-
description: "The Twig template string to render against the flow/global params."
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
webHook: {
|
|
33
|
-
title: "Webhook",
|
|
34
|
-
strictParams: true,
|
|
35
|
-
params: {
|
|
36
|
-
url: {
|
|
37
|
-
type: "text",
|
|
38
|
-
description: "The URL to call."
|
|
39
|
-
},
|
|
40
|
-
method: {
|
|
41
|
-
type: "select",
|
|
42
|
-
description: "HTTP method.",
|
|
43
|
-
default: "get",
|
|
44
|
-
options: [
|
|
45
|
-
"get",
|
|
46
|
-
"post",
|
|
47
|
-
"put",
|
|
48
|
-
"delete",
|
|
49
|
-
"patch",
|
|
50
|
-
"head"
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
body: {
|
|
54
|
-
type: "textarea",
|
|
55
|
-
description: "Request body."
|
|
56
|
-
},
|
|
57
|
-
authorizationToken: {
|
|
58
|
-
type: "text",
|
|
59
|
-
description: "Value sent as the Authorization header."
|
|
60
|
-
},
|
|
61
|
-
credentials: {
|
|
62
|
-
type: "select",
|
|
63
|
-
description: "fetch credentials mode.",
|
|
64
|
-
default: "same-origin",
|
|
65
|
-
options: [
|
|
66
|
-
"include",
|
|
67
|
-
"omit",
|
|
68
|
-
"same-origin"
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
/** The built-in utility for an action, or undefined when the action is not a known built-in utility. */
|
|
75
|
-
var getUtility = (action) => Object.hasOwn(BUILTIN_UTILITIES, action) ? BUILTIN_UTILITIES[action] : void 0;
|
|
76
|
-
/** Reconcile a `utility` action against the utility catalog: unknown keys dropped for a closed utility, then missing
|
|
77
|
-
* defaults filled. An unknown action yields unchanged params. */
|
|
78
|
-
var applyUtility = (action, params) => {
|
|
79
|
-
const utility = getUtility(action);
|
|
80
|
-
if (!utility) return {
|
|
81
|
-
known: false,
|
|
82
|
-
params
|
|
83
|
-
};
|
|
84
|
-
return {
|
|
85
|
-
known: true,
|
|
86
|
-
params: reconcileParams(params, utility.params, utility.strictParams)
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
//#endregion
|
|
90
|
-
export { BUILTIN_UTILITIES, applyUtility, getUtility };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CssProps } from '../../types';
|
|
2
|
-
export declare const classifyBorderTokens: (value: string) => Record<"width" | "style" | "color", string>;
|
|
3
|
-
export declare const expandBorder: (key: string, value: string, out: CssProps) => void;
|
|
4
|
-
export declare const expandBorderGroup: (suffix: string, value: string, out: CssProps) => void;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { BORDER_STYLES, BORDER_WIDTH_KEYWORDS, LENGTH_RE, SIDES, expandTo4, splitTokens } from "./helpers.js";
|
|
2
|
-
//#region src/modules/mcp/catalogs/cssCatalog/border.ts
|
|
3
|
-
var BORDER_INITIAL = {
|
|
4
|
-
width: "medium",
|
|
5
|
-
style: "none",
|
|
6
|
-
color: "currentcolor"
|
|
7
|
-
};
|
|
8
|
-
var classifyBorderToken = (token) => {
|
|
9
|
-
if (BORDER_STYLES.has(token)) return "style";
|
|
10
|
-
if (BORDER_WIDTH_KEYWORDS.has(token) || LENGTH_RE.test(token)) return "width";
|
|
11
|
-
return "color";
|
|
12
|
-
};
|
|
13
|
-
var classifyBorderTokens = (value) => {
|
|
14
|
-
const parts = { ...BORDER_INITIAL };
|
|
15
|
-
for (const token of splitTokens(value)) parts[classifyBorderToken(token)] = token;
|
|
16
|
-
return parts;
|
|
17
|
-
};
|
|
18
|
-
var expandBorder = (key, value, out) => {
|
|
19
|
-
const sides = key === "border" ? SIDES : [key.slice(7)];
|
|
20
|
-
const parts = classifyBorderTokens(value);
|
|
21
|
-
for (const side of sides) for (const [kind, token] of Object.entries(parts)) out[`border-${side}-${kind}`] = token;
|
|
22
|
-
};
|
|
23
|
-
var expandBorderGroup = (suffix, value, out) => {
|
|
24
|
-
const values = expandTo4(splitTokens(value));
|
|
25
|
-
SIDES.forEach((side, index) => {
|
|
26
|
-
out[`border-${side}-${suffix}`] = values[index];
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
export { classifyBorderTokens, expandBorder, expandBorderGroup };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { CssProps } from '../../types';
|
|
2
|
-
export declare const expandBox: (key: string, value: string, out: CssProps) => void;
|
|
3
|
-
export declare const expandBorderRadius: (value: string, out: CssProps) => void;
|
|
4
|
-
export declare const expandGap: (value: string, out: CssProps) => void;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { expandTo4, splitPair, splitTokens } from "./helpers.js";
|
|
2
|
-
//#region src/modules/mcp/catalogs/cssCatalog/box.ts
|
|
3
|
-
var CORNERS = [
|
|
4
|
-
"top-left",
|
|
5
|
-
"top-right",
|
|
6
|
-
"bottom-right",
|
|
7
|
-
"bottom-left"
|
|
8
|
-
];
|
|
9
|
-
var expandBox = (key, value, out) => {
|
|
10
|
-
const [top, right, bottom, left] = expandTo4(splitTokens(value));
|
|
11
|
-
const prefix = key === "inset" ? "" : `${key}-`;
|
|
12
|
-
out[`${prefix}top`] = top;
|
|
13
|
-
out[`${prefix}right`] = right;
|
|
14
|
-
out[`${prefix}bottom`] = bottom;
|
|
15
|
-
out[`${prefix}left`] = left;
|
|
16
|
-
};
|
|
17
|
-
var expandBorderRadius = (value, out) => {
|
|
18
|
-
const [horizontal, vertical] = splitPair(value, "/");
|
|
19
|
-
const h = expandTo4(splitTokens(horizontal));
|
|
20
|
-
const v = vertical === void 0 ? void 0 : expandTo4(splitTokens(vertical));
|
|
21
|
-
CORNERS.forEach((corner, index) => {
|
|
22
|
-
out[`border-${corner}-radius`] = v ? `${h[index]} ${v[index]}` : h[index];
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
var expandGap = (value, out) => {
|
|
26
|
-
const [row, col = row] = splitTokens(value);
|
|
27
|
-
out["row-gap"] = row;
|
|
28
|
-
out["column-gap"] = col;
|
|
29
|
-
};
|
|
30
|
-
//#endregion
|
|
31
|
-
export { expandBorderRadius, expandBox, expandGap };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** Split a shorthand value into whitespace-separated tokens, keeping parenthesized and quoted runs whole. */
|
|
2
|
-
export declare const splitTokens: (value: string) => string[];
|
|
3
|
-
/** Split a value on a top-level separator. Used for the comma-separated layers of transition/animation/background
|
|
4
|
-
* and for the `/` of border-radius/grid-template/grid-row. */
|
|
5
|
-
export declare const splitOn: (value: string, separator: "," | "/") => string[];
|
|
6
|
-
/** Split a value on its first top-level `/` — the `a / b` form of border-radius, grid-template, background and
|
|
7
|
-
* font. Returns the half after the slash as undefined when there is none, which is what tells those expanders the
|
|
8
|
-
* second half was not declared at all. */
|
|
9
|
-
export declare const splitPair: (value: string, separator: "/") => [string, string | undefined];
|
|
10
|
-
export declare const TIME_RE: RegExp;
|
|
11
|
-
export declare const NUMBER_RE: RegExp;
|
|
12
|
-
/** A numeric value with an optional unit or `%` — matches both `12px` and `50%`. */
|
|
13
|
-
export declare const LENGTH_RE: RegExp;
|
|
14
|
-
export declare const QUOTE_RE: RegExp;
|
|
15
|
-
/** Resolve the 1–4 value syntax shared by padding/margin/inset (top/right/bottom/left) and border-radius
|
|
16
|
-
* (top-left/top-right/bottom-right/bottom-left): 1 value fills all, 2 pair up, 3 leave the 4th mirroring the 2nd. */
|
|
17
|
-
export declare const expandTo4: (tokens: string[]) => [string, string, string, string];
|
|
18
|
-
export declare const SIDES: readonly ["top", "right", "bottom", "left"];
|
|
19
|
-
export declare const FLEX_DIRECTIONS: Set<string>;
|
|
20
|
-
export declare const FLEX_WRAPS: Set<string>;
|
|
21
|
-
export declare const LIST_STYLE_TYPES: Set<string>;
|
|
22
|
-
export declare const LIST_STYLE_POSITIONS: Set<string>;
|
|
23
|
-
export declare const TEXT_DECORATION_LINES: Set<string>;
|
|
24
|
-
export declare const TEXT_DECORATION_STYLES: Set<string>;
|
|
25
|
-
/** A timing function may also be a function call — cubic-bezier(…) or steps(…). */
|
|
26
|
-
export declare const isTimingFunction: (token: string) => boolean;
|
|
27
|
-
export declare const ANIMATION_DIRECTIONS: Set<string>;
|
|
28
|
-
export declare const ANIMATION_FILL_MODES: Set<string>;
|
|
29
|
-
export declare const ANIMATION_PLAY_STATES: Set<string>;
|
|
30
|
-
export declare const FONT_STYLE_KEYWORDS: Set<string>;
|
|
31
|
-
export declare const FONT_VARIANT_KEYWORDS: Set<string>;
|
|
32
|
-
export declare const FONT_WEIGHT_KEYWORDS: Set<string>;
|
|
33
|
-
export declare const BORDER_STYLES: Set<string>;
|
|
34
|
-
export declare const BORDER_WIDTH_KEYWORDS: Set<string>;
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
//#region src/modules/mcp/catalogs/cssCatalog/helpers.ts
|
|
2
|
-
var walkTopLevel = (value, onChar) => {
|
|
3
|
-
let depth = 0;
|
|
4
|
-
let quote = "";
|
|
5
|
-
for (const ch of value) {
|
|
6
|
-
if (quote) {
|
|
7
|
-
onChar(ch, false);
|
|
8
|
-
if (ch === quote) quote = "";
|
|
9
|
-
continue;
|
|
10
|
-
}
|
|
11
|
-
if (/["']/.test(ch)) {
|
|
12
|
-
quote = ch;
|
|
13
|
-
onChar(ch, false);
|
|
14
|
-
continue;
|
|
15
|
-
}
|
|
16
|
-
if (ch === "(") depth += 1;
|
|
17
|
-
else if (ch === ")") depth = Math.max(0, depth - 1);
|
|
18
|
-
onChar(ch, depth === 0);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
/** Split a shorthand value into whitespace-separated tokens, keeping parenthesized and quoted runs whole. */
|
|
22
|
-
var splitTokens = (value) => {
|
|
23
|
-
const tokens = [];
|
|
24
|
-
let current = "";
|
|
25
|
-
walkTopLevel(value.trim(), (ch, topLevel) => {
|
|
26
|
-
if (topLevel && /\s/.test(ch)) {
|
|
27
|
-
if (current) {
|
|
28
|
-
tokens.push(current);
|
|
29
|
-
current = "";
|
|
30
|
-
}
|
|
31
|
-
} else current += ch;
|
|
32
|
-
});
|
|
33
|
-
if (current) tokens.push(current);
|
|
34
|
-
return tokens;
|
|
35
|
-
};
|
|
36
|
-
/** Split a value on a top-level separator. Used for the comma-separated layers of transition/animation/background
|
|
37
|
-
* and for the `/` of border-radius/grid-template/grid-row. */
|
|
38
|
-
var splitOn = (value, separator) => {
|
|
39
|
-
const parts = [];
|
|
40
|
-
let current = "";
|
|
41
|
-
walkTopLevel(value, (ch, topLevel) => {
|
|
42
|
-
if (topLevel && ch === separator) {
|
|
43
|
-
parts.push(current);
|
|
44
|
-
current = "";
|
|
45
|
-
} else current += ch;
|
|
46
|
-
});
|
|
47
|
-
parts.push(current);
|
|
48
|
-
return parts.map((part) => part.trim());
|
|
49
|
-
};
|
|
50
|
-
/** Split a value on its first top-level `/` — the `a / b` form of border-radius, grid-template, background and
|
|
51
|
-
* font. Returns the half after the slash as undefined when there is none, which is what tells those expanders the
|
|
52
|
-
* second half was not declared at all. */
|
|
53
|
-
var splitPair = (value, separator) => {
|
|
54
|
-
const [first, ...rest] = splitOn(value, separator);
|
|
55
|
-
return [first, rest.length > 0 ? rest.join(separator) : void 0];
|
|
56
|
-
};
|
|
57
|
-
var TIME_RE = /^-?[\d.]+(ms|s)$/;
|
|
58
|
-
var NUMBER_RE = /^-?[\d.]+$/;
|
|
59
|
-
/** A numeric value with an optional unit or `%` — matches both `12px` and `50%`. */
|
|
60
|
-
var LENGTH_RE = /^-?[\d.]+([a-z%]*)$/;
|
|
61
|
-
var QUOTE_RE = /^['"]/;
|
|
62
|
-
/** Resolve the 1–4 value syntax shared by padding/margin/inset (top/right/bottom/left) and border-radius
|
|
63
|
-
* (top-left/top-right/bottom-right/bottom-left): 1 value fills all, 2 pair up, 3 leave the 4th mirroring the 2nd. */
|
|
64
|
-
var expandTo4 = (tokens) => {
|
|
65
|
-
const [a, b = a, c = a, d = b] = tokens;
|
|
66
|
-
return [
|
|
67
|
-
a,
|
|
68
|
-
b,
|
|
69
|
-
c,
|
|
70
|
-
d
|
|
71
|
-
];
|
|
72
|
-
};
|
|
73
|
-
var SIDES = [
|
|
74
|
-
"top",
|
|
75
|
-
"right",
|
|
76
|
-
"bottom",
|
|
77
|
-
"left"
|
|
78
|
-
];
|
|
79
|
-
var FLEX_DIRECTIONS = /* @__PURE__ */ new Set([
|
|
80
|
-
"row",
|
|
81
|
-
"row-reverse",
|
|
82
|
-
"column",
|
|
83
|
-
"column-reverse"
|
|
84
|
-
]);
|
|
85
|
-
var FLEX_WRAPS = /* @__PURE__ */ new Set([
|
|
86
|
-
"nowrap",
|
|
87
|
-
"wrap",
|
|
88
|
-
"wrap-reverse"
|
|
89
|
-
]);
|
|
90
|
-
var LIST_STYLE_TYPES = /* @__PURE__ */ new Set([
|
|
91
|
-
"disc",
|
|
92
|
-
"circle",
|
|
93
|
-
"square",
|
|
94
|
-
"decimal",
|
|
95
|
-
"decimal-leading-zero",
|
|
96
|
-
"lower-roman",
|
|
97
|
-
"upper-roman",
|
|
98
|
-
"lower-alpha",
|
|
99
|
-
"upper-alpha",
|
|
100
|
-
"lower-greek",
|
|
101
|
-
"lower-latin",
|
|
102
|
-
"upper-latin",
|
|
103
|
-
"armenian",
|
|
104
|
-
"georgian",
|
|
105
|
-
"none"
|
|
106
|
-
]);
|
|
107
|
-
var LIST_STYLE_POSITIONS = /* @__PURE__ */ new Set(["inside", "outside"]);
|
|
108
|
-
var TEXT_DECORATION_LINES = /* @__PURE__ */ new Set([
|
|
109
|
-
"underline",
|
|
110
|
-
"overline",
|
|
111
|
-
"line-through",
|
|
112
|
-
"blink",
|
|
113
|
-
"none"
|
|
114
|
-
]);
|
|
115
|
-
var TEXT_DECORATION_STYLES = /* @__PURE__ */ new Set([
|
|
116
|
-
"solid",
|
|
117
|
-
"double",
|
|
118
|
-
"dotted",
|
|
119
|
-
"dashed",
|
|
120
|
-
"wavy"
|
|
121
|
-
]);
|
|
122
|
-
var TIMING_FUNCTIONS = /* @__PURE__ */ new Set([
|
|
123
|
-
"ease",
|
|
124
|
-
"linear",
|
|
125
|
-
"ease-in",
|
|
126
|
-
"ease-out",
|
|
127
|
-
"ease-in-out",
|
|
128
|
-
"step-start",
|
|
129
|
-
"step-end"
|
|
130
|
-
]);
|
|
131
|
-
/** A timing function may also be a function call — cubic-bezier(…) or steps(…). */
|
|
132
|
-
var isTimingFunction = (token) => TIMING_FUNCTIONS.has(token) || token.startsWith("cubic-bezier(") || token.startsWith("steps(");
|
|
133
|
-
var ANIMATION_DIRECTIONS = /* @__PURE__ */ new Set([
|
|
134
|
-
"normal",
|
|
135
|
-
"reverse",
|
|
136
|
-
"alternate",
|
|
137
|
-
"alternate-reverse"
|
|
138
|
-
]);
|
|
139
|
-
var ANIMATION_FILL_MODES = /* @__PURE__ */ new Set([
|
|
140
|
-
"none",
|
|
141
|
-
"forwards",
|
|
142
|
-
"backwards",
|
|
143
|
-
"both"
|
|
144
|
-
]);
|
|
145
|
-
var ANIMATION_PLAY_STATES = /* @__PURE__ */ new Set(["running", "paused"]);
|
|
146
|
-
var FONT_STYLE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
147
|
-
"normal",
|
|
148
|
-
"italic",
|
|
149
|
-
"oblique"
|
|
150
|
-
]);
|
|
151
|
-
var FONT_VARIANT_KEYWORDS = /* @__PURE__ */ new Set(["normal", "small-caps"]);
|
|
152
|
-
var FONT_WEIGHT_KEYWORDS = /* @__PURE__ */ new Set([
|
|
153
|
-
"normal",
|
|
154
|
-
"bold",
|
|
155
|
-
"bolder",
|
|
156
|
-
"lighter",
|
|
157
|
-
"100",
|
|
158
|
-
"200",
|
|
159
|
-
"300",
|
|
160
|
-
"400",
|
|
161
|
-
"500",
|
|
162
|
-
"600",
|
|
163
|
-
"700",
|
|
164
|
-
"800",
|
|
165
|
-
"900"
|
|
166
|
-
]);
|
|
167
|
-
var BORDER_STYLES = /* @__PURE__ */ new Set([
|
|
168
|
-
"none",
|
|
169
|
-
"hidden",
|
|
170
|
-
"dotted",
|
|
171
|
-
"dashed",
|
|
172
|
-
"solid",
|
|
173
|
-
"double",
|
|
174
|
-
"groove",
|
|
175
|
-
"ridge",
|
|
176
|
-
"inset",
|
|
177
|
-
"outset"
|
|
178
|
-
]);
|
|
179
|
-
var BORDER_WIDTH_KEYWORDS = /* @__PURE__ */ new Set([
|
|
180
|
-
"thin",
|
|
181
|
-
"medium",
|
|
182
|
-
"thick"
|
|
183
|
-
]);
|
|
184
|
-
//#endregion
|
|
185
|
-
export { ANIMATION_DIRECTIONS, ANIMATION_FILL_MODES, ANIMATION_PLAY_STATES, BORDER_STYLES, BORDER_WIDTH_KEYWORDS, FLEX_DIRECTIONS, FLEX_WRAPS, FONT_STYLE_KEYWORDS, FONT_VARIANT_KEYWORDS, FONT_WEIGHT_KEYWORDS, LENGTH_RE, LIST_STYLE_POSITIONS, LIST_STYLE_TYPES, NUMBER_RE, QUOTE_RE, SIDES, TEXT_DECORATION_LINES, TEXT_DECORATION_STYLES, TIME_RE, expandTo4, isTimingFunction, splitOn, splitPair, splitTokens };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CssProps } from '../../types';
|
|
2
|
-
/** Every kebab-case CSS property Plitzi's style engine understands. Values written to a definition
|
|
3
|
-
* must use these exact keys — camelCase or unknown keys are rejected by the validator. */
|
|
4
|
-
export declare const cssProperties: string[];
|
|
5
|
-
export declare const isCssProperty: (key: string) => boolean;
|
|
6
|
-
/** If a camelCase key maps to a known kebab-case property, return it — used to teach the agent the correct key. */
|
|
7
|
-
export declare const suggestCssProperty: (key: string) => string | undefined;
|
|
8
|
-
/** Every shorthand the MCP accepts and atomizes — advertised to the agent so it knows it may write plain CSS. */
|
|
9
|
-
export declare const cssShorthands: string[];
|
|
10
|
-
/** Expand supported CSS shorthands to their longhand keys. Explicit longhands in the same map win over any
|
|
11
|
-
* expansion (so `{ padding: 8, padding-left: 0 }` keeps padding-left: 0). Unrecognized keys pass through. */
|
|
12
|
-
export declare const expandShorthand: (css: CssProps) => CssProps;
|
|
13
|
-
export type CssPatch = Record<string, string | number | null>;
|
|
14
|
-
/** The longhand keys a shorthand controls — what a `null` patch value has to clear. */
|
|
15
|
-
export declare const shorthandLonghands: (key: string) => string[] | undefined;
|
|
16
|
-
/** Patch flavour of {@link expandShorthand}: a `null` value removes every longhand the key controls, so
|
|
17
|
-
* `{ padding: null }` clears all four sides rather than a `padding` key that was never stored. */
|
|
18
|
-
export declare const expandShorthandPatch: (css: CssPatch) => CssPatch;
|