x-runtime-lib 0.9.41 → 0.9.43

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.
@@ -357,6 +357,7 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-runtime-lib": {
357
357
  show: "Show",
358
358
  showArrows: "Show Arrows",
359
359
  showFirstLastPage: "Show First Last Page",
360
+ showLabel: "Show Label",
360
361
  showSize: "Show Size",
361
362
  showTicks: "Show Ticks",
362
363
  shrink: "Shrink",
@@ -357,6 +357,7 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-runtime-lib": {
357
357
  show: "显示",
358
358
  showArrows: "显示箭头",
359
359
  showFirstLastPage: "显示首尾页",
360
+ showLabel: "显示标签",
360
361
  showSize: "显示大小",
361
362
  showTicks: "显示刻度",
362
363
  shrink: "收缩",
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import { Reactive } from 'vue';
8
8
  import { Ref } from 'vue';
9
9
  import { ShallowRef } from 'vue';
10
10
  import { Type } from 'x-essential-lib';
11
+ import { VNode } from 'vue';
11
12
  import { WritableComputedRef } from 'vue';
12
13
 
13
14
  export declare interface ActivatorContext {
@@ -270,6 +271,10 @@ export declare function isHexColor(v: unknown): boolean;
270
271
 
271
272
  export declare function isInlineSlot(key: string): boolean;
272
273
 
274
+ export declare function isNull(v: unknown): boolean;
275
+
276
+ export declare function isNumber(v: unknown): boolean;
277
+
273
278
  export declare function isPercent(v: unknown): boolean;
274
279
 
275
280
  export declare function isPixel(v: unknown): boolean;
@@ -278,7 +283,7 @@ export declare function isRenderSwitch(key: string): boolean;
278
283
 
279
284
  export declare function isThemeColor(v: unknown): boolean;
280
285
 
281
- export declare const itemsKeys: readonly ["alignTabsItemsV1", "axisTypeItemsV1", "borderStyleItemsV1", "btnSpacedItemsV1", "btnTypeItemsV1", "densityItemsV1", "directionItemsV1", "elevationItemsV1", "expansionPanelVariantItemsV1", "fieldVariantItemsV1", "flexCrossAlignItemsV1", "flexDirectionItemsV1", "flexMainAlignItemsV1", "flexWrapItemsV1", "fontWeightItemsV1", "inputTypeItemsV1", "numberInputControlVariantItemsV1", "positionItemsV1", "sheetVariantItemsV1", "sizeItemsV1", "speedDialOpenWayItemsV1", "textAlignItemsV1", "textDecorationItemsV1", "textEmphasisItemsV1", "textSizeItemsV1", "textTypeItemsV1", "thumbLabelItemsV1", "tickShowItemsV1", "timelineAlignItemsV1", "timelineDirectionItemsV1", "timelineSideItemsV1", "timelineTruncateLineItemsV1", "transitionItemsV1"];
286
+ export declare const itemsKeys: readonly ["alignTabsV1", "axisTypeV1", "borderStyleV1", "btnSpacedV1", "btnTypeV1", "densityV1", "directionV1", "expansionPanelVariantV1", "fieldVariantV1", "flexCrossAlignV1", "flexDirectionV1", "flexMainAlignV1", "flexWrapV1", "fontWeightV1", "inputTypeV1", "numberInputControlVariantV1", "positionV1", "sheetVariantV1", "sizeV1", "speedDialOpenWayV1", "textAlignV1", "textDecorationV1", "textEmphasisV1", "textSizeV1", "textTypeV1", "thumbLabelV1", "tickShowV1", "timelineAlignV1", "timelineDirectionV1", "timelineSideV1", "timelineTruncateLineV1", "transitionV1"];
282
287
 
283
288
  export declare function loadLocaleMessageRuntime(locale: string): Promise<object>;
284
289
 
@@ -306,6 +311,8 @@ export declare function makeSlotId(kind: SlotKind, mainKey: string, slotKey: str
306
311
 
307
312
  export declare function makeTriggerId(kind: TriggerKind, triggerKey: string): string;
308
313
 
314
+ export declare function mergeRenderResult(main: RenderResult, part: RenderResult): void;
315
+
309
316
  export declare type Meta = {
310
317
  version: string;
311
318
  states?: Field[];
@@ -489,6 +496,14 @@ export declare function regItems(key: ZItemsKey, items: ZItem[]): void;
489
496
 
490
497
  export declare function regTypes(key: ZTypesKey, types: ZType[]): void;
491
498
 
499
+ export declare interface RenderResult {
500
+ [slot: string]: VNode[];
501
+ }
502
+
503
+ export declare interface RenderSlots {
504
+ [slot: string]: () => VNode[];
505
+ }
506
+
492
507
  export declare const reverseBreakpoints: readonly ["xl", "lg", "md", "sm", "xs"];
493
508
 
494
509
  export declare const rules: readonly ["required", "email", "minLength", "maxLength", "length"];
@@ -640,11 +655,7 @@ export declare function toNodeLite(node: Node_2, children?: NodeLite[]): NodeLit
640
655
 
641
656
  export declare function toPropertyName(kind: PropertyKind, names: string[]): string;
642
657
 
643
- export declare function toRenderDefault(children: NodeLite[] | undefined, renderNode: (n: NodeLite, ...params: any[]) => any, ...params: any[]): any[];
644
-
645
- export declare function toRenderSlots(children: NodeLite[] | undefined, renderNode: (n: NodeLite, ...params: any[]) => any, ...params: any[]): {
646
- [key: string]: any;
647
- };
658
+ export declare function toRenderSlots(result: RenderResult): RenderSlots;
648
659
 
649
660
  export declare interface Transients {
650
661
  [nodeId: string]: {
@@ -654,7 +665,7 @@ export declare interface Transients {
654
665
 
655
666
  export declare type TriggerKind = 'propertyTrigger' | 'stateTrigger';
656
667
 
657
- export declare const typesKeys: readonly ["borderRadiusTypesV1", "borderWidthTypesV1", "colorTypesV1", "leftRightTypesV1", "marginTypesV1", "paddingTypesV1", "sizeTypesV1", "tableColumnAlignTypesV1", "topBottomTypesV1"];
668
+ export declare const typesKeys: readonly ["borderRadiusV1", "borderWidthV1", "colorV1", "elevationV1", "leftRightV1", "marginV1", "paddingV1", "sizeV1", "tableColumnAlignV1", "topBottomV1"];
658
669
 
659
670
  export declare function unwrapEventId(id: string): {
660
671
  kind: EventKind;
@@ -838,7 +849,7 @@ export declare type ZProperty = ({
838
849
  } & ZPropertyBranch) | ({
839
850
  array: true;
840
851
  defaultArray: any[];
841
- } & ZPropertyBranch) | WithArray<ZPropertyDummy> | WithArray<ZPropertyText> | WithArray<ZPropertyNumber> | WithArray<ZPropertySwitch> | WithArray<ZPropertySelect> | WithArray<ZPropertyJson> | WithArray<ZPropertyIcon> | WithArray<ZPropertyComp> | WithArray<ZPropertySlot> | WithArray<ZPropertyAdaptSlot> | WithArray<ZPropertyInlineSlot> | WithArray<ZPropertyRule> | WithArray<ZPropertyMultiTypes> | WithArray<ZPropertyTransient<Type>>;
852
+ } & ZPropertyBranch) | WithArray<ZPropertyDummy> | WithArray<ZPropertyText> | WithArray<ZPropertyNumber> | WithArray<ZPropertySwitch> | WithArray<ZPropertySelect> | WithArray<ZPropertyJson> | WithArray<ZPropertyIcon> | WithArray<ZPropertyImage> | WithArray<ZPropertyComp> | WithArray<ZPropertySlot> | WithArray<ZPropertyAdaptSlot> | WithArray<ZPropertyInlineSlot> | WithArray<ZPropertyRule> | WithArray<ZPropertyMultiTypes> | WithArray<ZPropertyTransient<Type>>;
842
853
 
843
854
  declare type ZPropertyAdaptSlot = {
844
855
  ui: 'adaptSlot';
@@ -875,6 +886,11 @@ declare type ZPropertyIcon = {
875
886
  default: string;
876
887
  } & ZPropertyBase;
877
888
 
889
+ declare type ZPropertyImage = {
890
+ ui: 'image';
891
+ default: string;
892
+ } & ZPropertyBase;
893
+
878
894
  declare type ZPropertyInlineSlot = {
879
895
  ui: 'inlineSlot';
880
896
  default: string;
@@ -888,7 +904,7 @@ declare type ZPropertyJson = {
888
904
  declare type ZPropertyMultiTypes = {
889
905
  ui: 'multiTypes';
890
906
  types: ZTypesKey;
891
- default: string;
907
+ default: any;
892
908
  } & ZPropertyBase;
893
909
 
894
910
  declare type ZPropertyNumber = {
@@ -1010,7 +1026,7 @@ export declare interface ZSpawnResult {
1010
1026
  };
1011
1027
  }
1012
1028
 
1013
- export declare type ZType = ZTypeWord | ZTypePixel | ZTypePercent | ZTypeHexColor | ZTypeThemeColor;
1029
+ export declare type ZType = ZTypeNull | ZTypeWord | ZTypeNumber | ZTypePixel | ZTypePercent | ZTypeHexColor | ZTypeThemeColor;
1014
1030
 
1015
1031
  declare type ZTypeBase = {
1016
1032
  value: string;
@@ -1023,6 +1039,20 @@ declare type ZTypeHexColor = {
1023
1039
  default: string;
1024
1040
  } & ZTypeBase;
1025
1041
 
1042
+ declare type ZTypeNull = {
1043
+ trait: 'null';
1044
+ default: null;
1045
+ } & ZTypeBase;
1046
+
1047
+ declare type ZTypeNumber = {
1048
+ trait: 'number';
1049
+ precision?: number;
1050
+ min?: number;
1051
+ max?: number;
1052
+ step?: number;
1053
+ default: number;
1054
+ } & ZTypeBase;
1055
+
1026
1056
  declare type ZTypePercent = {
1027
1057
  trait: 'percent';
1028
1058
  precision?: number;