@proteus-vue/component-ir 0.3.0-beta.11 → 0.3.0-beta.23
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/capability-domains.d.ts +13 -0
- package/dist/color.d.ts +18 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +1484 -21
- package/dist/paint-hint.d.ts +40 -0
- package/dist/pnode-analyze.d.ts +42 -0
- package/dist/pnode-build.d.ts +59 -0
- package/dist/pnode-style.d.ts +50 -0
- package/dist/pnode-trace.d.ts +21 -0
- package/dist/pnode.d.ts +216 -0
- package/dist/schema.d.ts +2 -2
- package/package.json +3 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type CapabilityDomain = '网络与通信' | '设备与系统' | '存储与文件' | '位置与地图' | '媒体与扫码' | '账号与支付' | '通知与分享' | '应用与生命周期' | '可观测与调试' | '其他';
|
|
2
|
+
/** 能力分域:key = semantic 去掉 `capability.` 前缀(如 `capability.camera` → `camera`) */
|
|
3
|
+
export declare const CAPABILITY_CATEGORY: Record<string, CapabilityDomain>;
|
|
4
|
+
/** 分组展示顺序(官网侧栏 / 优先级表共用) */
|
|
5
|
+
export declare const CAPABILITY_CATEGORY_ORDER: readonly CapabilityDomain[];
|
|
6
|
+
/** 取能力域(输入可为完整 semantic `capability.x` 或裸 slug `x`) */
|
|
7
|
+
export declare function capabilityDomainOf(semanticOrSlug: string): CapabilityDomain;
|
|
8
|
+
/**
|
|
9
|
+
* 审计:capacity 清单里未登记分域的条目(返回缺口列表;空数组 = 全登记)。
|
|
10
|
+
* ★设计为**纯函数**(接收 slug 列表,不 import catalog)——避免循环依赖;
|
|
11
|
+
* 生成器/门禁侧传 `PRIMITIVE_CATALOG.filter(kind==='capability')` 的 slug。
|
|
12
|
+
*/
|
|
13
|
+
export declare function auditCapabilityDomains(slugs: readonly string[]): string[];
|
package/dist/color.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** 颜色是否**确实不透明**(保守:拿不准 ⇒ false) */
|
|
2
|
+
/**
|
|
3
|
+
* 解析颜色为 RGB(仅用于"是否中性色"判定;**不做色彩管理**——只比较三个通道是否相等)。
|
|
4
|
+
* 拿不准(具名色/hsl/var 等)⇒ null(调用方按"不是中性色"保守处理)。
|
|
5
|
+
*/
|
|
6
|
+
export declare function rgbOfColor(color: string | undefined | null): [number, number, number] | null;
|
|
7
|
+
/**
|
|
8
|
+
* 颜色是否为**中性色**(R=G=B ⇒ 8 位灰度格式能够无损表达)。
|
|
9
|
+
*
|
|
10
|
+
* 【为什么需要它(格式的硬约束,不是保守选择)】紧凑单通道存储(iOS `gray8Uint`)
|
|
11
|
+
* **只有亮度、没有色相**——红字写进去会变成灰字。
|
|
12
|
+
* ⇒ "可用紧凑格式"的前提必须包含"颜色本来就是灰阶的"。
|
|
13
|
+
* ★本仓实测教训:−39% 的实验用的是**白字**(恰好是中性色)⇒ 该约束在实验里成立、
|
|
14
|
+
* 却从未被写进判据;若不补,彩色文本会被**静默去色**(画面错,无任何报错)。
|
|
15
|
+
*/
|
|
16
|
+
export declare function isNeutralColor(color: string | undefined | null): boolean;
|
|
17
|
+
/** 颜色是否**确实不透明**(保守:拿不准 ⇒ false) */
|
|
18
|
+
export declare function isOpaqueColor(color: string | undefined | null): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export { checkComponentSnapshot, extractSemanticTree, checkSemanticCoverage } fr
|
|
|
8
8
|
export type { ComponentConformanceResult, ControlMismatch, SemanticTree, CoverageGap } from './conformance';
|
|
9
9
|
export { PRIMITIVE_CATALOG, componentPrimitives, implementedPrimitives, primitiveById, primitiveBySemantic, primitiveByTag, checkPrimitiveCatalog } from './primitives';
|
|
10
10
|
export type { PrimitiveDef, PrimitiveKind, PrimitiveStatus } from './primitives';
|
|
11
|
+
export { CAPABILITY_CATEGORY, CAPABILITY_CATEGORY_ORDER, capabilityDomainOf, auditCapabilityDomains } from './capability-domains';
|
|
12
|
+
export type { CapabilityDomain } from './capability-domains';
|
|
11
13
|
export { MP_MAPPING_MATRIX, auditMiniprogramCoverage, auditMatrixReferences, auditCatalogConsistency, formatCoverageReport } from './audit';
|
|
12
14
|
export type { MatrixRefIssue } from './audit';
|
|
13
15
|
export type { CoverageReport, MpCoverageStatus, MpMatrixItem, ConsistencyIssue } from './audit';
|
|
@@ -15,3 +17,15 @@ export { classifySpecApi, classifySpecComponent, auditSpecCoverage, auditSpecOve
|
|
|
15
17
|
export type { MpSpecStatus, MpSpecClass, MpOfficialSpec, SpecCoverageReport } from './mp-spec-coverage';
|
|
16
18
|
export { DEGRADATION_TABLE, MP_UNSUPPORTED_PROPS, degradeProp, degradationOf, auditDegradation, formatDegradationReport, checkPropDegradation, collectPropDiagnostics, RULE_REGISTERED_PROPS, HOST_FALLBACK_TAGS, PROP_NO_DEGRADATION, } from './degradation';
|
|
17
19
|
export type { DegradationEnd, DegradationTier, DegradationEntry, DegradationMap, DegradationIssue, DegradationReport, PropDiagnostic, } from './degradation';
|
|
20
|
+
export type { PKind, ResolvedLength, Edges, LayoutProps, PaintProps, TextProps, PaintHint, PProps, PFlags, PNode, PTree, DynamicBinding, UpdateKind, PDiagnostic, } from './pnode';
|
|
21
|
+
export { isOpaqueColor, isNeutralColor, rgbOfColor } from './color';
|
|
22
|
+
export { derivePaintHint } from './paint-hint';
|
|
23
|
+
export type { PaintHintInput } from './paint-hint';
|
|
24
|
+
export { resolveLength, parseStyleString, normalizeStyleDecls, normalizeStyleString, expandEdges, parseTransform, camel, splitTopLevel } from './pnode-style';
|
|
25
|
+
export type { LengthContext, NormalizeOptions, NormalizeResult } from './pnode-style';
|
|
26
|
+
export { analyzePTree, flattenRate, groupBindingsByNode } from './pnode-analyze';
|
|
27
|
+
export type { AnalyzeOptions, AnalyzeResult, NodeFacts } from './pnode-analyze';
|
|
28
|
+
export { buildPTree, buildPTreeFromComponentIR, rawFromComponentIR, kindFromSemantic, inferUpdateKind, inferOpCode } from './pnode-build';
|
|
29
|
+
export type { PRawNode, BuildOptions } from './pnode-build';
|
|
30
|
+
export { formatPTrace, formatPNodeLine, decisionOf, walkPTree } from './pnode-trace';
|
|
31
|
+
export type { PTraceOptions } from './pnode-trace';
|