@markless/core 0.3.3 → 0.5.0
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/dist/index.d.ts +36 -11
- package/dist/preload.d.ts +2 -2
- package/dist/preload.js +2 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { CsrRenderArtifact, CsrRenderContainer, CsrRenderOptions, CsrRenderOutput, CsrRenderable, RenderTarget, render } from "@markless/web/render";
|
|
2
2
|
import { RenderToStringOptions, SsrRenderArtifact, SsrRenderOutput, SsrRenderable, renderToString } from "@markless/web/render-to-string";
|
|
3
3
|
import { ResumePayloadDocumentInput, ResumePayloadScriptsInput, ResumePayloadScriptsResult, resumeFromPayloadDocument, resumeFromPayloadScripts } from "@markless/web/resume";
|
|
4
|
-
|
|
5
4
|
//#region src/framework-api.d.ts
|
|
6
5
|
type AsyncComputedValue<T> = T extends Promise<infer Value> ? Awaited<Value> : T;
|
|
7
|
-
type ElementHandle<T extends Element = Element> = T | undefined;
|
|
8
|
-
type SharedScope = 'request' | 'container' | 'page';
|
|
6
|
+
type ElementHandle<T extends Element | readonly Element[] = Element> = T extends readonly (infer E extends Element)[] ? E[] : T | undefined;
|
|
7
|
+
type SharedScope = 'request' | 'container' | 'page' | 'widget';
|
|
9
8
|
type SharedOptions = {
|
|
10
9
|
readonly scope: SharedScope;
|
|
11
10
|
};
|
|
@@ -23,7 +22,7 @@ type FrameworkApiRuntimeDiagnostic = {
|
|
|
23
22
|
}>;
|
|
24
23
|
readonly docsUrl: string;
|
|
25
24
|
};
|
|
26
|
-
declare class FrameworkApiRuntimeError extends Error implements FrameworkApiRuntimeDiagnostic {
|
|
25
|
+
export declare class FrameworkApiRuntimeError extends Error implements FrameworkApiRuntimeDiagnostic {
|
|
27
26
|
readonly code: "MARKLESS_FRAMEWORK_API_RUNTIME_CALL";
|
|
28
27
|
readonly severity: "error";
|
|
29
28
|
readonly phase: "runtime";
|
|
@@ -36,12 +35,38 @@ declare class FrameworkApiRuntimeError extends Error implements FrameworkApiRunt
|
|
|
36
35
|
readonly docsUrl = "https://markless.dev/errors/MARKLESS_FRAMEWORK_API_RUNTIME_CALL";
|
|
37
36
|
constructor(apiName: FrameworkApiName);
|
|
38
37
|
}
|
|
39
|
-
declare function state<T>(initial: T): T;
|
|
40
|
-
declare function computed<T>(derive: () => T): AsyncComputedValue<T>;
|
|
41
|
-
declare function element<T extends Element = Element>(): ElementHandle<T>;
|
|
38
|
+
export declare function state<T>(initial: T): T;
|
|
39
|
+
export declare function computed<T>(derive: () => T): AsyncComputedValue<T>;
|
|
40
|
+
export declare function element<T extends Element | Element[] = Element>(): ElementHandle<T>;
|
|
42
41
|
type SharedDefinition<T> = () => T;
|
|
43
|
-
declare function shared<T>(create: () => T, options?: SharedOptions): SharedDefinition<T>;
|
|
44
|
-
declare function storage(fallback: string): string;
|
|
45
|
-
declare function storage(key: string, fallback: string): string;
|
|
42
|
+
export declare function shared<T>(create: () => T, options?: SharedOptions): SharedDefinition<T>;
|
|
43
|
+
export declare function storage(fallback: string): string;
|
|
44
|
+
export declare function storage(key: string, fallback: string): string;
|
|
46
45
|
//#endregion
|
|
47
|
-
|
|
46
|
+
//#region src/jsx-types.d.ts
|
|
47
|
+
/** Anything that can sit in a component's `children` position. */
|
|
48
|
+
type Children = __MarklessTypeService.Child;
|
|
49
|
+
/** The HTML tags that cannot have children; every other tag's props include them. */
|
|
50
|
+
type VoidTagName = 'area' | 'base' | 'br' | 'col' | 'embed' | 'hr' | 'img' | 'input' | 'link' | 'meta' | 'source' | 'track' | 'wbr';
|
|
51
|
+
/**
|
|
52
|
+
* Every attribute, event handler, `attach`, and `el` the given intrinsic tag accepts.
|
|
53
|
+
* Tags that can hold content also accept `children`; void tags do not, so a part
|
|
54
|
+
* wrapping an `<input>` cannot be projected into by mistake.
|
|
55
|
+
*/
|
|
56
|
+
type PropsOf<Tag extends __MarklessTypeService.IntrinsicTagName> = __MarklessTypeService.IntrinsicElementFor<Tag> & (Tag extends VoidTagName ? unknown : {
|
|
57
|
+
readonly children?: Children;
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* The instance fields a widget root seeds from its props: the same fields the
|
|
61
|
+
* consumer knows, made required and mutable, because a prop is optional to the
|
|
62
|
+
* consumer while the root assigns every one of them on every render.
|
|
63
|
+
*/
|
|
64
|
+
type Seeded<Props, Keys extends keyof Props> = { -readonly [Field in Keys]-?: Props[Field]; };
|
|
65
|
+
/**
|
|
66
|
+
* A compiled TSRX component, as a value: what a `.tsrx` module's default export
|
|
67
|
+
* is, what test harnesses mount, and what composition renders. The runtime's
|
|
68
|
+
* internal contract stays internal; this is the name consumers see.
|
|
69
|
+
*/
|
|
70
|
+
type Component = CsrRenderable;
|
|
71
|
+
//#endregion
|
|
72
|
+
export { type AsyncComputedValue, type Children, type Component, type CsrRenderArtifact, type CsrRenderContainer, type CsrRenderOptions, type CsrRenderOutput, type CsrRenderable, type ElementHandle, type FrameworkApiName, type FrameworkApiRuntimeDiagnostic, type PropsOf, type RenderTarget, type RenderToStringOptions, type ResumePayloadDocumentInput, type ResumePayloadScriptsInput, type ResumePayloadScriptsResult, type Seeded, type SharedDefinition, type SharedOptions, type SharedScope, type SsrRenderArtifact, type SsrRenderOutput, type SsrRenderable, render, renderToString, resumeFromPayloadDocument, resumeFromPayloadScripts };
|
package/dist/preload.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AppendedModulePreloads, LazySymbolPreloadView, MarklessBundleGraph, ModulePreloadFetchPriority, ModulePreloadPlanEntry, ModulePreloadPlanInput, ModulePreloadPriority, ModulePreloadRoot, PreloadLazySymbolModulesInput, planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules } from "@markless/bundler/preload";
|
|
2
|
-
export { type AppendedModulePreloads, type LazySymbolPreloadView, type MarklessBundleGraph, type ModulePreloadFetchPriority, type ModulePreloadPlanEntry, type ModulePreloadPlanInput, type ModulePreloadPriority, type ModulePreloadRoot, type PreloadLazySymbolModulesInput, planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules };
|
|
1
|
+
import { AppendedModulePreloads, LazySymbolPreloadView, MarklessBundleGraph, ModulePreloadFetchPriority, ModulePreloadPlanEntry, ModulePreloadPlanInput, ModulePreloadPriority, ModulePreloadRoot, PreloadLazySymbolModulesInput, isExecutionLogChunk, planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules } from "@markless/bundler/preload";
|
|
2
|
+
export { type AppendedModulePreloads, type LazySymbolPreloadView, type MarklessBundleGraph, type ModulePreloadFetchPriority, type ModulePreloadPlanEntry, type ModulePreloadPlanInput, type ModulePreloadPriority, type ModulePreloadRoot, type PreloadLazySymbolModulesInput, isExecutionLogChunk, planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules };
|
package/dist/preload.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules } from "@markless/bundler/preload";
|
|
2
|
-
export { planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules };
|
|
1
|
+
import { isExecutionLogChunk, planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules } from "@markless/bundler/preload";
|
|
2
|
+
export { isExecutionLogChunk, planModulePreloadUrls, planModulePreloads, preloadLazySymbolModules };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markless/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Markless core authoring APIs: resumable TSRX apps with no hydration and no VDOM.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -113,9 +113,9 @@
|
|
|
113
113
|
"provenance": true
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
|
-
"@markless/
|
|
117
|
-
"@markless/
|
|
118
|
-
"@markless/web": "0.
|
|
116
|
+
"@markless/router": "0.5.0",
|
|
117
|
+
"@markless/bundler": "0.5.0",
|
|
118
|
+
"@markless/web": "0.5.0"
|
|
119
119
|
},
|
|
120
120
|
"scripts": {}
|
|
121
121
|
}
|