@hy-bricks/canvas 0.4.1 → 0.4.3
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/CHANGELOG.md +51 -10
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +49 -0
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,14 @@ import { ComponentProvideOptions } from 'vue';
|
|
|
4
4
|
import { ComputedRef } from 'vue';
|
|
5
5
|
import { DefineComponent } from 'vue';
|
|
6
6
|
import { InjectionKey } from 'vue';
|
|
7
|
+
import { InstanceTimings } from '@hy-bricks/core';
|
|
7
8
|
import { PublicProps } from 'vue';
|
|
8
9
|
import { Ref } from 'vue';
|
|
9
10
|
import { ShallowRef } from 'vue';
|
|
10
11
|
import { VNode } from 'vue';
|
|
11
12
|
|
|
13
|
+
export declare function __resetRendererDiagnosticsRegistry(): void;
|
|
14
|
+
|
|
12
15
|
declare const __VLS_component: DefineComponent<__VLS_Props_2, {
|
|
13
16
|
context: CanvasContext;
|
|
14
17
|
handle: CanvasHandle & {
|
|
@@ -1333,6 +1336,8 @@ export declare function getOutletRectFromDom(parentId: string, slot?: string, ro
|
|
|
1333
1336
|
|
|
1334
1337
|
export declare function getParentLayoutMode(ctx: CanvasContext, instanceId: string): ContainerLayoutConfig['mode'] | undefined;
|
|
1335
1338
|
|
|
1339
|
+
export declare function getRendererDiagnostics(canvasId: string): RendererDiagnosticsHandle | null;
|
|
1340
|
+
|
|
1336
1341
|
export declare function getSiblings(instances: readonly PageInstance[], parentId: string | null | undefined, slot: string | undefined): PageInstance[];
|
|
1337
1342
|
|
|
1338
1343
|
export declare function getSlotChildRectFromDom(instanceId: string, root?: ParentNode | null): DOMRect | null;
|
|
@@ -1409,6 +1414,8 @@ export declare interface InstanceSizeAxis {
|
|
|
1409
1414
|
|
|
1410
1415
|
export declare type InstanceSizeMode = 'px' | 'percent' | 'fill' | 'hug' | 'auto';
|
|
1411
1416
|
|
|
1417
|
+
export { InstanceTimings }
|
|
1418
|
+
|
|
1412
1419
|
export declare const InteractionLayer: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
|
|
1413
1420
|
|
|
1414
1421
|
export declare type InteractionOptions = CanvasBehaviorConfig;
|
|
@@ -1492,6 +1499,8 @@ declare type Listener = (ids: readonly string[]) => void;
|
|
|
1492
1499
|
|
|
1493
1500
|
export declare function listRegisteredCanvasIds(): readonly string[];
|
|
1494
1501
|
|
|
1502
|
+
export declare function listRendererDiagnostics(): RendererDiagnosticsHandle[];
|
|
1503
|
+
|
|
1495
1504
|
declare type LockedSubset = {
|
|
1496
1505
|
locked?: boolean;
|
|
1497
1506
|
lockPosition?: boolean;
|
|
@@ -1771,6 +1780,26 @@ declare interface Rect_2 {
|
|
|
1771
1780
|
|
|
1772
1781
|
export declare function registerDesignerHandle(canvasId: string, handle: CanvasHandle): void;
|
|
1773
1782
|
|
|
1783
|
+
export declare function registerRendererDiagnostics(canvasId: string, handle: RendererDiagnosticsHandle): void;
|
|
1784
|
+
|
|
1785
|
+
declare type RegistryEvent = 'register' | 'unregister';
|
|
1786
|
+
|
|
1787
|
+
declare type RegistryListener = (event: RegistryEvent, canvasId: string) => void;
|
|
1788
|
+
|
|
1789
|
+
export declare interface RendererDiagnosticsHandle {
|
|
1790
|
+
readonly canvasId: string;
|
|
1791
|
+
getSchedulerStats(): {
|
|
1792
|
+
pending: number;
|
|
1793
|
+
mounting: number;
|
|
1794
|
+
mounted: number;
|
|
1795
|
+
disposing: number;
|
|
1796
|
+
};
|
|
1797
|
+
listRuntimeInstances(): RuntimeInstanceSnapshot[];
|
|
1798
|
+
getInstanceTimings(instanceId: string): InstanceTimings | null;
|
|
1799
|
+
getLayoutIssues(): readonly LayoutIssue[];
|
|
1800
|
+
getPageDocument(): PageDocument | null;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1774
1803
|
export declare function renderLayoutBoxStyle(layoutBox: LayoutBox, zIndex: number, rotation: number | undefined, parentLayoutMode: ContainerLayoutConfig['mode'] | undefined, parentSplitDirection?: 'horizontal' | 'vertical'): Record<string, string | number>;
|
|
1775
1804
|
|
|
1776
1805
|
export declare interface RenderScheduler {
|
|
@@ -1779,6 +1808,7 @@ export declare interface RenderScheduler {
|
|
|
1779
1808
|
isMounted(instanceId: string): boolean;
|
|
1780
1809
|
getState(instanceId: string): MountState;
|
|
1781
1810
|
readonly state: Readonly<Record<string, MountState>>;
|
|
1811
|
+
getStats(): RenderSchedulerStats;
|
|
1782
1812
|
dispose(): void;
|
|
1783
1813
|
}
|
|
1784
1814
|
|
|
@@ -1789,6 +1819,13 @@ export declare interface RenderSchedulerOptions {
|
|
|
1789
1819
|
root?: Element | null;
|
|
1790
1820
|
}
|
|
1791
1821
|
|
|
1822
|
+
export declare interface RenderSchedulerStats {
|
|
1823
|
+
pending: number;
|
|
1824
|
+
mounting: number;
|
|
1825
|
+
mounted: number;
|
|
1826
|
+
disposing: number;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1792
1829
|
export declare interface ReparentBridge {
|
|
1793
1830
|
getDropTarget(clientPoint: Point, options?: {
|
|
1794
1831
|
excludeInstanceId?: string;
|
|
@@ -1822,6 +1859,14 @@ export declare function resolveCanvasSizePx(size: CanvasSizeValue, fallback?: nu
|
|
|
1822
1859
|
|
|
1823
1860
|
export declare function resolveMeasuredCanvasSizePx(size: CanvasSizeValue, axisSize: number, fallback?: number): number;
|
|
1824
1861
|
|
|
1862
|
+
export declare interface RuntimeInstanceSnapshot {
|
|
1863
|
+
instanceId: string;
|
|
1864
|
+
componentId: string;
|
|
1865
|
+
mountState: 'pending' | 'mounting' | 'mounted' | 'disposing';
|
|
1866
|
+
timings: InstanceTimings | null;
|
|
1867
|
+
protocolStatus: 'ok' | 'missing-source' | 'layout-error' | 'missing-componentId';
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1825
1870
|
export declare const RuntimeLayer: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{}>, {
|
|
1826
1871
|
mode: CanvasMode;
|
|
1827
1872
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -1953,6 +1998,8 @@ export declare type StoreTraceKind = 'data-source-update' | 'data-query-skipped'
|
|
|
1953
1998
|
|
|
1954
1999
|
export declare function subscribeDesignerRegistry(fn: Listener): () => void;
|
|
1955
2000
|
|
|
2001
|
+
export declare function subscribeRendererDiagnostics(listener: RegistryListener): () => void;
|
|
2002
|
+
|
|
1956
2003
|
export declare interface TraceCollectorOptions {
|
|
1957
2004
|
capacity?: number;
|
|
1958
2005
|
filterKinds?: BindingTraceKind[];
|
|
@@ -1968,6 +2015,8 @@ export declare function unionRects(rects: readonly Rect_2[]): Rect_2 | null;
|
|
|
1968
2015
|
|
|
1969
2016
|
export declare function unregisterDesignerHandle(canvasId: string): void;
|
|
1970
2017
|
|
|
2018
|
+
export declare function unregisterRendererDiagnostics(canvasId: string): void;
|
|
2019
|
+
|
|
1971
2020
|
export declare function useCanvasContext(): CanvasContext;
|
|
1972
2021
|
|
|
1973
2022
|
export declare function validateBindings(doc: PageDocument, options?: ValidateBindingsOptions): BindingIssue[];
|