uxml-preview 0.6.1 → 0.7.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/CHANGELOG.md +250 -0
- package/README.ja.md +7 -2
- package/README.ko.md +7 -2
- package/README.md +7 -2
- package/README.zh-CN.md +7 -2
- package/dist/controls/registry.d.ts +34 -6
- package/dist/controls/theme.d.ts +52 -76
- package/dist/index.d.ts +12 -0
- package/dist/index.js +2715 -1905
- package/dist/known-divergences.d.ts +2 -2
- package/dist/layout/yoga.d.ts +12 -3
- package/dist/render/fonts.d.ts +2 -1
- package/dist/render/measure.d.ts +9 -1
- package/dist/render/paint.d.ts +3 -0
- package/dist/style/resolve.d.ts +5 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Theme } from './controls/theme';
|
|
1
2
|
import { NodeId, UxmlDocument, Warning } from './model/types';
|
|
2
3
|
import { ComputedStyle, ResolveResult } from './style/resolve';
|
|
3
4
|
import { LayoutBox, MeasureText } from './layout/yoga';
|
|
@@ -10,6 +11,7 @@ import { ResolveFont } from './render/fonts';
|
|
|
10
11
|
* See docs/ROADMAP.md.
|
|
11
12
|
*/
|
|
12
13
|
export type { Span, SourceRef, NodeId, ElementName, Attribute, ElementSpans, ElementNode, Combinator, SimpleSelector, SelectorPart, Selector, Declaration, Rule, SheetItem, StyleSheet, WarningKind, WarningKindMap, WarningReason, WarningSubject, Warning, UxmlDocument, StyleOrigin, } from './model/types';
|
|
14
|
+
export type { Theme } from './controls/theme';
|
|
13
15
|
export { collectDependencies, expandTemplates, TEMPLATE_DEPTH_LIMIT } from './template/expand';
|
|
14
16
|
export type { TemplateExpansion, TemplateResolver } from './template/expand';
|
|
15
17
|
export { loadLayoutEngine, isLayoutEngineReady, liveNodeCount } from './layout/yoga';
|
|
@@ -76,6 +78,14 @@ export declare function serialize(doc: UxmlDocument): {
|
|
|
76
78
|
uss: string;
|
|
77
79
|
};
|
|
78
80
|
export interface RenderOptions {
|
|
81
|
+
/**
|
|
82
|
+
* Defaults to 'runtime' since 0.7.0 (Unity's PanelSettings runtime theme).
|
|
83
|
+
* 'editor' is Unity's dark editor theme, used for the published 662/676 figure.
|
|
84
|
+
* The core draws no panel background (transparent, as Unity does). Runtime
|
|
85
|
+
* text is dark (#1b1b1b), so hosts drawing on a dark backdrop must provide
|
|
86
|
+
* a panel background.
|
|
87
|
+
*/
|
|
88
|
+
theme?: Theme;
|
|
79
89
|
/** Resolves font assets once per distinct path and form in each render. */
|
|
80
90
|
resolveFont?: ResolveFont;
|
|
81
91
|
/**
|
|
@@ -127,6 +137,8 @@ export interface RenderOptions {
|
|
|
127
137
|
export { classifyVisibility } from './render/visibility';
|
|
128
138
|
export type { Visibility } from './render/visibility';
|
|
129
139
|
export interface RenderResult {
|
|
140
|
+
/** The theme actually drawn, after option validation. */
|
|
141
|
+
theme: Theme;
|
|
130
142
|
/** Expanded document used for rendering, separate from the source AST. */
|
|
131
143
|
document?: UxmlDocument;
|
|
132
144
|
/** Computed styles keyed by rendered element id. */
|