@lark.js/mvc 0.0.4 → 0.0.6
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/README.md +770 -506
- package/dist/{chunk-ANWA22AX.js → chunk-3HSA7OHB.js} +30 -31
- package/dist/index.cjs +1107 -1343
- package/dist/index.d.cts +618 -257
- package/dist/index.d.ts +618 -257
- package/dist/index.js +1094 -1324
- package/dist/runtime.cjs +70 -0
- package/dist/runtime.d.cts +29 -0
- package/dist/runtime.d.ts +29 -0
- package/dist/runtime.js +41 -0
- package/dist/vite.cjs +30 -31
- package/dist/vite.d.cts +3 -3
- package/dist/vite.d.ts +3 -3
- package/dist/vite.js +1 -1
- package/dist/webpack.cjs +30 -31
- package/dist/webpack.js +1 -1
- package/package.json +41 -27
- package/src/client.d.ts +81 -0
package/src/client.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
FrameInterface,
|
|
3
|
+
FrameworkInterface,
|
|
4
|
+
StateInterface,
|
|
5
|
+
RouterInterface,
|
|
6
|
+
CrossSiteConfig,
|
|
7
|
+
} from "./types";
|
|
8
|
+
import type { Frame } from "./frame";
|
|
9
|
+
import type { View } from "./view";
|
|
10
|
+
declare global {
|
|
11
|
+
interface Window {
|
|
12
|
+
/** Whether lark debug mode is enabled */
|
|
13
|
+
__lark_Debug: boolean;
|
|
14
|
+
/** Lark Framework object */
|
|
15
|
+
__lark_Framework?: FrameworkInterface;
|
|
16
|
+
/** Lark State object */
|
|
17
|
+
__lark_State?: StateInterface;
|
|
18
|
+
/** Lark Router object */
|
|
19
|
+
__lark_Router?: RouterInterface;
|
|
20
|
+
/** Lark Frame class */
|
|
21
|
+
__lark_Frame?: typeof Frame;
|
|
22
|
+
/** Lark View class */
|
|
23
|
+
__lark_View?: typeof View;
|
|
24
|
+
/** Invalidate a view class from the registry (HMR support) */
|
|
25
|
+
__lark_invalidateViewClass?: (viewPath: string) => void;
|
|
26
|
+
/** Get the view class registry (HMR/debug support) */
|
|
27
|
+
__lark_getViewClassRegistry?: () => Record<string, typeof View>;
|
|
28
|
+
/** Register a view class (HMR support) */
|
|
29
|
+
__lark_registerViewClass?: (
|
|
30
|
+
viewPath: string,
|
|
31
|
+
ViewClass: typeof View,
|
|
32
|
+
) => void;
|
|
33
|
+
/** Cross-site configuration injected by build tools */
|
|
34
|
+
crossConfigs?: CrossSiteConfig[];
|
|
35
|
+
scheduler?: Scheduler;
|
|
36
|
+
}
|
|
37
|
+
interface HTMLElement {
|
|
38
|
+
/** Bound frame instance */
|
|
39
|
+
frame?: FrameInterface | undefined;
|
|
40
|
+
/** Whether frame is bound to this element (1 = bound) */
|
|
41
|
+
frameBound?: number;
|
|
42
|
+
/** Whether auto-generated ID was assigned */
|
|
43
|
+
autoId?: number;
|
|
44
|
+
/** View rendered flag for selector matching */
|
|
45
|
+
viewRendered?: number;
|
|
46
|
+
/** Range frame ID for event delegation */
|
|
47
|
+
rangeFrameId?: string;
|
|
48
|
+
/** Range element guid for event delegation */
|
|
49
|
+
rangeElementGuid?: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface Element {
|
|
53
|
+
/** VDOM diff cached compare key flag */
|
|
54
|
+
compareKeyCached?: number | undefined;
|
|
55
|
+
/** VDOM diff cached compare key */
|
|
56
|
+
cachedCompareKey?: string | undefined;
|
|
57
|
+
"v-lark"?: string | undefined;
|
|
58
|
+
|
|
59
|
+
// @lark.js/sentry
|
|
60
|
+
"s-lark-ev"?: string | undefined;
|
|
61
|
+
"s-lark-msg"?: string | undefined;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// CSS module type declarations
|
|
66
|
+
declare module "*.css" {
|
|
67
|
+
const content: string;
|
|
68
|
+
export default content;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// HTML template module declarations (Lark templates - compiled to functions)
|
|
72
|
+
declare module "*.html" {
|
|
73
|
+
// const template: (
|
|
74
|
+
// data: unknown,
|
|
75
|
+
// viewId: string,
|
|
76
|
+
// refData: unknown,
|
|
77
|
+
// ) => string;
|
|
78
|
+
// export default template;
|
|
79
|
+
const content: string;
|
|
80
|
+
export default content;
|
|
81
|
+
}
|