@a2ui/web_core 0.9.0 → 0.9.1-alpha.1
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/.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/v0_8/types/types.d.ts +4 -1
- package/src/v0_8/types/types.d.ts.map +1 -1
- package/src/v0_9/basic_catalog/components/basic_components.d.ts +216 -216
- package/src/v0_9/basic_catalog/functions/basic_functions.d.ts +104 -0
- package/src/v0_9/basic_catalog/functions/basic_functions.d.ts.map +1 -1
- package/src/v0_9/basic_catalog/functions/basic_functions.js +105 -1
- package/src/v0_9/basic_catalog/functions/basic_functions.js.map +1 -1
- package/src/v0_9/basic_catalog/index.d.ts +1 -0
- package/src/v0_9/basic_catalog/index.d.ts.map +1 -1
- package/src/v0_9/basic_catalog/index.js +1 -0
- package/src/v0_9/basic_catalog/index.js.map +1 -1
- package/src/v0_9/basic_catalog/styles/default.d.ts +17 -0
- package/src/v0_9/basic_catalog/styles/default.d.ts.map +1 -0
- package/src/v0_9/basic_catalog/styles/default.js +136 -0
- package/src/v0_9/basic_catalog/styles/default.js.map +1 -0
- package/src/v0_9/catalog/types.test.js +3 -2
- package/src/v0_9/catalog/types.test.js.map +1 -1
- package/src/v0_9/index.d.ts +1 -1
- package/src/v0_9/index.d.ts.map +1 -1
- package/src/v0_9/index.js +1 -1
- package/src/v0_9/index.js.map +1 -1
- package/src/v0_9/processing/message-processor.d.ts +4 -4
- package/src/v0_9/processing/message-processor.d.ts.map +1 -1
- package/src/v0_9/processing/message-processor.js +4 -3
- package/src/v0_9/processing/message-processor.js.map +1 -1
- package/src/v0_9/processing/message-processor.test.js +24 -0
- package/src/v0_9/processing/message-processor.test.js.map +1 -1
- package/src/v0_9/reactivity/signals.d.ts +14 -6
- package/src/v0_9/reactivity/signals.d.ts.map +1 -1
- package/src/v0_9/reactivity/signals.test.d.ts +12 -1
- package/src/v0_9/reactivity/signals.test.d.ts.map +1 -1
- package/src/v0_9/reactivity/signals.test.js +10 -2
- package/src/v0_9/reactivity/signals.test.js.map +1 -1
- package/src/v0_9/rendering/component-context.d.ts +2 -0
- package/src/v0_9/rendering/component-context.d.ts.map +1 -1
- package/src/v0_9/rendering/component-context.js +1 -0
- package/src/v0_9/rendering/component-context.js.map +1 -1
- package/src/v0_9/rendering/component-context.test.js +13 -0
- package/src/v0_9/rendering/component-context.test.js.map +1 -1
- package/src/v0_9/rendering/data-context.d.ts.map +1 -1
- package/src/v0_9/rendering/data-context.js +1 -0
- package/src/v0_9/rendering/data-context.js.map +1 -1
- package/src/v0_9/schema/client-to-server.d.ts +260 -22
- package/src/v0_9/schema/client-to-server.d.ts.map +1 -1
- package/src/v0_9/schema/client-to-server.js +9 -0
- package/src/v0_9/schema/client-to-server.js.map +1 -1
- package/src/v0_9/schema/server-to-client.d.ts +350 -12
- package/src/v0_9/schema/server-to-client.d.ts.map +1 -1
- package/src/v0_9/schema/server-to-client.js +9 -0
- package/src/v0_9/schema/server-to-client.js.map +1 -1
- package/src/v0_9/schemas/client_to_server_list_wrapper.json +16 -0
- package/src/v0_9/schemas/server_to_client_list_wrapper.json +16 -0
|
@@ -1,28 +1,132 @@
|
|
|
1
1
|
import { FunctionImplementation } from '../../catalog/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Implementation of the addition function.
|
|
4
|
+
* Adds two numbers 'a' and 'b'.
|
|
5
|
+
*/
|
|
2
6
|
export declare const AddImplementation: FunctionImplementation;
|
|
7
|
+
/**
|
|
8
|
+
* Implementation of the subtraction function.
|
|
9
|
+
* Subtracts 'b' from 'a'.
|
|
10
|
+
*/
|
|
3
11
|
export declare const SubtractImplementation: FunctionImplementation;
|
|
12
|
+
/**
|
|
13
|
+
* Implementation of the multiplication function.
|
|
14
|
+
* Multiplies 'a' and 'b'.
|
|
15
|
+
*/
|
|
4
16
|
export declare const MultiplyImplementation: FunctionImplementation;
|
|
17
|
+
/**
|
|
18
|
+
* Implementation of the division function.
|
|
19
|
+
* Divides 'a' by 'b'. Returns NaN if inputs are invalid, and Infinity if dividing by zero.
|
|
20
|
+
*/
|
|
5
21
|
export declare const DivideImplementation: FunctionImplementation;
|
|
22
|
+
/**
|
|
23
|
+
* Implementation of the equality comparison.
|
|
24
|
+
* Checks if 'a' is strictly equal to 'b'.
|
|
25
|
+
*/
|
|
6
26
|
export declare const EqualsImplementation: FunctionImplementation;
|
|
27
|
+
/**
|
|
28
|
+
* Implementation of the inequality comparison.
|
|
29
|
+
* Checks if 'a' is not strictly equal to 'b'.
|
|
30
|
+
*/
|
|
7
31
|
export declare const NotEqualsImplementation: FunctionImplementation;
|
|
32
|
+
/**
|
|
33
|
+
* Implementation of the greater-than comparison.
|
|
34
|
+
* Checks if 'a' is greater than 'b'.
|
|
35
|
+
*/
|
|
8
36
|
export declare const GreaterThanImplementation: FunctionImplementation;
|
|
37
|
+
/**
|
|
38
|
+
* Implementation of the less-than comparison.
|
|
39
|
+
* Checks if 'a' is less than 'b'.
|
|
40
|
+
*/
|
|
9
41
|
export declare const LessThanImplementation: FunctionImplementation;
|
|
42
|
+
/**
|
|
43
|
+
* Implementation of the logical AND function.
|
|
44
|
+
* Returns true if all values in the array are truthy.
|
|
45
|
+
*/
|
|
10
46
|
export declare const AndImplementation: FunctionImplementation;
|
|
47
|
+
/**
|
|
48
|
+
* Implementation of the logical OR function.
|
|
49
|
+
* Returns true if at least one value in the array is truthy.
|
|
50
|
+
*/
|
|
11
51
|
export declare const OrImplementation: FunctionImplementation;
|
|
52
|
+
/**
|
|
53
|
+
* Implementation of the logical NOT function.
|
|
54
|
+
* Returns the negation of the value.
|
|
55
|
+
*/
|
|
12
56
|
export declare const NotImplementation: FunctionImplementation;
|
|
57
|
+
/**
|
|
58
|
+
* Implementation of the string contains function.
|
|
59
|
+
* Checks if 'string' contains 'substring'.
|
|
60
|
+
*/
|
|
13
61
|
export declare const ContainsImplementation: FunctionImplementation;
|
|
62
|
+
/**
|
|
63
|
+
* Implementation of the string starts-with function.
|
|
64
|
+
* Checks if 'string' starts with 'prefix'.
|
|
65
|
+
*/
|
|
14
66
|
export declare const StartsWithImplementation: FunctionImplementation;
|
|
67
|
+
/**
|
|
68
|
+
* Implementation of the string ends-with function.
|
|
69
|
+
* Checks if 'string' ends with 'suffix'.
|
|
70
|
+
*/
|
|
15
71
|
export declare const EndsWithImplementation: FunctionImplementation;
|
|
72
|
+
/**
|
|
73
|
+
* Implementation of the required validation function.
|
|
74
|
+
* Checks if the value is not null, undefined, empty string, or empty array.
|
|
75
|
+
*/
|
|
16
76
|
export declare const RequiredImplementation: FunctionImplementation;
|
|
77
|
+
/**
|
|
78
|
+
* Implementation of the regex validation function.
|
|
79
|
+
* Checks if the value matches the regular expression pattern.
|
|
80
|
+
* Throws A2uiExpressionError if the pattern is invalid.
|
|
81
|
+
*/
|
|
17
82
|
export declare const RegexImplementation: FunctionImplementation;
|
|
83
|
+
/**
|
|
84
|
+
* Implementation of the length validation function.
|
|
85
|
+
* Checks if the length of the string or array is within [min, max] range.
|
|
86
|
+
*/
|
|
18
87
|
export declare const LengthImplementation: FunctionImplementation;
|
|
88
|
+
/**
|
|
89
|
+
* Implementation of the numeric validation function.
|
|
90
|
+
* Checks if the value is a number and within [min, max] range.
|
|
91
|
+
*/
|
|
19
92
|
export declare const NumericImplementation: FunctionImplementation;
|
|
93
|
+
/**
|
|
94
|
+
* Implementation of the email validation function.
|
|
95
|
+
* Uses a simple regex to check if the value looks like an email address.
|
|
96
|
+
* Note: This is a basic check and not fully compliant with all email standards.
|
|
97
|
+
*/
|
|
20
98
|
export declare const EmailImplementation: FunctionImplementation;
|
|
99
|
+
/**
|
|
100
|
+
* Implementation of the string formatting function.
|
|
101
|
+
* Parses a template string and resolves any embedded expressions using the provided context.
|
|
102
|
+
* Returns a computed signal that updates when referenced signals change.
|
|
103
|
+
*/
|
|
21
104
|
export declare const FormatStringImplementation: FunctionImplementation;
|
|
105
|
+
/**
|
|
106
|
+
* Implementation of the number formatting function.
|
|
107
|
+
* Formats a number using Intl.NumberFormat with specified decimals and grouping.
|
|
108
|
+
*/
|
|
22
109
|
export declare const FormatNumberImplementation: FunctionImplementation;
|
|
110
|
+
/**
|
|
111
|
+
* Implementation of the currency formatting function.
|
|
112
|
+
* Formats a number as currency using Intl.NumberFormat.
|
|
113
|
+
* Falls back to toFixed if formatting fails.
|
|
114
|
+
*/
|
|
23
115
|
export declare const FormatCurrencyImplementation: FunctionImplementation;
|
|
116
|
+
/**
|
|
117
|
+
* Implementation of the date formatting function.
|
|
118
|
+
* Formats a date using date-fns or returns ISO string.
|
|
119
|
+
*/
|
|
24
120
|
export declare const FormatDateImplementation: FunctionImplementation;
|
|
121
|
+
/**
|
|
122
|
+
* Implementation of the pluralization function.
|
|
123
|
+
* Selects the appropriate plural form based on the value using Intl.PluralRules.
|
|
124
|
+
*/
|
|
25
125
|
export declare const PluralizeImplementation: FunctionImplementation;
|
|
126
|
+
/**
|
|
127
|
+
* Implementation of the open URL action.
|
|
128
|
+
* Opens the specified URL in a new window/tab.
|
|
129
|
+
*/
|
|
26
130
|
export declare const OpenUrlImplementation: FunctionImplementation;
|
|
27
131
|
/**
|
|
28
132
|
* Standard function implementations for the Basic Catalog.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic_functions.d.ts","sourceRoot":"","sources":["../../../../../src/v0_9/basic_catalog/functions/basic_functions.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAgChC,eAAO,MAAM,iBAAiB,wBAG7B,CAAC;AACF,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AACF,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AACF,eAAO,MAAM,oBAAoB,wBAkBhC,CAAC;AAGF,eAAO,MAAM,oBAAoB,wBAGhC,CAAC;AACF,eAAO,MAAM,uBAAuB,wBAGnC,CAAC;AACF,eAAO,MAAM,yBAAyB,wBAGrC,CAAC;AACF,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AAGF,eAAO,MAAM,iBAAiB,wBAE5B,CAAC;AACH,eAAO,MAAM,gBAAgB,wBAE3B,CAAC;AACH,eAAO,MAAM,iBAAiB,wBAG7B,CAAC;AAGF,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AACF,eAAO,MAAM,wBAAwB,wBAGpC,CAAC;AACF,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AAGF,eAAO,MAAM,sBAAsB,wBASlC,CAAC;AACF,eAAO,MAAM,mBAAmB,wBAa/B,CAAC;AACF,eAAO,MAAM,oBAAoB,wBAchC,CAAC;AACF,eAAO,MAAM,qBAAqB,wBAUjC,CAAC;AACF,eAAO,MAAM,mBAAmB,wBAQ/B,CAAC;AAGF,eAAO,MAAM,0BAA0B,wBA4BtC,CAAC;AACF,eAAO,MAAM,0BAA0B,wBAUtC,CAAC;AACF,eAAO,MAAM,4BAA4B,wBAgBxC,CAAC;AACF,eAAO,MAAM,wBAAwB,wBAepC,CAAC;AACF,eAAO,MAAM,uBAAuB,wBAMnC,CAAC;AAGF,eAAO,MAAM,qBAAqB,wBAOjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,sBAAsB,EA0BnD,CAAC"}
|
|
1
|
+
{"version":3,"file":"basic_functions.d.ts","sourceRoot":"","sources":["../../../../../src/v0_9/basic_catalog/functions/basic_functions.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAgChC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,wBAG7B,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,wBAkBhC,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,wBAGhC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,wBAGnC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,wBAGrC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,wBAE5B,CAAC;AACH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,wBAE3B,CAAC;AACH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,wBAG7B,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,wBAGpC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,wBAGlC,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,wBASlC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,wBAa/B,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,wBAchC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,wBAUjC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,wBAQ/B,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,wBA4BtC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,wBAUtC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,wBAgBxC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,wBAepC,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,wBAMnC,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,wBAOjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,sBAAsB,EA0BnD,CAAC"}
|
|
@@ -20,9 +20,25 @@ import { format } from 'date-fns';
|
|
|
20
20
|
import { AddApi, SubtractApi, MultiplyApi, DivideApi, EqualsApi, NotEqualsApi, GreaterThanApi, LessThanApi, AndApi, OrApi, NotApi, ContainsApi, StartsWithApi, EndsWithApi, RequiredApi, RegexApi, LengthApi, NumericApi, EmailApi, FormatStringApi, FormatNumberApi, FormatCurrencyApi, FormatDateApi, PluralizeApi, OpenUrlApi, } from './basic_functions_api.js';
|
|
21
21
|
import { A2uiExpressionError } from '../../errors.js';
|
|
22
22
|
// Arithmetic
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of the addition function.
|
|
25
|
+
* Adds two numbers 'a' and 'b'.
|
|
26
|
+
*/
|
|
23
27
|
export const AddImplementation = createFunctionImplementation(AddApi, args => args.a + args.b);
|
|
28
|
+
/**
|
|
29
|
+
* Implementation of the subtraction function.
|
|
30
|
+
* Subtracts 'b' from 'a'.
|
|
31
|
+
*/
|
|
24
32
|
export const SubtractImplementation = createFunctionImplementation(SubtractApi, args => args.a - args.b);
|
|
33
|
+
/**
|
|
34
|
+
* Implementation of the multiplication function.
|
|
35
|
+
* Multiplies 'a' and 'b'.
|
|
36
|
+
*/
|
|
25
37
|
export const MultiplyImplementation = createFunctionImplementation(MultiplyApi, args => args.a * args.b);
|
|
38
|
+
/**
|
|
39
|
+
* Implementation of the division function.
|
|
40
|
+
* Divides 'a' by 'b'. Returns NaN if inputs are invalid, and Infinity if dividing by zero.
|
|
41
|
+
*/
|
|
26
42
|
export const DivideImplementation = createFunctionImplementation(DivideApi, args => {
|
|
27
43
|
const a = args.a;
|
|
28
44
|
const b = args.b;
|
|
@@ -40,23 +56,67 @@ export const DivideImplementation = createFunctionImplementation(DivideApi, args
|
|
|
40
56
|
return numA / numB;
|
|
41
57
|
});
|
|
42
58
|
// Comparison
|
|
59
|
+
/**
|
|
60
|
+
* Implementation of the equality comparison.
|
|
61
|
+
* Checks if 'a' is strictly equal to 'b'.
|
|
62
|
+
*/
|
|
43
63
|
export const EqualsImplementation = createFunctionImplementation(EqualsApi, args => args.a === args.b);
|
|
64
|
+
/**
|
|
65
|
+
* Implementation of the inequality comparison.
|
|
66
|
+
* Checks if 'a' is not strictly equal to 'b'.
|
|
67
|
+
*/
|
|
44
68
|
export const NotEqualsImplementation = createFunctionImplementation(NotEqualsApi, args => args.a !== args.b);
|
|
69
|
+
/**
|
|
70
|
+
* Implementation of the greater-than comparison.
|
|
71
|
+
* Checks if 'a' is greater than 'b'.
|
|
72
|
+
*/
|
|
45
73
|
export const GreaterThanImplementation = createFunctionImplementation(GreaterThanApi, args => args.a > args.b);
|
|
74
|
+
/**
|
|
75
|
+
* Implementation of the less-than comparison.
|
|
76
|
+
* Checks if 'a' is less than 'b'.
|
|
77
|
+
*/
|
|
46
78
|
export const LessThanImplementation = createFunctionImplementation(LessThanApi, args => args.a < args.b);
|
|
47
79
|
// Logical
|
|
80
|
+
/**
|
|
81
|
+
* Implementation of the logical AND function.
|
|
82
|
+
* Returns true if all values in the array are truthy.
|
|
83
|
+
*/
|
|
48
84
|
export const AndImplementation = createFunctionImplementation(AndApi, args => {
|
|
49
85
|
return args.values.every((v) => !!v);
|
|
50
86
|
});
|
|
87
|
+
/**
|
|
88
|
+
* Implementation of the logical OR function.
|
|
89
|
+
* Returns true if at least one value in the array is truthy.
|
|
90
|
+
*/
|
|
51
91
|
export const OrImplementation = createFunctionImplementation(OrApi, args => {
|
|
52
92
|
return args.values.some((v) => !!v);
|
|
53
93
|
});
|
|
94
|
+
/**
|
|
95
|
+
* Implementation of the logical NOT function.
|
|
96
|
+
* Returns the negation of the value.
|
|
97
|
+
*/
|
|
54
98
|
export const NotImplementation = createFunctionImplementation(NotApi, args => !args.value);
|
|
55
99
|
// String
|
|
100
|
+
/**
|
|
101
|
+
* Implementation of the string contains function.
|
|
102
|
+
* Checks if 'string' contains 'substring'.
|
|
103
|
+
*/
|
|
56
104
|
export const ContainsImplementation = createFunctionImplementation(ContainsApi, args => args.string.includes(args.substring));
|
|
105
|
+
/**
|
|
106
|
+
* Implementation of the string starts-with function.
|
|
107
|
+
* Checks if 'string' starts with 'prefix'.
|
|
108
|
+
*/
|
|
57
109
|
export const StartsWithImplementation = createFunctionImplementation(StartsWithApi, args => args.string.startsWith(args.prefix));
|
|
110
|
+
/**
|
|
111
|
+
* Implementation of the string ends-with function.
|
|
112
|
+
* Checks if 'string' ends with 'suffix'.
|
|
113
|
+
*/
|
|
58
114
|
export const EndsWithImplementation = createFunctionImplementation(EndsWithApi, args => args.string.endsWith(args.suffix));
|
|
59
115
|
// Validation
|
|
116
|
+
/**
|
|
117
|
+
* Implementation of the required validation function.
|
|
118
|
+
* Checks if the value is not null, undefined, empty string, or empty array.
|
|
119
|
+
*/
|
|
60
120
|
export const RequiredImplementation = createFunctionImplementation(RequiredApi, args => {
|
|
61
121
|
const val = args.value;
|
|
62
122
|
if (val === null || val === undefined)
|
|
@@ -67,6 +127,11 @@ export const RequiredImplementation = createFunctionImplementation(RequiredApi,
|
|
|
67
127
|
return false;
|
|
68
128
|
return true;
|
|
69
129
|
});
|
|
130
|
+
/**
|
|
131
|
+
* Implementation of the regex validation function.
|
|
132
|
+
* Checks if the value matches the regular expression pattern.
|
|
133
|
+
* Throws A2uiExpressionError if the pattern is invalid.
|
|
134
|
+
*/
|
|
70
135
|
export const RegexImplementation = createFunctionImplementation(RegexApi, args => {
|
|
71
136
|
try {
|
|
72
137
|
return new RegExp(args.pattern).test(args.value);
|
|
@@ -75,6 +140,10 @@ export const RegexImplementation = createFunctionImplementation(RegexApi, args =
|
|
|
75
140
|
throw new A2uiExpressionError(`Invalid regex pattern: ${args.pattern}`, 'regex', e);
|
|
76
141
|
}
|
|
77
142
|
});
|
|
143
|
+
/**
|
|
144
|
+
* Implementation of the length validation function.
|
|
145
|
+
* Checks if the length of the string or array is within [min, max] range.
|
|
146
|
+
*/
|
|
78
147
|
export const LengthImplementation = createFunctionImplementation(LengthApi, args => {
|
|
79
148
|
const val = args.value;
|
|
80
149
|
let len = 0;
|
|
@@ -87,6 +156,10 @@ export const LengthImplementation = createFunctionImplementation(LengthApi, args
|
|
|
87
156
|
return false;
|
|
88
157
|
return true;
|
|
89
158
|
});
|
|
159
|
+
/**
|
|
160
|
+
* Implementation of the numeric validation function.
|
|
161
|
+
* Checks if the value is a number and within [min, max] range.
|
|
162
|
+
*/
|
|
90
163
|
export const NumericImplementation = createFunctionImplementation(NumericApi, args => {
|
|
91
164
|
if (isNaN(args.value))
|
|
92
165
|
return false;
|
|
@@ -96,6 +169,11 @@ export const NumericImplementation = createFunctionImplementation(NumericApi, ar
|
|
|
96
169
|
return false;
|
|
97
170
|
return true;
|
|
98
171
|
});
|
|
172
|
+
/**
|
|
173
|
+
* Implementation of the email validation function.
|
|
174
|
+
* Uses a simple regex to check if the value looks like an email address.
|
|
175
|
+
* Note: This is a basic check and not fully compliant with all email standards.
|
|
176
|
+
*/
|
|
99
177
|
export const EmailImplementation = createFunctionImplementation(EmailApi, args => {
|
|
100
178
|
// TODO(gspencergoog): Use a "real" email validation function, preferably
|
|
101
179
|
// from an existing package. This is woefully insufficient, real email
|
|
@@ -103,6 +181,11 @@ export const EmailImplementation = createFunctionImplementation(EmailApi, args =
|
|
|
103
181
|
return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(args.value);
|
|
104
182
|
});
|
|
105
183
|
// Formatting
|
|
184
|
+
/**
|
|
185
|
+
* Implementation of the string formatting function.
|
|
186
|
+
* Parses a template string and resolves any embedded expressions using the provided context.
|
|
187
|
+
* Returns a computed signal that updates when referenced signals change.
|
|
188
|
+
*/
|
|
106
189
|
export const FormatStringImplementation = createFunctionImplementation(FormatStringApi, (args, context) => {
|
|
107
190
|
const template = args.value;
|
|
108
191
|
const parser = new ExpressionParser();
|
|
@@ -127,6 +210,10 @@ export const FormatStringImplementation = createFunctionImplementation(FormatStr
|
|
|
127
210
|
.join('');
|
|
128
211
|
});
|
|
129
212
|
});
|
|
213
|
+
/**
|
|
214
|
+
* Implementation of the number formatting function.
|
|
215
|
+
* Formats a number using Intl.NumberFormat with specified decimals and grouping.
|
|
216
|
+
*/
|
|
130
217
|
export const FormatNumberImplementation = createFunctionImplementation(FormatNumberApi, args => {
|
|
131
218
|
if (isNaN(args.value))
|
|
132
219
|
return '';
|
|
@@ -136,6 +223,11 @@ export const FormatNumberImplementation = createFunctionImplementation(FormatNum
|
|
|
136
223
|
useGrouping: args.grouping,
|
|
137
224
|
}).format(args.value);
|
|
138
225
|
});
|
|
226
|
+
/**
|
|
227
|
+
* Implementation of the currency formatting function.
|
|
228
|
+
* Formats a number as currency using Intl.NumberFormat.
|
|
229
|
+
* Falls back to toFixed if formatting fails.
|
|
230
|
+
*/
|
|
139
231
|
export const FormatCurrencyImplementation = createFunctionImplementation(FormatCurrencyApi, args => {
|
|
140
232
|
if (isNaN(args.value))
|
|
141
233
|
return '';
|
|
@@ -152,6 +244,10 @@ export const FormatCurrencyImplementation = createFunctionImplementation(FormatC
|
|
|
152
244
|
return args.value.toFixed(args.decimals || 2);
|
|
153
245
|
}
|
|
154
246
|
});
|
|
247
|
+
/**
|
|
248
|
+
* Implementation of the date formatting function.
|
|
249
|
+
* Formats a date using date-fns or returns ISO string.
|
|
250
|
+
*/
|
|
155
251
|
export const FormatDateImplementation = createFunctionImplementation(FormatDateApi, args => {
|
|
156
252
|
if (!args.value)
|
|
157
253
|
return '';
|
|
@@ -168,11 +264,19 @@ export const FormatDateImplementation = createFunctionImplementation(FormatDateA
|
|
|
168
264
|
return date.toISOString();
|
|
169
265
|
}
|
|
170
266
|
});
|
|
267
|
+
/**
|
|
268
|
+
* Implementation of the pluralization function.
|
|
269
|
+
* Selects the appropriate plural form based on the value using Intl.PluralRules.
|
|
270
|
+
*/
|
|
171
271
|
export const PluralizeImplementation = createFunctionImplementation(PluralizeApi, args => {
|
|
172
272
|
const rule = new Intl.PluralRules('en-US').select(args.value);
|
|
173
|
-
return String(args[rule]
|
|
273
|
+
return String(args[rule] ?? args.other ?? '');
|
|
174
274
|
});
|
|
175
275
|
// Actions
|
|
276
|
+
/**
|
|
277
|
+
* Implementation of the open URL action.
|
|
278
|
+
* Opens the specified URL in a new window/tab.
|
|
279
|
+
*/
|
|
176
280
|
export const OpenUrlImplementation = createFunctionImplementation(OpenUrlApi, args => {
|
|
177
281
|
if (args.url && typeof window !== 'undefined' && window.open) {
|
|
178
282
|
window.open(args.url, '_blank');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic_functions.js","sourceRoot":"","sources":["../../../../../src/v0_9/basic_catalog/functions/basic_functions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,4BAA4B,EAE5B,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,EACZ,cAAc,EACd,WAAW,EACX,MAAM,EACN,KAAK,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACR,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,UAAU,GACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,aAAa;AACb,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAC3D,MAAM,EACN,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CACxB,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAChE,WAAW,EACX,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CACxB,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAChE,WAAW,EACX,IAAI,CAAC,E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,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAE,
|
|
1
|
+
{"version":3,"file":"basic_functions.js","sourceRoot":"","sources":["../../../../../src/v0_9/basic_catalog/functions/basic_functions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,4BAA4B,EAE5B,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,EACZ,cAAc,EACd,WAAW,EACX,MAAM,EACN,KAAK,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACR,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,UAAU,GACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,aAAa;AACb;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAC3D,MAAM,EACN,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CACxB,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAChE,WAAW,EACX,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CACxB,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAChE,WAAW,EACX,IAAI,CAAC,EAAE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,5 @@ export * from './expressions/expression_parser.js';
|
|
|
2
2
|
export * from './functions/basic_functions.js';
|
|
3
3
|
export * from './functions/basic_functions_api.js';
|
|
4
4
|
export * from './components/basic_components.js';
|
|
5
|
+
export { injectBasicCatalogStyles } from './styles/default.js';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v0_9/basic_catalog/index.ts"],"names":[],"mappings":"AAgBA,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v0_9/basic_catalog/index.ts"],"names":[],"mappings":"AAgBA,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAC,wBAAwB,EAAC,MAAM,qBAAqB,CAAC"}
|
|
@@ -17,4 +17,5 @@ export * from './expressions/expression_parser.js';
|
|
|
17
17
|
export * from './functions/basic_functions.js';
|
|
18
18
|
export * from './functions/basic_functions_api.js';
|
|
19
19
|
export * from './components/basic_components.js';
|
|
20
|
+
export { injectBasicCatalogStyles } from './styles/default.js';
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v0_9/basic_catalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v0_9/basic_catalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAC,wBAAwB,EAAC,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injects CSS variables for the A2UI basic catalog into the document.
|
|
3
|
+
*
|
|
4
|
+
* This method is used by the A2UI-provided basic catalogs of each renderer
|
|
5
|
+
* so design token values can be shared across all of them.
|
|
6
|
+
*
|
|
7
|
+
* It is only meant to be used by the basic catalog implementations provided
|
|
8
|
+
* by `@a2ui/lit`, `@a2ui/angular` and `@a2ui/react`, and should not be
|
|
9
|
+
* considered as part of the A2UI spec. This package is just a convenient
|
|
10
|
+
* location for it.
|
|
11
|
+
*
|
|
12
|
+
* Users may redefine the values of the CSS variables exposed in the default
|
|
13
|
+
* stylesheet above (and the specific ones exposed by each basic catalog
|
|
14
|
+
* package) to customize the appearance of the items of the basic catalog.
|
|
15
|
+
*/
|
|
16
|
+
export declare function injectBasicCatalogStyles(): void;
|
|
17
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../src/v0_9/basic_catalog/styles/default.ts"],"names":[],"mappings":"AAoHA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,SAMvC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The actual CSS markup of the default A2UI theme.
|
|
18
|
+
*
|
|
19
|
+
* This should be only variable definitions, so they can pierce into the
|
|
20
|
+
* shadow DOM of components.
|
|
21
|
+
*
|
|
22
|
+
* It uses `:where()` to ensure zero specificity, allowing page styles to
|
|
23
|
+
* override these defaults as needed without having to deal with specificity.
|
|
24
|
+
*
|
|
25
|
+
* By default, the theme follows the user's `color-scheme` preference, but
|
|
26
|
+
* developers can force either the light/dark variants using the `a2ui-light`
|
|
27
|
+
* or `a2ui-dark` classes on the root element of their app.
|
|
28
|
+
*/
|
|
29
|
+
const DEFAULT_CSS = `
|
|
30
|
+
:where(:root) {
|
|
31
|
+
color-scheme: light dark;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.a2ui-dark) {
|
|
35
|
+
color-scheme: dark;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(.a2ui-light) {
|
|
39
|
+
color-scheme: light;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(:root), :where(.a2ui-dark), :where(.a2ui-light) {
|
|
43
|
+
--a2ui-color-background: light-dark(#eee, #111);
|
|
44
|
+
--a2ui-color-on-background: light-dark(#333, #eee);
|
|
45
|
+
|
|
46
|
+
--a2ui-color-surface: light-dark(
|
|
47
|
+
color-mix(in oklab, var(--a2ui-color-background) 85%, white),
|
|
48
|
+
color-mix(in oklab, var(--a2ui-color-background) 95%, white)
|
|
49
|
+
);
|
|
50
|
+
--a2ui-color-on-surface: light-dark(#333, #eee);
|
|
51
|
+
|
|
52
|
+
--a2ui-color-primary: #17e;
|
|
53
|
+
--a2ui-color-primary-light: color-mix(in oklab, var(--a2ui-color-primary) 85%, white);
|
|
54
|
+
--a2ui-color-primary-dark: color-mix(in oklab, var(--a2ui-color-primary) 85%, black);
|
|
55
|
+
--a2ui-color-primary-hover: light-dark(var(--a2ui-color-primary-dark), var(--a2ui-color-primary-light));
|
|
56
|
+
--a2ui-color-on-primary: #fff;
|
|
57
|
+
|
|
58
|
+
--a2ui-color-secondary: light-dark(#ddd, #333);
|
|
59
|
+
--a2ui-color-secondary-light: color-mix(in oklab, var(--a2ui-color-secondary) 85%, white);
|
|
60
|
+
--a2ui-color-secondary-dark: color-mix(in oklab, var(--a2ui-color-secondary) 95%, black);
|
|
61
|
+
--a2ui-color-secondary-hover: light-dark(var(--a2ui-color-secondary-dark), var(--a2ui-color-secondary-light));
|
|
62
|
+
--a2ui-color-on-secondary: light-dark(#333, #eee);
|
|
63
|
+
|
|
64
|
+
--a2ui-border-radius: 0.25rem;
|
|
65
|
+
--a2ui-color-border: light-dark(#ccc, #444);
|
|
66
|
+
--a2ui-border-width: 1px;
|
|
67
|
+
--a2ui-border: 1px solid var(--a2ui-color-border, #ccc);
|
|
68
|
+
|
|
69
|
+
--a2ui-font-family-title: inherit;
|
|
70
|
+
--a2ui-font-family-monospace: monospace;
|
|
71
|
+
--a2ui-color-input: light-dark(#fff, #2a2a2a);
|
|
72
|
+
--a2ui-color-on-input: light-dark(#333, #eee);
|
|
73
|
+
|
|
74
|
+
--a2ui-grid-base: 0.5rem;
|
|
75
|
+
--a2ui-spacing-xs: calc(var(--a2ui-spacing-s) / 2);
|
|
76
|
+
--a2ui-spacing-s: calc(var(--a2ui-spacing-m) / 2);
|
|
77
|
+
--a2ui-spacing-m: var(--a2ui-grid-base);
|
|
78
|
+
--a2ui-spacing-l: calc(var(--a2ui-spacing-m) * 2);
|
|
79
|
+
--a2ui-spacing-xl: calc(var(--a2ui-spacing-l) * 2);
|
|
80
|
+
|
|
81
|
+
--a2ui-font-size: 1rem;
|
|
82
|
+
--a2ui-font-scale: 1.2;
|
|
83
|
+
--a2ui-font-size-xs: calc(var(--a2ui-font-size-s) / var(--a2ui-font-scale));
|
|
84
|
+
--a2ui-font-size-s: calc(var(--a2ui-font-size-m) / var(--a2ui-font-scale));
|
|
85
|
+
--a2ui-font-size-m: var(--a2ui-font-size);
|
|
86
|
+
--a2ui-font-size-l: calc(var(--a2ui-font-size-m) * var(--a2ui-font-scale));
|
|
87
|
+
--a2ui-font-size-xl: calc(var(--a2ui-font-size-l) * var(--a2ui-font-scale));
|
|
88
|
+
--a2ui-font-size-2xl: calc(var(--a2ui-font-size-xl) * var(--a2ui-font-scale));
|
|
89
|
+
|
|
90
|
+
--a2ui-line-height-headings: 1.2;
|
|
91
|
+
--a2ui-line-height-body: 1.5;
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
/**
|
|
95
|
+
* Caches the default stylesheet so it is only created once.
|
|
96
|
+
*/
|
|
97
|
+
let defaultStyleSheet;
|
|
98
|
+
/**
|
|
99
|
+
* Retrieves the default CSSStyleSheet for A2UI components.
|
|
100
|
+
*
|
|
101
|
+
* If the stylesheet doesn't exist, it creates and initializes one with default
|
|
102
|
+
* theme variables from the DEFAULT_CSS string.
|
|
103
|
+
*
|
|
104
|
+
* @returns The default CSSStyleSheet used by A2UI.
|
|
105
|
+
*/
|
|
106
|
+
function getDefaultStyleSheet() {
|
|
107
|
+
if (!defaultStyleSheet) {
|
|
108
|
+
defaultStyleSheet = new CSSStyleSheet();
|
|
109
|
+
defaultStyleSheet.replaceSync(DEFAULT_CSS);
|
|
110
|
+
}
|
|
111
|
+
return defaultStyleSheet;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Injects CSS variables for the A2UI basic catalog into the document.
|
|
115
|
+
*
|
|
116
|
+
* This method is used by the A2UI-provided basic catalogs of each renderer
|
|
117
|
+
* so design token values can be shared across all of them.
|
|
118
|
+
*
|
|
119
|
+
* It is only meant to be used by the basic catalog implementations provided
|
|
120
|
+
* by `@a2ui/lit`, `@a2ui/angular` and `@a2ui/react`, and should not be
|
|
121
|
+
* considered as part of the A2UI spec. This package is just a convenient
|
|
122
|
+
* location for it.
|
|
123
|
+
*
|
|
124
|
+
* Users may redefine the values of the CSS variables exposed in the default
|
|
125
|
+
* stylesheet above (and the specific ones exposed by each basic catalog
|
|
126
|
+
* package) to customize the appearance of the items of the basic catalog.
|
|
127
|
+
*/
|
|
128
|
+
export function injectBasicCatalogStyles() {
|
|
129
|
+
if (typeof document === 'undefined')
|
|
130
|
+
return;
|
|
131
|
+
const sheet = getDefaultStyleSheet();
|
|
132
|
+
if (!document.adoptedStyleSheets.includes(sheet)) {
|
|
133
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../../src/v0_9/basic_catalog/styles/default.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEnB,CAAC;AAEF;;GAEG;AACH,IAAI,iBAA4C,CAAC;AAEjD;;;;;;;GAOG;AACH,SAAS,oBAAoB;IAC3B,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,iBAAiB,GAAG,IAAI,aAAa,EAAE,CAAC;QACxC,iBAAiB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,wBAAwB;IACtC,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAC5C,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,QAAQ,CAAC,kBAAkB,GAAG,CAAC,GAAG,QAAQ,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IACxE,CAAC;AACH,CAAC"}
|
|
@@ -74,14 +74,15 @@ describe('InferredComponentApiSchemaType', () => {
|
|
|
74
74
|
name: 'MockComp',
|
|
75
75
|
schema: mockSchema,
|
|
76
76
|
};
|
|
77
|
-
assert.ok(mockApi);
|
|
78
77
|
// inferredIsAny only accepts "true" if `InferredType` is "any".
|
|
79
78
|
// This happens when `mockApi: ComponentApi`, but doesn't when
|
|
80
79
|
// `mockApi {} satisfies ComponentApi`!
|
|
81
80
|
const inferredIsAny = false;
|
|
82
|
-
assert.strictEqual(inferredIsAny, false);
|
|
83
81
|
// typesMatchExact only accepts "true" if `TypesAreEquivalent`
|
|
84
82
|
const typesMatchExact = true;
|
|
83
|
+
// Appease linter by using the variables
|
|
84
|
+
assert.ok(mockApi);
|
|
85
|
+
assert.strictEqual(inferredIsAny, false);
|
|
85
86
|
assert.strictEqual(typesMatchExact, true);
|
|
86
87
|
});
|
|
87
88
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.test.js","sourceRoot":"","sources":["../../../../src/v0_9/catalog/types.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,QAAQ,EAAE,EAAE,EAAC,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,OAAO,EAGP,4BAA4B,GAC7B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AACjD,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,aAAa,GAAG;YACpB,IAAI,EAAE,UAAU;YAChB,MAAM,EAA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C,MAAM,EAAE,EAAE,EAAE,GAAG,CAAC,EACtC,CAAC,GAAQ,EAAE,EAAE;YACX,OAAO,CACL,GAAG,YAAY,mBAAmB;gBAClC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC;gBACzC,GAAG,CAAC,UAAU,KAAK,MAAM;gBACzB,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAC3B,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;YAC1B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;YAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC9B,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,UAAU;SACI,CAAC;QAQzB,gEAAgE;QAChE,8DAA8D;QAC9D,uCAAuC;QACvC,MAAM,aAAa,GAAwB,KAAK,CAAC;QAUjD,8DAA8D;QAC9D,MAAM,eAAe,GACnB,IAAI,CAAC;QAEP,wCAAwC;QACxC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;QACnB,MAAM,CAAC,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACzC,MAAM,CAAC,WAAW,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/src/v0_9/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export * from './state/surface-components-model.js';
|
|
|
18
18
|
export * from './state/surface-group-model.js';
|
|
19
19
|
export * from './state/surface-model.js';
|
|
20
20
|
export * from './errors.js';
|
|
21
|
-
export { effect, Signal, signal } from '@preact/signals-core';
|
|
21
|
+
export { effect, Signal, signal, computed } from '@preact/signals-core';
|
|
22
22
|
export declare const Schemas: {
|
|
23
23
|
A2uiMessageSchemaRaw: {
|
|
24
24
|
$schema: string;
|
package/src/v0_9/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v0_9/index.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v0_9/index.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAItE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEnB,CAAC"}
|
package/src/v0_9/index.js
CHANGED
|
@@ -33,7 +33,7 @@ export * from './state/surface-components-model.js';
|
|
|
33
33
|
export * from './state/surface-group-model.js';
|
|
34
34
|
export * from './state/surface-model.js';
|
|
35
35
|
export * from './errors.js';
|
|
36
|
-
export { effect, Signal, signal } from '@preact/signals-core';
|
|
36
|
+
export { effect, Signal, signal, computed } from '@preact/signals-core';
|
|
37
37
|
import A2uiMessageSchemaRaw from './schemas/server_to_client.json' with { type: 'json' };
|
|
38
38
|
export const Schemas = {
|
|
39
39
|
A2uiMessageSchemaRaw,
|
package/src/v0_9/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v0_9/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;GAKG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,sBAAsB,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