x-runtime-lib 0.8.34 → 0.8.36

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.
@@ -1,5 +1,6 @@
1
1
  export type Env = 'dev' | 'prod';
2
2
  export type Mode = 'runtime' | 'preview' | 'editor';
3
+ export declare function isExecutableMode(mode: Mode): mode is "runtime" | "preview";
3
4
  export declare const types: readonly ["string", "number", "boolean", "array", "object"];
4
5
  export type Type = (typeof types)[number];
5
6
  export declare function getTypeColor(type: Type): string;
@@ -1,24 +1,6 @@
1
1
  export type PropertyKind = 'elementProperty' | 'refProperty' | 'customProperty' | 'elementSlotProperty' | 'customSlotProperty';
2
2
  export declare function isLocaleOfPropertyKind(kind: PropertyKind): kind is "elementProperty" | "elementSlotProperty";
3
- export declare function makePropertyId(kind: PropertyKind, nodeId: string, propertyKey: string): string;
4
- export declare function unwrapPropertyId(id: string): {
5
- kind: PropertyKind;
6
- nodeId: string;
7
- propertyKey: string;
8
- };
9
3
  export type MethodKind = 'elementMethod' | 'refMethod' | 'customMethod' | 'elementSlotMethod' | 'customSlotMethod';
10
4
  export declare function isLocaleOfMethodKind(kind: MethodKind): kind is "elementMethod" | "elementSlotMethod";
11
- export declare function makeMethodId(kind: MethodKind, nodeId: string, methodKey: string): string;
12
- export declare function unwrapMethodId(id: string): {
13
- kind: MethodKind;
14
- nodeId: string;
15
- methodKey: string;
16
- };
17
5
  export type EventKind = 'elementEvent' | 'refEvent' | 'customEvent' | 'elementPropertyChangeEvent' | 'customPropertyChangeEvent' | 'stateChangeEvent';
18
6
  export declare function isLocaleOfEventKind(kind: EventKind): kind is "elementEvent" | "elementPropertyChangeEvent";
19
- export declare function makeEventId(kind: EventKind, nodeId: string, eventKey: string): string;
20
- export declare function unwrapEventId(id: string): {
21
- kind: EventKind;
22
- nodeId: string;
23
- eventKey: string;
24
- };
@@ -5,3 +5,4 @@ export * from './property';
5
5
  export * from './provideInject';
6
6
  export * from './reactivity';
7
7
  export * from './sandbox';
8
+ export * from './unifiedId';
@@ -1,5 +1,6 @@
1
1
  import { Data, Env, Mode } from '@/types';
2
2
  export type PropertyKeys = string[] | string;
3
+ export declare function dotPropertyKeys(propertyKeys: PropertyKeys): string;
3
4
  interface Hooks {
4
5
  onElementPropertyChange: (nodeId: string, propertyKeys: PropertyKeys, newValue: any, oldValue: any) => void;
5
6
  onCustomPropertyChange: (propertyId: string, newValue: any, oldValue: any) => void;
@@ -0,0 +1,21 @@
1
+ import { EventKind, MethodKind, PropertyKind } from '@/types';
2
+ export declare function makePropertyId(kind: PropertyKind, nodeId: string, propertyKey: string): string;
3
+ export declare function unwrapPropertyId(id: string): {
4
+ kind: PropertyKind;
5
+ nodeId: string;
6
+ propertyKey: string;
7
+ };
8
+ export declare function makeMethodId(kind: MethodKind, nodeId: string, methodKey: string): string;
9
+ export declare function unwrapMethodId(id: string): {
10
+ kind: MethodKind;
11
+ nodeId: string;
12
+ methodKey: string;
13
+ };
14
+ export declare function makeEventId(kind: EventKind, nodeId: string, eventKey: string): string;
15
+ export declare function unwrapEventId(id: string): {
16
+ kind: EventKind;
17
+ nodeId: string;
18
+ eventKey: string;
19
+ };
20
+ export declare function makeStateId(stateId: string): string;
21
+ export declare function unwrapStateId(id: string): string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.8.34",
4
+ "version": "0.8.36",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",