@webstudio-is/sdk 0.204.0 → 0.205.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/lib/index.js +683 -301
- package/lib/types/core-metas.d.ts +35 -0
- package/lib/types/css.d.ts +31 -0
- package/lib/types/css.test.d.ts +1 -0
- package/lib/types/expression.d.ts +7 -5
- package/lib/types/index.d.ts +3 -0
- package/lib/types/schema/animation-schema.d.ts +22925 -0
- package/lib/types/schema/component-meta.d.ts +42 -0
- package/lib/types/schema/data-sources.d.ts +18 -18
- package/lib/types/schema/deployment.d.ts +4 -4
- package/lib/types/schema/pages.d.ts +13 -13
- package/lib/types/schema/prop-meta.d.ts +21 -0
- package/lib/types/schema/props.d.ts +16186 -0
- package/lib/types/schema/webstudio.d.ts +9386 -15
- package/package.json +8 -7
|
@@ -157,6 +157,13 @@ export declare const corePropsMetas: {
|
|
|
157
157
|
defaultValue?: string | undefined;
|
|
158
158
|
label?: string | undefined;
|
|
159
159
|
description?: string | undefined;
|
|
160
|
+
} | {
|
|
161
|
+
type: "animationAction";
|
|
162
|
+
required: boolean;
|
|
163
|
+
control: "animationAction";
|
|
164
|
+
defaultValue?: undefined;
|
|
165
|
+
label?: string | undefined;
|
|
166
|
+
description?: string | undefined;
|
|
160
167
|
}>;
|
|
161
168
|
initialProps?: string[] | undefined;
|
|
162
169
|
};
|
|
@@ -303,6 +310,13 @@ export declare const corePropsMetas: {
|
|
|
303
310
|
defaultValue?: string | undefined;
|
|
304
311
|
label?: string | undefined;
|
|
305
312
|
description?: string | undefined;
|
|
313
|
+
} | {
|
|
314
|
+
type: "animationAction";
|
|
315
|
+
required: boolean;
|
|
316
|
+
control: "animationAction";
|
|
317
|
+
defaultValue?: undefined;
|
|
318
|
+
label?: string | undefined;
|
|
319
|
+
description?: string | undefined;
|
|
306
320
|
}>;
|
|
307
321
|
initialProps?: string[] | undefined;
|
|
308
322
|
};
|
|
@@ -449,6 +463,13 @@ export declare const corePropsMetas: {
|
|
|
449
463
|
defaultValue?: string | undefined;
|
|
450
464
|
label?: string | undefined;
|
|
451
465
|
description?: string | undefined;
|
|
466
|
+
} | {
|
|
467
|
+
type: "animationAction";
|
|
468
|
+
required: boolean;
|
|
469
|
+
control: "animationAction";
|
|
470
|
+
defaultValue?: undefined;
|
|
471
|
+
label?: string | undefined;
|
|
472
|
+
description?: string | undefined;
|
|
452
473
|
}>;
|
|
453
474
|
initialProps?: string[] | undefined;
|
|
454
475
|
};
|
|
@@ -595,6 +616,13 @@ export declare const corePropsMetas: {
|
|
|
595
616
|
defaultValue?: string | undefined;
|
|
596
617
|
label?: string | undefined;
|
|
597
618
|
description?: string | undefined;
|
|
619
|
+
} | {
|
|
620
|
+
type: "animationAction";
|
|
621
|
+
required: boolean;
|
|
622
|
+
control: "animationAction";
|
|
623
|
+
defaultValue?: undefined;
|
|
624
|
+
label?: string | undefined;
|
|
625
|
+
description?: string | undefined;
|
|
598
626
|
}>;
|
|
599
627
|
initialProps?: string[] | undefined;
|
|
600
628
|
};
|
|
@@ -741,6 +769,13 @@ export declare const corePropsMetas: {
|
|
|
741
769
|
defaultValue?: string | undefined;
|
|
742
770
|
label?: string | undefined;
|
|
743
771
|
description?: string | undefined;
|
|
772
|
+
} | {
|
|
773
|
+
type: "animationAction";
|
|
774
|
+
required: boolean;
|
|
775
|
+
control: "animationAction";
|
|
776
|
+
defaultValue?: undefined;
|
|
777
|
+
label?: string | undefined;
|
|
778
|
+
description?: string | undefined;
|
|
744
779
|
}>;
|
|
745
780
|
initialProps?: string[] | undefined;
|
|
746
781
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type StyleSheetRegular, type TransformValue } from "@webstudio-is/css-engine";
|
|
2
|
+
import type { Assets } from "./schema/assets";
|
|
3
|
+
import type { Instances } from "./schema/instances";
|
|
4
|
+
import type { Props } from "./schema/props";
|
|
5
|
+
import type { Breakpoints } from "./schema/breakpoints";
|
|
6
|
+
import type { Styles } from "./schema/styles";
|
|
7
|
+
import type { StyleSourceSelections } from "./schema/style-source-selections";
|
|
8
|
+
import type { WsComponentMeta } from "./schema/component-meta";
|
|
9
|
+
export declare const addFontRules: ({ sheet, assets, assetBaseUrl, }: {
|
|
10
|
+
sheet: StyleSheetRegular;
|
|
11
|
+
assets: Assets;
|
|
12
|
+
assetBaseUrl: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
export type CssConfig = {
|
|
15
|
+
assets: Assets;
|
|
16
|
+
instances: Instances;
|
|
17
|
+
props: Props;
|
|
18
|
+
breakpoints: Breakpoints;
|
|
19
|
+
styles: Styles;
|
|
20
|
+
styleSourceSelections: StyleSourceSelections;
|
|
21
|
+
componentMetas: Map<string, WsComponentMeta>;
|
|
22
|
+
assetBaseUrl: string;
|
|
23
|
+
atomic: boolean;
|
|
24
|
+
};
|
|
25
|
+
export declare const createImageValueTransformer: (assets: Assets, { assetBaseUrl }: {
|
|
26
|
+
assetBaseUrl: string;
|
|
27
|
+
}) => TransformValue;
|
|
28
|
+
export declare const generateCss: ({ assets, instances, props, breakpoints, styles, styleSourceSelections, componentMetas, assetBaseUrl, atomic, }: CssConfig) => {
|
|
29
|
+
cssText: string;
|
|
30
|
+
classes: Map<string, string[]>;
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type Identifier } from "acorn";
|
|
2
|
-
import type { DataSources } from "./schema/data-sources";
|
|
2
|
+
import type { DataSource, DataSources } from "./schema/data-sources";
|
|
3
3
|
import type { Scope } from "./scope";
|
|
4
|
+
export declare const SYSTEM_VARIABLE_ID = ":system";
|
|
5
|
+
export declare const systemParameter: DataSource;
|
|
4
6
|
export type Diagnostic = {
|
|
5
7
|
from: number;
|
|
6
8
|
to: number;
|
|
@@ -42,10 +44,10 @@ export declare const parseObjectExpression: (expression: string) => Map<string,
|
|
|
42
44
|
* after updating individual value expressions
|
|
43
45
|
*/
|
|
44
46
|
export declare const generateObjectExpression: (map: Map<string, string>) => string;
|
|
45
|
-
export declare const
|
|
46
|
-
export {
|
|
47
|
-
export declare const
|
|
48
|
-
export {
|
|
47
|
+
export declare const encodeDataVariableId: (id: string) => string;
|
|
48
|
+
export { encodeDataVariableId as encodeDataSourceVariable };
|
|
49
|
+
export declare const decodeDataVariableId: (name: string) => string | undefined;
|
|
50
|
+
export { decodeDataVariableId as decodeDataSourceVariable };
|
|
49
51
|
export declare const generateExpression: ({ expression, dataSources, usedDataSources, scope, }: {
|
|
50
52
|
expression: string;
|
|
51
53
|
dataSources: DataSources;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -21,3 +21,6 @@ export * from "./expression";
|
|
|
21
21
|
export * from "./resources-generator";
|
|
22
22
|
export * from "./page-meta-generator";
|
|
23
23
|
export * from "./url-pattern";
|
|
24
|
+
export * from "./css";
|
|
25
|
+
export type { AnimationAction, AnimationActionScroll, AnimationActionView, AnimationKeyframe, KeyframeStyles, RangeUnit, RangeUnitValue, ScrollNamedRange, ScrollRangeValue, ViewNamedRange, ViewRangeValue, ScrollAnimation, ViewAnimation, InsetUnitValue, } from "./schema/animation-schema";
|
|
26
|
+
export { animationActionSchema, scrollAnimationSchema, viewAnimationSchema, rangeUnitValueSchema, animationKeyframeSchema, insetUnitValueSchema, RANGE_UNITS, } from "./schema/animation-schema";
|