@next-core/runtime 1.22.9 → 1.22.11

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 (45) hide show
  1. package/dist/cjs/CustomProcessors.js +16 -1
  2. package/dist/cjs/CustomProcessors.js.map +1 -1
  3. package/dist/cjs/CustomTemplates.js +17 -2
  4. package/dist/cjs/CustomTemplates.js.map +1 -1
  5. package/dist/cjs/getV2RuntimeFromDll.js +16 -0
  6. package/dist/cjs/getV2RuntimeFromDll.js.map +1 -0
  7. package/dist/cjs/history.js +13 -14
  8. package/dist/cjs/history.js.map +1 -1
  9. package/dist/cjs/index.js +12 -0
  10. package/dist/cjs/index.js.map +1 -1
  11. package/dist/cjs/internal/Runtime.js +35 -3
  12. package/dist/cjs/internal/Runtime.js.map +1 -1
  13. package/dist/cjs/internal/compute/WidgetFunctions.js +15 -3
  14. package/dist/cjs/internal/compute/WidgetFunctions.js.map +1 -1
  15. package/dist/cjs/internal/compute/WidgetI18n.js +15 -4
  16. package/dist/cjs/internal/compute/WidgetI18n.js.map +1 -1
  17. package/dist/cjs/internal/compute/checkIf.js +15 -2
  18. package/dist/cjs/internal/compute/checkIf.js.map +1 -1
  19. package/dist/esm/CustomProcessors.js +16 -1
  20. package/dist/esm/CustomProcessors.js.map +1 -1
  21. package/dist/esm/CustomTemplates.js +16 -1
  22. package/dist/esm/CustomTemplates.js.map +1 -1
  23. package/dist/esm/getV2RuntimeFromDll.js +10 -0
  24. package/dist/esm/getV2RuntimeFromDll.js.map +1 -0
  25. package/dist/esm/history.js +9 -11
  26. package/dist/esm/history.js.map +1 -1
  27. package/dist/esm/index.js +1 -0
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/esm/internal/Runtime.js +33 -1
  30. package/dist/esm/internal/Runtime.js.map +1 -1
  31. package/dist/esm/internal/compute/WidgetFunctions.js +13 -1
  32. package/dist/esm/internal/compute/WidgetFunctions.js.map +1 -1
  33. package/dist/esm/internal/compute/WidgetI18n.js +13 -2
  34. package/dist/esm/internal/compute/WidgetI18n.js.map +1 -1
  35. package/dist/esm/internal/compute/checkIf.js +13 -1
  36. package/dist/esm/internal/compute/checkIf.js.map +1 -1
  37. package/dist/types/getV2RuntimeFromDll.d.ts +21 -0
  38. package/dist/types/history.d.ts +1 -1
  39. package/dist/types/index.d.ts +1 -0
  40. package/dist/types/internal/Renderer.d.ts +1 -1
  41. package/dist/types/internal/Runtime.d.ts +1 -1
  42. package/dist/types/internal/compute/WidgetFunctions.d.ts +1 -1
  43. package/dist/types/internal/compute/WidgetI18n.d.ts +1 -1
  44. package/dist/types/internal/compute/checkIf.d.ts +1 -1
  45. package/package.json +3 -3
@@ -0,0 +1,21 @@
1
+ import type { CustomTemplateConstructor, MetaI18n, StoryboardFunction } from "@next-core/types";
2
+ import type { NextHistory } from "./history.js";
3
+ import type { IfContainer } from "./internal/compute/checkIf.js";
4
+ interface Kit {
5
+ getRuntime(): {
6
+ registerCustomTemplate(tagName: string, constructor: CustomTemplateConstructor): void;
7
+ registerCustomProcessor(processorFullName: string, processorFunc: Function): void;
8
+ };
9
+ getHistory(): NextHistory;
10
+ registerWidgetFunctions(widgetId: string, functions: StoryboardFunction[], widgetVersion?: string): void;
11
+ registerWidgetI18n(widgetId: string, i18nData: MetaI18n): void;
12
+ looseCheckIfByTransform(ifContainer: IfContainer, data: unknown): boolean;
13
+ SingleBrickAsComponentFactory: any;
14
+ BrickAsComponentFactory: any;
15
+ authenticate: any;
16
+ getAuth: any;
17
+ isLoggedIn: any;
18
+ logout: any;
19
+ }
20
+ export declare function getV2RuntimeFromDll(): Kit | undefined;
21
+ export {};
@@ -2,6 +2,6 @@ import { History, Location } from "history";
2
2
  import { type ExtendedHistory, NextHistoryState } from "./internal/historyExtended.js";
3
3
  export type NextHistory = History<NextHistoryState> & ExtendedHistory;
4
4
  export declare function createHistory(): NextHistory;
5
- export declare function getHistory(): NextHistory;
5
+ export declare const getHistory: () => NextHistory;
6
6
  export type NextLocation = Location<NextHistoryState>;
7
7
  export type { NextHistoryState };
@@ -19,3 +19,4 @@ export { StoryboardFunctionRegistryFactory } from "./StoryboardFunctionRegistry.
19
19
  export { matchPath } from "./internal/matchPath.js";
20
20
  export { Notification, type NotificationOptions } from "./Notification.js";
21
21
  export { Dialog, type DialogOptions } from "./Dialog.js";
22
+ export * from "./getV2RuntimeFromDll.js";
@@ -19,7 +19,7 @@ export interface RenderOutput {
19
19
  export declare function renderRoutes(returnNode: RenderReturnNode, routes: RouteConf[], _runtimeContext: RuntimeContext, rendererContext: RendererContext, parentRoutes: RouteConf[], slotId?: string, isIncremental?: boolean): Promise<RenderOutput>;
20
20
  export declare function renderBricks(returnNode: RenderReturnNode, bricks: BrickConf[], runtimeContext: RuntimeContext, rendererContext: RendererContext, parentRoutes: RouteConf[], slotId?: string, tplStack?: Map<string, number>, keyPath?: number[]): Promise<RenderOutput>;
21
21
  export declare function renderBrick(returnNode: RenderReturnNode, brickConf: RuntimeBrickConfWithSymbols, _runtimeContext: RuntimeContext, rendererContext: RendererContext, parentRoutes: RouteConf[], slotId?: string, keyPath?: number[], tplStack?: Map<string, number>): Promise<RenderOutput>;
22
- export declare function getDataStores(runtimeContext: RuntimeContext): (DataStore<"STATE"> | DataStore<"FORM_STATE"> | DataStore<"CTX">)[];
22
+ export declare function getDataStores(runtimeContext: RuntimeContext): (DataStore<"STATE"> | DataStore<"CTX"> | DataStore<"FORM_STATE">)[];
23
23
  export declare function postAsyncRender(output: RenderOutput, runtimeContext: RuntimeContext, stores: DataStore<DataStoreType>[]): Promise<unknown[]>;
24
24
  export declare function createScopedRuntimeContext(runtimeContext: RuntimeContext): [
25
25
  scopedRuntimeContext: RuntimeContext,
@@ -71,7 +71,7 @@ export interface RuntimeHooksMenuHelpers {
71
71
  }
72
72
  export declare let hooks: RuntimeHooks | undefined;
73
73
  export declare function createRuntime(options?: RuntimeOptions): Runtime;
74
- export declare function getRuntime(): Runtime;
74
+ export declare const getRuntime: () => Runtime;
75
75
  export declare class Runtime {
76
76
  #private;
77
77
  initialize(data: BootstrapData): void;
@@ -1,3 +1,3 @@
1
1
  import { StoryboardFunction } from "@next-core/types";
2
2
  export declare const widgetFunctions: Readonly<Record<string, Readonly<Record<string, Function>>>>;
3
- export declare function registerWidgetFunctions(widgetId: string, functions: StoryboardFunction[], widgetVersion?: string): void;
3
+ export declare const registerWidgetFunctions: (widgetId: string, functions: StoryboardFunction[], widgetVersion?: string | undefined) => void;
@@ -1,3 +1,3 @@
1
1
  import type { MetaI18n } from "@next-core/types";
2
- export declare function registerWidgetI18n(widgetId: string, i18nData: MetaI18n): void;
3
2
  export declare function widgetI18nFactory(widgetId: string): import("i18next").TFunction<string, undefined>;
3
+ export declare const registerWidgetI18n: (widgetId: string, i18nData: MetaI18n) => void;
@@ -20,4 +20,4 @@ export declare function asyncCheckIf(ifContainer: IfContainer, runtimeContext: R
20
20
  export declare function checkIf(ifContainer: IfContainer, runtimeContext: RuntimeContext): boolean;
21
21
  export declare function checkIfOfComputed(ifContainer: IfContainer): boolean;
22
22
  export declare function asyncCheckBrickIf(brickConf: BrickConf, runtimeContext: RuntimeContext): Promise<boolean>;
23
- export declare function checkIfByTransform(ifContainer: IfContainer, data: unknown): boolean;
23
+ export declare const checkIfByTransform: (ifContainer: IfContainer, data: unknown) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/runtime",
3
- "version": "1.22.9",
3
+ "version": "1.22.11",
4
4
  "homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/runtime",
5
5
  "license": "GPL-3.0",
6
6
  "repository": {
@@ -47,7 +47,7 @@
47
47
  "@next-core/http": "^1.1.4",
48
48
  "@next-core/i18n": "^1.0.26",
49
49
  "@next-core/inject": "^1.0.19",
50
- "@next-core/loader": "^1.4.2",
50
+ "@next-core/loader": "^1.4.3",
51
51
  "@next-core/supply": "^2.1.5",
52
52
  "@next-core/types": "^1.6.1",
53
53
  "@next-core/utils": "^1.6.0",
@@ -65,5 +65,5 @@
65
65
  "@next-core/build-next-libs": "^1.0.7",
66
66
  "@next-core/test-next": "^1.0.10"
67
67
  },
68
- "gitHead": "99f3a381f5712c54cd5cdc185b4d511d98e665f3"
68
+ "gitHead": "5cd16e207c1077b78a54ab87d5f1130bab78d86b"
69
69
  }