@plitzi/sdk-shared 0.32.5 → 0.32.6
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 +8 -0
- package/dist/dataSource/getBindingsDetails.mjs +17 -23
- package/dist/dataSource/helpers/getSourceName.d.ts +4 -0
- package/dist/dataSource/helpers/getSourceName.mjs +4 -0
- package/dist/dataSource/helpers/index.d.ts +2 -0
- package/dist/dataSource/helpers/index.mjs +2 -0
- package/dist/dataSource/hooks/useRegisterSource.mjs +20 -18
- package/dist/dataSource/index.d.ts +1 -0
- package/dist/dataSource/index.mjs +5 -4
- package/dist/dataSource/utility/twigTemplate.mjs +3 -2
- package/dist/helpers/index.mjs +7 -5
- package/dist/helpers/twigWrapper/AST.d.ts +116 -0
- package/dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts +7 -0
- package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +220 -0
- package/dist/helpers/twigWrapper/Evaluator/helpers.d.ts +4 -0
- package/dist/helpers/twigWrapper/Evaluator/helpers.mjs +4 -0
- package/dist/helpers/twigWrapper/Evaluator/index.d.ts +2 -0
- package/dist/helpers/twigWrapper/Evaluator/index.mjs +2 -0
- package/dist/helpers/twigWrapper/Lexer/Lexer.d.ts +2 -0
- package/dist/helpers/twigWrapper/Lexer/Lexer.mjs +53 -0
- package/dist/helpers/twigWrapper/Lexer/index.d.ts +3 -0
- package/dist/helpers/twigWrapper/Lexer/index.mjs +3 -0
- package/dist/helpers/twigWrapper/Lexer/types.d.ts +17 -0
- package/dist/helpers/twigWrapper/Lexer/types.mjs +10 -0
- package/dist/helpers/twigWrapper/Parser/Cursor.d.ts +14 -0
- package/dist/helpers/twigWrapper/Parser/Cursor.mjs +63 -0
- package/dist/helpers/twigWrapper/Parser/ExpressionParser.d.ts +3 -0
- package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +296 -0
- package/dist/helpers/twigWrapper/Parser/Parser.d.ts +3 -0
- package/dist/helpers/twigWrapper/Parser/Parser.mjs +237 -0
- package/dist/helpers/twigWrapper/Parser/helpers.d.ts +2 -0
- package/dist/helpers/twigWrapper/Parser/helpers.mjs +18 -0
- package/dist/helpers/twigWrapper/Parser/index.d.ts +2 -0
- package/dist/helpers/twigWrapper/Parser/index.mjs +2 -0
- package/dist/helpers/twigWrapper/Parser/types.d.ts +5 -0
- package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.d.ts +17 -0
- package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs +64 -0
- package/dist/helpers/twigWrapper/TemplateCache/index.d.ts +1 -0
- package/dist/helpers/twigWrapper/TemplateCache/index.mjs +2 -0
- package/dist/helpers/twigWrapper/bench.bench.d.ts +1 -0
- package/dist/helpers/twigWrapper/charClass.d.ts +44 -0
- package/dist/helpers/twigWrapper/charClass.mjs +59 -0
- package/dist/helpers/twigWrapper/filters/filters.d.ts +14 -0
- package/dist/helpers/twigWrapper/filters/filters.mjs +372 -0
- package/dist/helpers/twigWrapper/filters/index.d.ts +1 -0
- package/dist/helpers/twigWrapper/filters/index.mjs +2 -0
- package/dist/helpers/twigWrapper/index.d.ts +5 -0
- package/dist/helpers/twigWrapper/index.mjs +4 -0
- package/dist/helpers/twigWrapper/processTwig/helpers.d.ts +7 -0
- package/dist/helpers/twigWrapper/processTwig/helpers.mjs +34 -0
- package/dist/helpers/twigWrapper/processTwig/index.d.ts +1 -0
- package/dist/helpers/twigWrapper/processTwig/index.mjs +2 -0
- package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +1 -0
- package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +24 -0
- package/dist/helpers/twigWrapper/tokens/hasValidToken.d.ts +1 -0
- package/dist/helpers/twigWrapper/tokens/hasValidToken.mjs +9 -0
- package/dist/helpers/twigWrapper/tokens/tokenPatterns.d.ts +2 -0
- package/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs +4 -0
- package/dist/hooks/useNetwork.mjs +1 -1
- package/dist/index.mjs +37 -34
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs +24 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.mjs +12 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs +24 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +9 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +1 -0
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.mjs +12 -0
- package/dist/network/graphql/builder/Mutations/index.d.ts +8 -0
- package/dist/network/graphql/builder/Mutations/index.mjs +124 -116
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +2 -0
- package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +1 -0
- package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/SegmentAddTemplateSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentAddElementSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentCloneElementSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription.d.ts +7 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription.mjs +27 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription.d.ts +8 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription.mjs +13 -0
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceAddTemplateSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdatedSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceAddElementSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceCloneElementSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription.mjs +26 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceAddPageSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceHomePageSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceUpdatePageSubscription.mjs +1 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription.d.ts +7 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription.mjs +12 -0
- package/dist/network/graphql/builder/Subscriptions/index.d.ts +12 -0
- package/dist/network/graphql/builder/Subscriptions/index.mjs +94 -86
- package/dist/network/graphql/sdk/Queries/InitQuery.mjs +2 -0
- package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +1 -0
- package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +1 -0
- package/dist/store/index.d.ts +33 -33
- package/dist/style/styleConstants.mjs +12 -8
- package/dist/types/CommonTypes.d.ts +1 -3
- package/dist/types/EventBridgeTypes.d.ts +1 -1
- package/dist/types/InteractionTypes.d.ts +2 -1
- package/dist/types/SchemaTypes.d.ts +6 -11
- package/dist/types/ServerTypes.d.ts +59 -0
- package/dist/types/StyleTypes.d.ts +1 -0
- package/package.json +176 -21
- package/dist/helpers/twigWrapper.d.ts +0 -4
- package/dist/helpers/twigWrapper.mjs +0 -33
|
@@ -108,21 +108,25 @@ var e = {
|
|
|
108
108
|
TEXT_OVERFLOW: "text-overflow",
|
|
109
109
|
TEXT_SHADOW: "text-shadow"
|
|
110
110
|
}, n = [
|
|
111
|
-
t.TEXT_DECORATION,
|
|
112
|
-
t.LINE_HEIGHT,
|
|
113
|
-
t.LETTER_SPACING,
|
|
114
|
-
t.COLOR,
|
|
115
|
-
t.DIRECTION,
|
|
116
111
|
t.FONT_FAMILY,
|
|
117
|
-
t.FONT_WEIGHT,
|
|
118
112
|
t.FONT_SIZE,
|
|
113
|
+
t.FONT_STYLE,
|
|
114
|
+
t.FONT_WEIGHT,
|
|
115
|
+
t.COLOR,
|
|
116
|
+
t.LINE_HEIGHT,
|
|
117
|
+
t.LETTER_SPACING,
|
|
119
118
|
t.TEXT_ALIGN,
|
|
119
|
+
t.TEXT_DECORATION,
|
|
120
120
|
t.TEXT_INDENT,
|
|
121
121
|
t.TEXT_SHADOW,
|
|
122
122
|
t.TEXT_TRANSFORM,
|
|
123
|
-
t.WHITE_SPACE,
|
|
124
123
|
t.TEXT_WRAP,
|
|
125
|
-
t.TEXT_OVERFLOW
|
|
124
|
+
t.TEXT_OVERFLOW,
|
|
125
|
+
t.WHITE_SPACE,
|
|
126
|
+
t.DIRECTION,
|
|
127
|
+
t.CURSOR,
|
|
128
|
+
t.LIST_STYLE,
|
|
129
|
+
t.LIST_STYLE_TYPE
|
|
126
130
|
], r = Object.values(t).map((e) => ({
|
|
127
131
|
path: e,
|
|
128
132
|
label: e
|
|
@@ -8,9 +8,7 @@ export type Server<T extends Record<string, unknown> = Record<string, unknown>>
|
|
|
8
8
|
host?: string;
|
|
9
9
|
domain?: string;
|
|
10
10
|
requestUrl?: string;
|
|
11
|
-
|
|
12
|
-
aiServer: string;
|
|
13
|
-
graphqlServer: string;
|
|
11
|
+
serverUrl: string;
|
|
14
12
|
websocketServer: string;
|
|
15
13
|
subscriptionServer: string;
|
|
16
14
|
location?: Location;
|
|
@@ -2,4 +2,4 @@ export type EventBridgeContextValue<T = any> = {
|
|
|
2
2
|
eventBridge: T;
|
|
3
3
|
};
|
|
4
4
|
export type EventBridgeModule = 'main' | 'builder' | 'segment' | 'template' | 'interaction' | 'element';
|
|
5
|
-
export type EventBridgeEvent = 'schemaAddPage' | 'schemaHomePage' | 'schemaUpdatePage' | 'schemaRemovePage' | 'schemaAddPageFolder' | 'schemaUpdatePageFolder' | 'schemaRemovePageFolder' | 'schemaUpdateSettings' | 'schemaUpdate' | 'schemaAddElement' | 'schemaUpdateElement' | 'schemaRemoveElement' | 'schemaMoveElement' | 'schemaCloneElement' | 'schemaAddVariable' | 'schemaUpdateVariable' | 'schemaRemoveVariable' | 'schemaAddTemplate' | 'styleUpdate' | 'styleAddSelector' | 'styleUpdateSelector' | 'styleRemoveSelector' | 'styleAddSelectorVariable' | 'styleUpdateSelectorVariable' | 'styleRemoveSelectorVariable' | 'styleAddVariable' | 'styleUpdateVariable' | 'styleRemoveVariable' | 'styleAddTemplate' | 'styleUpdateSettings' | 'builderSetBaseContext' | 'builderSetSelected' | 'builderSetHovered';
|
|
5
|
+
export type EventBridgeEvent = 'schemaAddPage' | 'schemaHomePage' | 'schemaUpdatePage' | 'schemaRemovePage' | 'schemaAddPageFolder' | 'schemaUpdatePageFolder' | 'schemaRemovePageFolder' | 'schemaUpdateSettings' | 'schemaUpdate' | 'schemaAddElement' | 'schemaUpdateElement' | 'schemaUpdateElements' | 'schemaRemoveElement' | 'schemaMoveElement' | 'schemaCloneElement' | 'schemaAddVariable' | 'schemaUpdateVariable' | 'schemaRemoveVariable' | 'schemaAddTemplate' | 'styleUpdate' | 'styleAddSelector' | 'styleUpdateSelector' | 'styleRemoveSelector' | 'styleRemoveSelectors' | 'styleAddSelectorVariable' | 'styleUpdateSelectorVariable' | 'styleRemoveSelectorVariable' | 'styleAddVariable' | 'styleUpdateVariable' | 'styleRemoveVariable' | 'styleAddTemplate' | 'styleUpdateSettings' | 'builderSetBaseContext' | 'builderSetSelected' | 'builderSetHovered';
|
|
@@ -68,6 +68,7 @@ export type InteractionCallback<T extends Record<string, unknown> = Record<strin
|
|
|
68
68
|
title: string;
|
|
69
69
|
type: InteractionCallbackType;
|
|
70
70
|
enabled?: boolean;
|
|
71
|
+
unreferenced?: boolean;
|
|
71
72
|
params: Record<keyof T, InteractionCallbackParam<T>> | ((params: InteractionCallbackParamValues<T>) => Record<keyof T, InteractionCallbackParam<T>>);
|
|
72
73
|
callback?: (params: InteractionCallbackParamValues<T>) => unknown;
|
|
73
74
|
postCallback?: InteractionPostCallback<T>;
|
|
@@ -92,7 +93,7 @@ export type Subscriptor<T extends Record<string, unknown> = Record<string, unkno
|
|
|
92
93
|
export type InteractionsContextValue<TManager = any> = {
|
|
93
94
|
interactionsManager: TManager;
|
|
94
95
|
useInteractions: <T extends Record<string, unknown> = Record<string, unknown>>(props: {
|
|
95
|
-
id
|
|
96
|
+
id?: string;
|
|
96
97
|
interactions?: Record<string, ElementInteraction>;
|
|
97
98
|
triggers?: Record<string, InteractionCallback<T>>;
|
|
98
99
|
callbacks?: Record<string, InteractionCallback<T>>;
|
|
@@ -13,21 +13,17 @@ export type SchemaRsc = {
|
|
|
13
13
|
export type DropPosition = 'top' | 'bottom' | 'left' | 'right' | 'inside' | 'custom';
|
|
14
14
|
export type BindingCategory = 'attributes' | 'style' | 'initialState';
|
|
15
15
|
export type BindingTransformer = {
|
|
16
|
-
type: 'utility' | 'unknown';
|
|
17
16
|
action: string;
|
|
18
|
-
params:
|
|
19
|
-
|
|
20
|
-
value: string;
|
|
21
|
-
};
|
|
17
|
+
params: Record<string, string>;
|
|
18
|
+
enabled?: boolean;
|
|
22
19
|
};
|
|
23
20
|
export type ElementBinding = {
|
|
24
21
|
id: string;
|
|
25
22
|
source: string;
|
|
26
|
-
fromPath?: string;
|
|
27
23
|
transformers?: BindingTransformer[];
|
|
28
24
|
when?: RuleGroup;
|
|
29
25
|
enabled?: boolean;
|
|
30
|
-
|
|
26
|
+
to: string;
|
|
31
27
|
};
|
|
32
28
|
export type ElementInteraction<T extends Record<keyof InteractionCallback['params'], unknown> = Record<string, unknown>> = {
|
|
33
29
|
id: string;
|
|
@@ -36,7 +32,7 @@ export type ElementInteraction<T extends Record<keyof InteractionCallback['param
|
|
|
36
32
|
action: string;
|
|
37
33
|
params: InteractionCallbackParamValues<T>;
|
|
38
34
|
preview: Record<string, unknown>;
|
|
39
|
-
elementId: Element['id'];
|
|
35
|
+
elementId: Element['id'] | null;
|
|
40
36
|
beforeNode: string;
|
|
41
37
|
afterNode: string;
|
|
42
38
|
flowId: string;
|
|
@@ -65,12 +61,10 @@ export type ElementDefinition = {
|
|
|
65
61
|
runtime?: ElementRuntime;
|
|
66
62
|
/** Controls when the element is loaded/rendered. */
|
|
67
63
|
loadStrategy?: ElementLoadStrategy;
|
|
68
|
-
/** Stable, human-readable reference chosen by an AI agent (mcp-ai). Lets agents address this element
|
|
69
|
-
* without knowing its opaque `id`. Optional and ignored by rendering. */
|
|
70
|
-
aiRef?: string;
|
|
71
64
|
};
|
|
72
65
|
export type Element<TAttributes extends Record<string, unknown> = Record<string, unknown>> = {
|
|
73
66
|
id: string;
|
|
67
|
+
idRef?: string;
|
|
74
68
|
attributes: TAttributes & {
|
|
75
69
|
subType?: string;
|
|
76
70
|
};
|
|
@@ -128,6 +122,7 @@ export type SchemaContextValue = {
|
|
|
128
122
|
schemaUpdate?: (newSchema: SchemaRaw, fromSubscriptions?: boolean) => void;
|
|
129
123
|
schemaAddElement?: (to: string, data: Element, dropPosition?: DropPosition, initialItems?: Record<string, Element>, variables?: SchemaVariable[], fromSubscriptions?: boolean) => void;
|
|
130
124
|
schemaUpdateElement?: (element: Element, fromSubscriptions?: boolean) => void;
|
|
125
|
+
schemaUpdateElements?: (elements: Element[], fromSubscriptions?: boolean) => void;
|
|
131
126
|
schemaMoveElement?: (from: string, to: string, elementId: string, dropPosition?: DropPosition, fromSubscriptions?: boolean) => void;
|
|
132
127
|
schemaCloneElement?: (elementId: string, targetId?: string, fromSubscriptions?: boolean) => void;
|
|
133
128
|
schemaRemoveElement?: (elementId: string, fromSubscriptions?: boolean) => void;
|
|
@@ -122,6 +122,36 @@ export type SSRRscData = {
|
|
|
122
122
|
/** Per-element server data keyed by schema element ID. Each element reads its own slice via its id prop. */
|
|
123
123
|
serverData?: Record<string, unknown>;
|
|
124
124
|
};
|
|
125
|
+
/** Semantic + machine-readable metadata for one element type, so the MCP can tell an agent what the type DOES
|
|
126
|
+
* (not just that it exists) AND validate against it. `category` groups it (e.g. provider, structure, media);
|
|
127
|
+
* `custom` marks a plugin-provided type. The MCP keys strict-vs-lenient validation off `custom`: a `custom:false`
|
|
128
|
+
* (default sdk-elements) type is authoritative — an unknown attribute/setState key on it is an error — while a
|
|
129
|
+
* `custom:true` (plugin) type is best-effort (warnings only), since its metadata is a manifest snapshot. */
|
|
130
|
+
export type ComponentCatalogEntry = {
|
|
131
|
+
label?: string;
|
|
132
|
+
description?: string;
|
|
133
|
+
category?: string;
|
|
134
|
+
custom?: boolean;
|
|
135
|
+
/** The type's attribute/prop keys — the authoritative set for a default type (setState `key` when
|
|
136
|
+
* category="attribute", and type-prop validation). Absent when unknown (e.g. a plugin with no manifest). */
|
|
137
|
+
attributes?: string[];
|
|
138
|
+
/** The type's `definition.styleSelectors` keys (slots) — setState `key` when category="state" is
|
|
139
|
+
* `visibility` or `styleSelectors.<selector>`. */
|
|
140
|
+
styleSelectors?: string[];
|
|
141
|
+
/** The type's intrinsic base default CSS (its `defaultStyle.style.base.default`) — the declarations the element
|
|
142
|
+
* renders with before any class is attached, e.g. `text` defaults to `{ display: 'inline' }`. The MCP surfaces
|
|
143
|
+
* it so an agent styles against the real starting point instead of assuming `display: block`. */
|
|
144
|
+
defaultStyle?: Record<string, string>;
|
|
145
|
+
/** Binding targets the type exposes, from the plugin manifest's `defaultStyle.bindingsAllowed`. */
|
|
146
|
+
bindingsAllowed?: {
|
|
147
|
+
attributes?: string[];
|
|
148
|
+
initialState?: string[];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
/** Element type → its semantic metadata, keyed by the `type` string used in the schema. Covers BOTH the default
|
|
152
|
+
* sdk-elements types (custom:false, authoritative) and the plugin (custom:true) element types installed on a
|
|
153
|
+
* space, so the MCP can validate types/attributes dynamically per space instead of against a hand-mirror. */
|
|
154
|
+
export type ComponentCatalog = Record<string, ComponentCatalogEntry>;
|
|
125
155
|
export type SSRAdapters = {
|
|
126
156
|
getOfflineData: (spaceId: number, environment: string, revision?: number) => Promise<OfflineDataRaw | undefined>;
|
|
127
157
|
getSpaceDeployment: (req: SSRRequest) => Promise<SSRSpaceDeployment>;
|
|
@@ -138,6 +168,10 @@ export type SSRAdapters = {
|
|
|
138
168
|
getSchema?: (spaceId: number, environment: Environment) => Promise<Schema | undefined>;
|
|
139
169
|
/** Read the full style document (with `platform`/`mode`, which the MCP definitions resource requires). */
|
|
140
170
|
getStyle?: (spaceId: number, environment: Environment) => Promise<Style | undefined>;
|
|
171
|
+
/** Read the semantic catalog of the space's PLUGIN (custom) element types — label/description/category from
|
|
172
|
+
* each installed plugin's manifest — so the MCP `plitzi://types` resource can explain what custom elements do.
|
|
173
|
+
* The MCP already knows the built-in types. When omitted, custom types surface with their observed label only. */
|
|
174
|
+
getComponentCatalog?: (spaceId: number, environment: Environment) => Promise<ComponentCatalog | undefined>;
|
|
141
175
|
/** Persist the element schema mutated by the MCP `apply` tool. When omitted, `apply` reports `persisted: false`. */
|
|
142
176
|
saveSchema?: (spaceId: number, environment: Environment, schema: Schema) => Promise<void>;
|
|
143
177
|
/** Persist the style document mutated by the MCP `apply` tool. Implementations must recompute `style.cache`
|
|
@@ -159,6 +193,27 @@ export type SSRRscConfig = {
|
|
|
159
193
|
/** Server-side cache TTL for RSC responses in milliseconds. Defaults to 30 000. Set to 0 to disable. */
|
|
160
194
|
cacheTtlMs?: number;
|
|
161
195
|
};
|
|
196
|
+
/** A structured log event the MCP server emits for each tool call and resource read, so a CONSUMER can render its
|
|
197
|
+
* own request log (dev tooling, a dashboard, structured logging). Wire a sink via `SSRServerConfig.mcpLogger`;
|
|
198
|
+
* without one the server prints to the console only when `MCP_DEBUG=1`. */
|
|
199
|
+
export type McpLogEvent = {
|
|
200
|
+
/** 'tool' for a plitzi_* tool call, 'resource' for a plitzi:// resource read. */
|
|
201
|
+
kind: 'tool' | 'resource';
|
|
202
|
+
/** The tool name (e.g. 'plitzi_apply') or the resource URI that was read. */
|
|
203
|
+
name: string;
|
|
204
|
+
/** Wall-clock duration of the handler, in milliseconds. */
|
|
205
|
+
durationMs: number;
|
|
206
|
+
/** Whether the handler completed without throwing. */
|
|
207
|
+
ok: boolean;
|
|
208
|
+
/** The error message when `ok` is false. */
|
|
209
|
+
error?: string;
|
|
210
|
+
/** A compact, truncated JSON summary of the tool arguments (tool events only). */
|
|
211
|
+
argsSummary?: string;
|
|
212
|
+
/** ISO-8601 timestamp of when the event was emitted. */
|
|
213
|
+
timestamp: string;
|
|
214
|
+
};
|
|
215
|
+
/** A sink the consumer provides to receive every MCP {@link McpLogEvent} (see `SSRServerConfig.mcpLogger`). */
|
|
216
|
+
export type McpLogger = (event: McpLogEvent) => void;
|
|
162
217
|
export type SSRServerConfig = {
|
|
163
218
|
port?: number;
|
|
164
219
|
host?: string;
|
|
@@ -202,6 +257,10 @@ export type SSRServerConfig = {
|
|
|
202
257
|
enabled?: boolean;
|
|
203
258
|
path?: string;
|
|
204
259
|
};
|
|
260
|
+
/** Receives a structured {@link McpLogEvent} for every MCP tool call and resource read, so the consumer can
|
|
261
|
+
* render its own request log (e.g. in dev mode). Without it, the MCP server logs to the console only when
|
|
262
|
+
* `MCP_DEBUG=1`. */
|
|
263
|
+
mcpLogger?: McpLogger;
|
|
205
264
|
adapters: SSRAdapters;
|
|
206
265
|
/** Draft-preview endpoint for the MCP visual-preview tools (the RENDERER side). Off unless `enabled`. */
|
|
207
266
|
preview?: SSRPreviewConfig;
|
|
@@ -48,6 +48,7 @@ export type StyleContextValue = {
|
|
|
48
48
|
styleAddSelector?: unknown;
|
|
49
49
|
styleUpdateSelector?: unknown;
|
|
50
50
|
styleRemoveSelector?: unknown;
|
|
51
|
+
styleRemoveSelectors?: unknown;
|
|
51
52
|
styleAddSelectorVariable?: unknown;
|
|
52
53
|
styleUpdateSelectorVariable?: unknown;
|
|
53
54
|
styleRemoveSelectorVariable?: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-shared",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.6",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -54,6 +54,18 @@
|
|
|
54
54
|
"types": "./dist/dataSource/getBindingsDetails.d.ts",
|
|
55
55
|
"import": "./dist/dataSource/getBindingsDetails.mjs"
|
|
56
56
|
},
|
|
57
|
+
"./dataSource/helpers": {
|
|
58
|
+
"types": "./dist/dataSource/helpers/index.d.ts",
|
|
59
|
+
"import": "./dist/dataSource/helpers/index.mjs"
|
|
60
|
+
},
|
|
61
|
+
"./dataSource/helpers/getSourceName": {
|
|
62
|
+
"types": "./dist/dataSource/helpers/getSourceName.d.ts",
|
|
63
|
+
"import": "./dist/dataSource/helpers/getSourceName.mjs"
|
|
64
|
+
},
|
|
65
|
+
"./dataSource/helpers/index": {
|
|
66
|
+
"types": "./dist/dataSource/helpers/index.d.ts",
|
|
67
|
+
"import": "./dist/dataSource/helpers/index.mjs"
|
|
68
|
+
},
|
|
57
69
|
"./dataSource/hooks": {
|
|
58
70
|
"types": "./dist/dataSource/hooks/index.d.ts",
|
|
59
71
|
"import": "./dist/dataSource/hooks/index.mjs"
|
|
@@ -170,8 +182,120 @@
|
|
|
170
182
|
"import": "./dist/helpers/syntaxHighlight.mjs"
|
|
171
183
|
},
|
|
172
184
|
"./helpers/twigWrapper": {
|
|
173
|
-
"types": "./dist/helpers/twigWrapper.d.ts",
|
|
174
|
-
"import": "./dist/helpers/twigWrapper.mjs"
|
|
185
|
+
"types": "./dist/helpers/twigWrapper/index.d.ts",
|
|
186
|
+
"import": "./dist/helpers/twigWrapper/index.mjs"
|
|
187
|
+
},
|
|
188
|
+
"./helpers/twigWrapper/Evaluator": {
|
|
189
|
+
"types": "./dist/helpers/twigWrapper/Evaluator/index.d.ts",
|
|
190
|
+
"import": "./dist/helpers/twigWrapper/Evaluator/index.mjs"
|
|
191
|
+
},
|
|
192
|
+
"./helpers/twigWrapper/Evaluator/Evaluator": {
|
|
193
|
+
"types": "./dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts",
|
|
194
|
+
"import": "./dist/helpers/twigWrapper/Evaluator/Evaluator.mjs"
|
|
195
|
+
},
|
|
196
|
+
"./helpers/twigWrapper/Evaluator/helpers": {
|
|
197
|
+
"types": "./dist/helpers/twigWrapper/Evaluator/helpers.d.ts",
|
|
198
|
+
"import": "./dist/helpers/twigWrapper/Evaluator/helpers.mjs"
|
|
199
|
+
},
|
|
200
|
+
"./helpers/twigWrapper/Evaluator/index": {
|
|
201
|
+
"types": "./dist/helpers/twigWrapper/Evaluator/index.d.ts",
|
|
202
|
+
"import": "./dist/helpers/twigWrapper/Evaluator/index.mjs"
|
|
203
|
+
},
|
|
204
|
+
"./helpers/twigWrapper/Lexer": {
|
|
205
|
+
"types": "./dist/helpers/twigWrapper/Lexer/index.d.ts",
|
|
206
|
+
"import": "./dist/helpers/twigWrapper/Lexer/index.mjs"
|
|
207
|
+
},
|
|
208
|
+
"./helpers/twigWrapper/Lexer/Lexer": {
|
|
209
|
+
"types": "./dist/helpers/twigWrapper/Lexer/Lexer.d.ts",
|
|
210
|
+
"import": "./dist/helpers/twigWrapper/Lexer/Lexer.mjs"
|
|
211
|
+
},
|
|
212
|
+
"./helpers/twigWrapper/Lexer/index": {
|
|
213
|
+
"types": "./dist/helpers/twigWrapper/Lexer/index.d.ts",
|
|
214
|
+
"import": "./dist/helpers/twigWrapper/Lexer/index.mjs"
|
|
215
|
+
},
|
|
216
|
+
"./helpers/twigWrapper/Lexer/types": {
|
|
217
|
+
"types": "./dist/helpers/twigWrapper/Lexer/types.d.ts",
|
|
218
|
+
"import": "./dist/helpers/twigWrapper/Lexer/types.mjs"
|
|
219
|
+
},
|
|
220
|
+
"./helpers/twigWrapper/Parser": {
|
|
221
|
+
"types": "./dist/helpers/twigWrapper/Parser/index.d.ts",
|
|
222
|
+
"import": "./dist/helpers/twigWrapper/Parser/index.mjs"
|
|
223
|
+
},
|
|
224
|
+
"./helpers/twigWrapper/Parser/Cursor": {
|
|
225
|
+
"types": "./dist/helpers/twigWrapper/Parser/Cursor.d.ts",
|
|
226
|
+
"import": "./dist/helpers/twigWrapper/Parser/Cursor.mjs"
|
|
227
|
+
},
|
|
228
|
+
"./helpers/twigWrapper/Parser/ExpressionParser": {
|
|
229
|
+
"types": "./dist/helpers/twigWrapper/Parser/ExpressionParser.d.ts",
|
|
230
|
+
"import": "./dist/helpers/twigWrapper/Parser/ExpressionParser.mjs"
|
|
231
|
+
},
|
|
232
|
+
"./helpers/twigWrapper/Parser/Parser": {
|
|
233
|
+
"types": "./dist/helpers/twigWrapper/Parser/Parser.d.ts",
|
|
234
|
+
"import": "./dist/helpers/twigWrapper/Parser/Parser.mjs"
|
|
235
|
+
},
|
|
236
|
+
"./helpers/twigWrapper/Parser/helpers": {
|
|
237
|
+
"types": "./dist/helpers/twigWrapper/Parser/helpers.d.ts",
|
|
238
|
+
"import": "./dist/helpers/twigWrapper/Parser/helpers.mjs"
|
|
239
|
+
},
|
|
240
|
+
"./helpers/twigWrapper/Parser/index": {
|
|
241
|
+
"types": "./dist/helpers/twigWrapper/Parser/index.d.ts",
|
|
242
|
+
"import": "./dist/helpers/twigWrapper/Parser/index.mjs"
|
|
243
|
+
},
|
|
244
|
+
"./helpers/twigWrapper/TemplateCache": {
|
|
245
|
+
"types": "./dist/helpers/twigWrapper/TemplateCache/index.d.ts",
|
|
246
|
+
"import": "./dist/helpers/twigWrapper/TemplateCache/index.mjs"
|
|
247
|
+
},
|
|
248
|
+
"./helpers/twigWrapper/TemplateCache/TemplateCache": {
|
|
249
|
+
"types": "./dist/helpers/twigWrapper/TemplateCache/TemplateCache.d.ts",
|
|
250
|
+
"import": "./dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs"
|
|
251
|
+
},
|
|
252
|
+
"./helpers/twigWrapper/TemplateCache/index": {
|
|
253
|
+
"types": "./dist/helpers/twigWrapper/TemplateCache/index.d.ts",
|
|
254
|
+
"import": "./dist/helpers/twigWrapper/TemplateCache/index.mjs"
|
|
255
|
+
},
|
|
256
|
+
"./helpers/twigWrapper/charClass": {
|
|
257
|
+
"types": "./dist/helpers/twigWrapper/charClass.d.ts",
|
|
258
|
+
"import": "./dist/helpers/twigWrapper/charClass.mjs"
|
|
259
|
+
},
|
|
260
|
+
"./helpers/twigWrapper/filters": {
|
|
261
|
+
"types": "./dist/helpers/twigWrapper/filters/index.d.ts",
|
|
262
|
+
"import": "./dist/helpers/twigWrapper/filters/index.mjs"
|
|
263
|
+
},
|
|
264
|
+
"./helpers/twigWrapper/filters/filters": {
|
|
265
|
+
"types": "./dist/helpers/twigWrapper/filters/filters.d.ts",
|
|
266
|
+
"import": "./dist/helpers/twigWrapper/filters/filters.mjs"
|
|
267
|
+
},
|
|
268
|
+
"./helpers/twigWrapper/filters/index": {
|
|
269
|
+
"types": "./dist/helpers/twigWrapper/filters/index.d.ts",
|
|
270
|
+
"import": "./dist/helpers/twigWrapper/filters/index.mjs"
|
|
271
|
+
},
|
|
272
|
+
"./helpers/twigWrapper/index": {
|
|
273
|
+
"types": "./dist/helpers/twigWrapper/index.d.ts",
|
|
274
|
+
"import": "./dist/helpers/twigWrapper/index.mjs"
|
|
275
|
+
},
|
|
276
|
+
"./helpers/twigWrapper/processTwig": {
|
|
277
|
+
"types": "./dist/helpers/twigWrapper/processTwig/index.d.ts",
|
|
278
|
+
"import": "./dist/helpers/twigWrapper/processTwig/index.mjs"
|
|
279
|
+
},
|
|
280
|
+
"./helpers/twigWrapper/processTwig/helpers": {
|
|
281
|
+
"types": "./dist/helpers/twigWrapper/processTwig/helpers.d.ts",
|
|
282
|
+
"import": "./dist/helpers/twigWrapper/processTwig/helpers.mjs"
|
|
283
|
+
},
|
|
284
|
+
"./helpers/twigWrapper/processTwig/index": {
|
|
285
|
+
"types": "./dist/helpers/twigWrapper/processTwig/index.d.ts",
|
|
286
|
+
"import": "./dist/helpers/twigWrapper/processTwig/index.mjs"
|
|
287
|
+
},
|
|
288
|
+
"./helpers/twigWrapper/processTwig/processTwig": {
|
|
289
|
+
"types": "./dist/helpers/twigWrapper/processTwig/processTwig.d.ts",
|
|
290
|
+
"import": "./dist/helpers/twigWrapper/processTwig/processTwig.mjs"
|
|
291
|
+
},
|
|
292
|
+
"./helpers/twigWrapper/tokens/hasValidToken": {
|
|
293
|
+
"types": "./dist/helpers/twigWrapper/tokens/hasValidToken.d.ts",
|
|
294
|
+
"import": "./dist/helpers/twigWrapper/tokens/hasValidToken.mjs"
|
|
295
|
+
},
|
|
296
|
+
"./helpers/twigWrapper/tokens/tokenPatterns": {
|
|
297
|
+
"types": "./dist/helpers/twigWrapper/tokens/tokenPatterns.d.ts",
|
|
298
|
+
"import": "./dist/helpers/twigWrapper/tokens/tokenPatterns.mjs"
|
|
175
299
|
},
|
|
176
300
|
"./helpers/utils": {
|
|
177
301
|
"types": "./dist/helpers/utils.d.ts",
|
|
@@ -285,6 +409,10 @@
|
|
|
285
409
|
"types": "./dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.d.ts",
|
|
286
410
|
"import": "./dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs"
|
|
287
411
|
},
|
|
412
|
+
"./network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation": {
|
|
413
|
+
"types": "./dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.d.ts",
|
|
414
|
+
"import": "./dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs"
|
|
415
|
+
},
|
|
288
416
|
"./network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation": {
|
|
289
417
|
"types": "./dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.d.ts",
|
|
290
418
|
"import": "./dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.mjs"
|
|
@@ -317,6 +445,10 @@
|
|
|
317
445
|
"types": "./dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.d.ts",
|
|
318
446
|
"import": "./dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.mjs"
|
|
319
447
|
},
|
|
448
|
+
"./network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation": {
|
|
449
|
+
"types": "./dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.d.ts",
|
|
450
|
+
"import": "./dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.mjs"
|
|
451
|
+
},
|
|
320
452
|
"./network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation": {
|
|
321
453
|
"types": "./dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.d.ts",
|
|
322
454
|
"import": "./dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.mjs"
|
|
@@ -373,6 +505,10 @@
|
|
|
373
505
|
"types": "./dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.d.ts",
|
|
374
506
|
"import": "./dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs"
|
|
375
507
|
},
|
|
508
|
+
"./network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation": {
|
|
509
|
+
"types": "./dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.d.ts",
|
|
510
|
+
"import": "./dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs"
|
|
511
|
+
},
|
|
376
512
|
"./network/graphql/builder/Mutations/Space/SpaceUpdateMutation": {
|
|
377
513
|
"types": "./dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.d.ts",
|
|
378
514
|
"import": "./dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs"
|
|
@@ -497,6 +633,10 @@
|
|
|
497
633
|
"types": "./dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.d.ts",
|
|
498
634
|
"import": "./dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.mjs"
|
|
499
635
|
},
|
|
636
|
+
"./network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation": {
|
|
637
|
+
"types": "./dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.d.ts",
|
|
638
|
+
"import": "./dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.mjs"
|
|
639
|
+
},
|
|
500
640
|
"./network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation": {
|
|
501
641
|
"types": "./dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.d.ts",
|
|
502
642
|
"import": "./dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.mjs"
|
|
@@ -613,6 +753,10 @@
|
|
|
613
753
|
"types": "./dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.d.ts",
|
|
614
754
|
"import": "./dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.mjs"
|
|
615
755
|
},
|
|
756
|
+
"./network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription": {
|
|
757
|
+
"types": "./dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription.d.ts",
|
|
758
|
+
"import": "./dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription.mjs"
|
|
759
|
+
},
|
|
616
760
|
"./network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription": {
|
|
617
761
|
"types": "./dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription.d.ts",
|
|
618
762
|
"import": "./dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription.mjs"
|
|
@@ -645,6 +789,10 @@
|
|
|
645
789
|
"types": "./dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorSubscription.d.ts",
|
|
646
790
|
"import": "./dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorSubscription.mjs"
|
|
647
791
|
},
|
|
792
|
+
"./network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription": {
|
|
793
|
+
"types": "./dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription.d.ts",
|
|
794
|
+
"import": "./dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription.mjs"
|
|
795
|
+
},
|
|
648
796
|
"./network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription": {
|
|
649
797
|
"types": "./dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription.d.ts",
|
|
650
798
|
"import": "./dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription.mjs"
|
|
@@ -693,6 +841,10 @@
|
|
|
693
841
|
"types": "./dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.d.ts",
|
|
694
842
|
"import": "./dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.mjs"
|
|
695
843
|
},
|
|
844
|
+
"./network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription": {
|
|
845
|
+
"types": "./dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription.d.ts",
|
|
846
|
+
"import": "./dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription.mjs"
|
|
847
|
+
},
|
|
696
848
|
"./network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription": {
|
|
697
849
|
"types": "./dist/network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription.d.ts",
|
|
698
850
|
"import": "./dist/network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription.mjs"
|
|
@@ -749,6 +901,10 @@
|
|
|
749
901
|
"types": "./dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorSubscription.d.ts",
|
|
750
902
|
"import": "./dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorSubscription.mjs"
|
|
751
903
|
},
|
|
904
|
+
"./network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription": {
|
|
905
|
+
"types": "./dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription.d.ts",
|
|
906
|
+
"import": "./dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription.mjs"
|
|
907
|
+
},
|
|
752
908
|
"./network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription": {
|
|
753
909
|
"types": "./dist/network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription.d.ts",
|
|
754
910
|
"import": "./dist/network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription.mjs"
|
|
@@ -1069,6 +1225,7 @@
|
|
|
1069
1225
|
"scripts": {
|
|
1070
1226
|
"lint": "eslint ./src",
|
|
1071
1227
|
"test": "vitest run",
|
|
1228
|
+
"bench": "vitest bench",
|
|
1072
1229
|
"typecheck": "tsc -p tsconfig.app.json --noEmit",
|
|
1073
1230
|
"build:dev": "vite build --mode development --minify false && node ./scripts/generate-exports.mjs",
|
|
1074
1231
|
"build:dev-watch": "vite build --mode development --watch --minify false",
|
|
@@ -1076,13 +1233,12 @@
|
|
|
1076
1233
|
},
|
|
1077
1234
|
"dependencies": {
|
|
1078
1235
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
1079
|
-
"@plitzi/nexus": "0.32.
|
|
1080
|
-
"@plitzi/plitzi-ui": "^1.6.
|
|
1236
|
+
"@plitzi/nexus": "0.32.6",
|
|
1237
|
+
"@plitzi/plitzi-ui": "^1.6.17",
|
|
1081
1238
|
"date-fns": "^4.4.0",
|
|
1082
1239
|
"date-fns-tz": "^3.2.0",
|
|
1083
1240
|
"graphql-tag": "^2.12.7",
|
|
1084
|
-
"immer": "^11.1.
|
|
1085
|
-
"twig": "^3.0.0",
|
|
1241
|
+
"immer": "^11.1.15",
|
|
1086
1242
|
"zod": "^4.4.3"
|
|
1087
1243
|
},
|
|
1088
1244
|
"peerDependencies": {
|
|
@@ -1104,36 +1260,35 @@
|
|
|
1104
1260
|
"@testing-library/user-event": "^14.6.1",
|
|
1105
1261
|
"@types/react": "^19.2.17",
|
|
1106
1262
|
"@types/react-dom": "^19.2.3",
|
|
1107
|
-
"@
|
|
1108
|
-
"@vitejs/plugin-react": "^6.0.3",
|
|
1263
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
1109
1264
|
"@vitest/coverage-v8": "^4.1.10",
|
|
1110
1265
|
"babel-minify": "^0.5.2",
|
|
1111
|
-
"eslint": "^9.39.
|
|
1266
|
+
"eslint": "^9.39.5",
|
|
1112
1267
|
"eslint-config-airbnb": "^19.0.4",
|
|
1113
1268
|
"eslint-config-prettier": "^10.1.8",
|
|
1114
|
-
"eslint-config-turbo": "^2.10.
|
|
1269
|
+
"eslint-config-turbo": "^2.10.6",
|
|
1115
1270
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
1116
|
-
"eslint-plugin-cypress": "^6.4.
|
|
1271
|
+
"eslint-plugin-cypress": "^6.4.3",
|
|
1117
1272
|
"eslint-plugin-flowtype": "8.0.3",
|
|
1118
1273
|
"eslint-plugin-import": "^2.32.0",
|
|
1119
|
-
"eslint-plugin-jsdoc": "^63.0
|
|
1274
|
+
"eslint-plugin-jsdoc": "^63.2.0",
|
|
1120
1275
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
1121
1276
|
"eslint-plugin-prettier": "^5.5.6",
|
|
1122
1277
|
"eslint-plugin-react": "^7.37.5",
|
|
1123
1278
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
1124
1279
|
"eslint-plugin-react-refresh": "^0.5.3",
|
|
1125
|
-
"eslint-plugin-storybook": "^10.5.
|
|
1280
|
+
"eslint-plugin-storybook": "^10.5.3",
|
|
1126
1281
|
"globals": "^17.7.0",
|
|
1127
1282
|
"jsdom": "^29.1.1",
|
|
1128
|
-
"postcss": "^8.5.
|
|
1129
|
-
"prettier": "^3.9.
|
|
1130
|
-
"react": "^19.2.
|
|
1131
|
-
"react-dom": "^19.2.
|
|
1132
|
-
"tailwindcss": "^4.3.
|
|
1283
|
+
"postcss": "^8.5.22",
|
|
1284
|
+
"prettier": "^3.9.6",
|
|
1285
|
+
"react": "^19.2.8",
|
|
1286
|
+
"react-dom": "^19.2.8",
|
|
1287
|
+
"tailwindcss": "^4.3.3",
|
|
1133
1288
|
"terser": "^5.49.0",
|
|
1134
1289
|
"typescript": "^6.0.3",
|
|
1135
|
-
"typescript-eslint": "^8.
|
|
1136
|
-
"vite": "^8.1.
|
|
1290
|
+
"typescript-eslint": "^8.65.0",
|
|
1291
|
+
"vite": "^8.1.5",
|
|
1137
1292
|
"vite-plugin-dts": "^5.0.3",
|
|
1138
1293
|
"vite-plugin-react": "^4.0.1",
|
|
1139
1294
|
"vitest": "^4.1.10",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import e from "twig";
|
|
2
|
-
//#region src/helpers/twigWrapper.ts
|
|
3
|
-
e.extendFilter("object_as_json", (e) => typeof e == "object" ? JSON.stringify(e) : e);
|
|
4
|
-
var t = "{{\\s*(?<token>[a-zA-Z_][a-zA-Z0-9_]*(?:\\??\\.[a-zA-Z_][a-zA-Z0-9_]*)*)[^}]*}}", n = new RegExp(t, "g"), r = RegExp(`^${t}$`), i = (e, t = !1) => {
|
|
5
|
-
if (typeof e != "string") return !1;
|
|
6
|
-
let i = t ? r : n;
|
|
7
|
-
return i.lastIndex = 0, i.test(e.trim());
|
|
8
|
-
}, a = (t, r = {}, a = !1, o = !1) => {
|
|
9
|
-
if (typeof t != "string" || !i(t)) return t;
|
|
10
|
-
try {
|
|
11
|
-
n.lastIndex = 0;
|
|
12
|
-
let i = t;
|
|
13
|
-
a && [...i.matchAll(n)].forEach((e) => {
|
|
14
|
-
e.groups && (i = i.replace(e[0], `{{ ${e.groups.token} | default('${e[0]}') }}`));
|
|
15
|
-
}), o && [...i.matchAll(n)].forEach((e) => {
|
|
16
|
-
e.groups && (i = i.replace(e[0], `{{ ${e.groups.token} | object_as_json }}`));
|
|
17
|
-
}), "variables" in r && (r = {
|
|
18
|
-
...r,
|
|
19
|
-
...r.variables
|
|
20
|
-
});
|
|
21
|
-
let s = e.twig({ data: i }).render(r);
|
|
22
|
-
if (!o) return s;
|
|
23
|
-
try {
|
|
24
|
-
return JSON.parse(s) || s;
|
|
25
|
-
} catch {
|
|
26
|
-
return s;
|
|
27
|
-
}
|
|
28
|
-
} catch {
|
|
29
|
-
return t;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
33
|
-
export { i as hasValidToken, a as processTwig };
|