@shwfed/nuxt 0.7.8 → 0.7.9

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.
Files changed (99) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/app.d.vue.ts +0 -2
  3. package/dist/runtime/components/app.vue +1 -7
  4. package/dist/runtime/components/app.vue.d.ts +0 -2
  5. package/dist/runtime/components/fields.d.vue.ts +155 -0
  6. package/dist/runtime/components/fields.vue +312 -0
  7. package/dist/runtime/components/fields.vue.d.ts +155 -0
  8. package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.vue +1 -1
  9. package/dist/runtime/components/ui/button-group/ButtonGroupText.vue +1 -1
  10. package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +5 -12
  11. package/dist/runtime/components/ui/calendar/Calendar.vue +77 -92
  12. package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +5 -12
  13. package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +1 -1
  14. package/dist/runtime/components/ui/calendar/index.d.ts +1 -1
  15. package/dist/runtime/components/ui/command/CommandGroup.vue +4 -0
  16. package/dist/runtime/components/ui/dialog/DialogOverlay.vue +1 -1
  17. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -1
  18. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
  19. package/dist/runtime/components/ui/field/FieldDescription.vue +1 -1
  20. package/dist/runtime/components/ui/field/FieldError.vue +1 -1
  21. package/dist/runtime/components/ui/field/FieldLabel.vue +1 -1
  22. package/dist/runtime/components/ui/field/FieldSeparator.vue +1 -1
  23. package/dist/runtime/components/ui/field/index.js +7 -5
  24. package/dist/runtime/components/ui/input/Input.vue +1 -1
  25. package/dist/runtime/components/ui/input-group/InputGroup.vue +3 -0
  26. package/dist/runtime/components/ui/input-group/InputGroupCombobox.d.vue.ts +4 -1
  27. package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue +10 -4
  28. package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue.d.ts +4 -1
  29. package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue +3 -1
  30. package/dist/runtime/components/ui/input-group/InputGroupInput.vue +1 -1
  31. package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue +1 -1
  32. package/dist/runtime/components/ui/input-group/InputGroupText.vue +1 -1
  33. package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue +1 -1
  34. package/dist/runtime/components/ui/input-group/index.js +1 -1
  35. package/dist/runtime/components/ui/label/Label.vue +1 -1
  36. package/dist/runtime/components/ui/native-select/NativeSelect.vue +3 -3
  37. package/dist/runtime/components/ui/navigation-menu/NavigationMenuLink.vue +1 -1
  38. package/dist/runtime/components/ui/navigation-menu/NavigationMenuViewport.vue +1 -1
  39. package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.vue +1 -1
  40. package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue +1 -1
  41. package/dist/runtime/components/ui/sheet/SheetOverlay.vue +1 -1
  42. package/dist/runtime/components/ui/switch/Switch.d.vue.ts +24 -0
  43. package/dist/runtime/components/ui/switch/Switch.vue +46 -0
  44. package/dist/runtime/components/ui/switch/Switch.vue.d.ts +24 -0
  45. package/dist/runtime/components/ui/switch/index.d.ts +1 -0
  46. package/dist/runtime/components/ui/switch/index.js +1 -0
  47. package/dist/runtime/components/ui/textarea/Textarea.vue +1 -1
  48. package/dist/runtime/plugins/cel/env.d.ts +2 -2
  49. package/dist/runtime/plugins/cel/env.js +5 -4
  50. package/dist/runtime/plugins/cel/index.d.ts +3 -3
  51. package/dist/runtime/plugins/cel/index.js +7 -3
  52. package/dist/runtime/plugins/markdown/index.d.ts +1 -1
  53. package/dist/runtime/utils/coders.d.ts +7 -0
  54. package/dist/runtime/utils/coders.js +39 -0
  55. package/dist/runtime/vendor/cel/index.d.ts +17 -0
  56. package/dist/runtime/vendor/cel/index.js +10 -0
  57. package/dist/runtime/vendor/cel-js/LICENSE +21 -0
  58. package/dist/runtime/vendor/cel-js/UPSTREAM.md +17 -0
  59. package/dist/runtime/vendor/cel-js/lib/errors.d.ts +21 -0
  60. package/dist/runtime/vendor/cel-js/lib/errors.js +97 -0
  61. package/dist/runtime/vendor/cel-js/lib/evaluator.d.ts +4 -0
  62. package/dist/runtime/vendor/cel-js/lib/evaluator.js +192 -0
  63. package/dist/runtime/vendor/cel-js/lib/functions.d.ts +53 -0
  64. package/dist/runtime/vendor/cel-js/lib/functions.js +513 -0
  65. package/dist/runtime/vendor/cel-js/lib/globals.d.ts +27 -0
  66. package/dist/runtime/vendor/cel-js/lib/globals.js +33 -0
  67. package/dist/runtime/vendor/cel-js/lib/index.d.ts +469 -0
  68. package/dist/runtime/vendor/cel-js/lib/index.js +18 -0
  69. package/dist/runtime/vendor/cel-js/lib/macros.d.ts +1 -0
  70. package/dist/runtime/vendor/cel-js/lib/macros.js +230 -0
  71. package/dist/runtime/vendor/cel-js/lib/operators.d.ts +117 -0
  72. package/dist/runtime/vendor/cel-js/lib/operators.js +739 -0
  73. package/dist/runtime/vendor/cel-js/lib/optional.d.ts +14 -0
  74. package/dist/runtime/vendor/cel-js/lib/optional.js +161 -0
  75. package/dist/runtime/vendor/cel-js/lib/options.d.ts +23 -0
  76. package/dist/runtime/vendor/cel-js/lib/options.js +47 -0
  77. package/dist/runtime/vendor/cel-js/lib/overloads.d.ts +1 -0
  78. package/dist/runtime/vendor/cel-js/lib/overloads.js +214 -0
  79. package/dist/runtime/vendor/cel-js/lib/parser.d.ts +56 -0
  80. package/dist/runtime/vendor/cel-js/lib/parser.js +827 -0
  81. package/dist/runtime/vendor/cel-js/lib/registry.d.ts +279 -0
  82. package/dist/runtime/vendor/cel-js/lib/registry.js +1596 -0
  83. package/dist/runtime/vendor/cel-js/lib/serialize.d.ts +1 -0
  84. package/dist/runtime/vendor/cel-js/lib/serialize.js +259 -0
  85. package/dist/runtime/vendor/cel-js/lib/type-checker.d.ts +26 -0
  86. package/dist/runtime/vendor/cel-js/lib/type-checker.js +81 -0
  87. package/package.json +7 -4
  88. package/dist/runtime/components/locale.d.vue.ts +0 -14
  89. package/dist/runtime/components/locale.vue +0 -89
  90. package/dist/runtime/components/locale.vue.d.ts +0 -14
  91. package/dist/runtime/components/query.d.vue.ts +0 -30
  92. package/dist/runtime/components/query.vue +0 -266
  93. package/dist/runtime/components/query.vue.d.ts +0 -30
  94. package/dist/runtime/utilities/query-config/global.d.ts +0 -4
  95. package/dist/runtime/utilities/query-config/global.js +0 -18
  96. package/dist/runtime/utilities/query-config/index.d.ts +0 -3
  97. package/dist/runtime/utilities/query-config/index.js +0 -14
  98. package/dist/runtime/utilities/query-config/schema.d.ts +0 -96
  99. package/dist/runtime/utilities/query-config/schema.js +0 -51
@@ -0,0 +1,279 @@
1
+ /**
2
+ * Represents a CEL type value.
3
+ */
4
+ export class Type {
5
+ /**
6
+ * Create a new Type.
7
+ * @param name - The name of the type
8
+ */
9
+ constructor(name: string)
10
+
11
+ /** Get the type name. */
12
+ get name(): string
13
+
14
+ /** Convert to string representation. */
15
+ toString(): string
16
+ }
17
+
18
+ /**
19
+ * Represents a type declaration with metadata about its structure.
20
+ */
21
+ export class TypeDeclaration {
22
+ /**
23
+ * Create a new type declaration.
24
+ * @param options - Type declaration options
25
+ */
26
+ constructor(options: {
27
+ kind: 'primitive' | 'list' | 'map' | 'message' | 'enum'
28
+ type: string
29
+ name: string
30
+ keyType?: TypeDeclaration
31
+ valueType?: TypeDeclaration
32
+ values?: Record<string, bigint>
33
+ })
34
+
35
+ /** The kind of type (primitive, list, map, message, enum). */
36
+ kind: 'primitive' | 'list' | 'map' | 'message' | 'enum'
37
+
38
+ /** The type name. */
39
+ type: string
40
+
41
+ /** The message or enum type name. */
42
+ name: string
43
+
44
+ /** For map types, the key type. */
45
+ keyType?: TypeDeclaration
46
+
47
+ /** For list and map types, the value type. */
48
+ valueType?: TypeDeclaration
49
+
50
+ /** For enum types, the enum values. */
51
+ values?: Record<string, bigint>
52
+
53
+ /** Check if this type is 'dyn' or 'bool'. */
54
+ isDynOrBool(): boolean
55
+
56
+ /** Convert to string representation. */
57
+ toString(): string
58
+ }
59
+
60
+ /**
61
+ * Built-in CEL type constants.
62
+ */
63
+ export const TYPES: {
64
+ string: Type
65
+ bool: Type
66
+ int: Type
67
+ uint: Type
68
+ double: Type
69
+ map: Type
70
+ list: Type
71
+ bytes: Type
72
+ null_type: Type
73
+ type: Type
74
+ }
75
+
76
+ /**
77
+ * Common CEL type declarations used throughout the registry.
78
+ */
79
+ export const celTypes: {
80
+ string: TypeDeclaration
81
+ bool: TypeDeclaration
82
+ int: TypeDeclaration
83
+ uint: TypeDeclaration
84
+ double: TypeDeclaration
85
+ bytes: TypeDeclaration
86
+ dyn: TypeDeclaration
87
+ null: TypeDeclaration
88
+ type: TypeDeclaration
89
+ list: TypeDeclaration
90
+ 'list<dyn>': TypeDeclaration
91
+ map: TypeDeclaration
92
+ 'map<dyn, dyn>': TypeDeclaration
93
+ }
94
+
95
+ /**
96
+ * Schema definition for inline typed object registration.
97
+ * Maps field names to type strings or nested schemas.
98
+ * When used with `registerVariable`, internally calls `registerType` to create
99
+ * a named type with runtime conversion support.
100
+ */
101
+ export interface ObjectSchema {
102
+ [field: string]: string | ObjectSchema
103
+ }
104
+
105
+ /**
106
+ * Registry for managing function overloads, operator overloads, and type mappings.
107
+ */
108
+ export class Registry {
109
+ /**
110
+ * Create a new registry instance.
111
+ * @param opts - Optional initial configuration
112
+ */
113
+ constructor(opts?: RegistryOptions)
114
+
115
+ /**
116
+ * Register a function overload.
117
+ * @param signature - Function signature in format 'name(type1, type2): returnType' or 'Type.method(args): returnType'
118
+ * @param handlerOrOptions - Either the function implementation or an options object with handler and optional typeCheck
119
+ */
120
+ registerFunctionOverload(
121
+ signature: string,
122
+ handlerOrOptions:
123
+ | ((...args: any[]) => any)
124
+ | {
125
+ handler: (...args: any[]) => any
126
+ typeCheck?: (checker: any, receiverType: string, args: any[]) => string
127
+ }
128
+ ): void
129
+
130
+ /**
131
+ * Register an operator overload.
132
+ * @param signature - Operator signature in format 'type1 op type2' (e.g., 'Vector + Vector')
133
+ * @param handler - The operator implementation
134
+ */
135
+ registerOperatorOverload(signature: string, handler: (left: any, right: any) => any): void
136
+
137
+ /**
138
+ * Register a custom type with its constructor and optional field definitions.
139
+ * When `ctor` is omitted but `fields` is provided, an internal wrapper class is auto-generated
140
+ * and a default `convert` function is created to wrap plain objects at runtime.
141
+ * @param typename - The name of the type
142
+ * @param definition - Either a constructor function or an object with ctor/fields/convert
143
+ */
144
+ registerType(
145
+ typename: string,
146
+ definition:
147
+ | Function
148
+ | {ctor: Function; fields?: Record<string, string>; convert?: (value: any) => any}
149
+ | {fields: Record<string, string>; convert?: (value: any) => any}
150
+ ): void
151
+
152
+ /**
153
+ * Get type declaration for a given type string.
154
+ * @param typename - The type name (e.g., 'string', 'list<int>', 'map<string, bool>')
155
+ * @returns The type declaration instance
156
+ */
157
+ getType(typename: string): TypeDeclaration
158
+
159
+ /**
160
+ * Register a variable with its type, throwing if it already exists.
161
+ * When an ObjectSchema is provided via `{schema: ...}`, a type is auto-registered
162
+ * via `registerType` with runtime conversion support.
163
+ * @param name - The variable name
164
+ * @param type - The variable type name, declaration, or options with schema
165
+ */
166
+ registerVariable(
167
+ name: string,
168
+ type:
169
+ | string
170
+ | TypeDeclaration
171
+ | {type: string; description?: string}
172
+ | {schema: ObjectSchema; description?: string}
173
+ ): this
174
+
175
+ /**
176
+ * Register a unary operator overload.
177
+ * @param op - The operator symbol ('-' or '!')
178
+ * @param type - The operand type
179
+ * @param handler - The operator implementation
180
+ * @param returnType - Optional return type (defaults to operand type)
181
+ */
182
+ unaryOverload(op: string, type: string, handler: (operand: any) => any, returnType?: string): void
183
+
184
+ /**
185
+ * Register a binary operator overload.
186
+ * @param leftType - The left operand type
187
+ * @param op - The operator symbol
188
+ * @param rightType - The right operand type
189
+ * @param handler - The operator implementation
190
+ * @param returnType - Optional return type
191
+ */
192
+ binaryOverload(
193
+ leftType: string,
194
+ op: string,
195
+ rightType: string,
196
+ handler: (left: any, right: any) => any,
197
+ returnType?: string
198
+ ): void
199
+
200
+ /**
201
+ * Clone this registry to create a new isolated instance.
202
+ * @returns A new registry with a deep copy of all registrations
203
+ */
204
+ clone(opts?: {unlistedVariablesAreDyn?: boolean; enableOptionalTypes?: boolean}): Registry
205
+
206
+ /** Registered object types keyed by CEL typename. */
207
+ readonly objectTypes: Map<string, any>
208
+
209
+ /** Map of constructors to their registered type metadata. */
210
+ readonly objectTypesByConstructor: Map<Function | undefined, any>
211
+
212
+ /** Registered variables and their type declarations. */
213
+ readonly variables: Map<string, TypeDeclaration>
214
+
215
+ /** Whether optional types/functions are enabled for this registry. */
216
+ readonly enableOptionalTypes: boolean
217
+ }
218
+
219
+ /**
220
+ * Options for creating a new registry.
221
+ */
222
+ export interface RegistryOptions {
223
+ objectTypes?: Map<string, any>
224
+ objectTypesByConstructor?: Map<Function | undefined, any>
225
+ functionDeclarations?: Map<string, any>
226
+ operatorDeclarations?: Map<string, any>
227
+ typeDeclarations?: Map<string, TypeDeclaration>
228
+ variables?: Map<string, TypeDeclaration>
229
+ unlistedVariablesAreDyn?: boolean
230
+ enableOptionalTypes?: boolean
231
+ }
232
+
233
+ /**
234
+ * Create a new registry instance.
235
+ * @param opts - Optional initial configuration
236
+ * @returns A new registry instance
237
+ */
238
+ export function createRegistry(opts?: RegistryOptions): Registry
239
+
240
+ /**
241
+ * Root context wiring together registered variable types and fallback values.
242
+ */
243
+ export class RootContext {
244
+ constructor(registry: Registry, context?: Map<string, any> | Record<string, any>)
245
+
246
+ /** Look up the declared type for a variable name. */
247
+ getType(name: string): TypeDeclaration | undefined
248
+
249
+ /** Look up the fallback value (built-ins) for a name. */
250
+ getValue(name: string): any
251
+
252
+ /** Fork with a placeholder variable binding (used for comprehensions). */
253
+ forkWithVariable(iterVar: string, iterType: TypeDeclaration): OverlayContext
254
+ }
255
+
256
+ /**
257
+ * Overlay context layered on top of the root context for evaluation/type-checking.
258
+ */
259
+ export class OverlayContext {
260
+ constructor(parent: RootContext | OverlayContext, name: string, type: TypeDeclaration, value: any)
261
+
262
+ /** Fork with a placeholder variable binding (used for comprehensions). */
263
+ forkWithVariable(iterVar: string, iterType: TypeDeclaration): OverlayContext
264
+
265
+ /** Set a accumulator variable type */
266
+ setAccuType(type: TypeDeclaration): this
267
+
268
+ /** Set a accumulator variable value */
269
+ setAccuValue(accuValue: any): this
270
+
271
+ /** Set the iteration variable value */
272
+ setIterValue(iterValue: any, evaluator: any): this
273
+
274
+ /** Resolve a value by name, falling back to parent scopes. */
275
+ getValue(name: string): any
276
+
277
+ /** Resolve a declared type by name, respecting overlays. */
278
+ getType(name: string): TypeDeclaration | undefined
279
+ }