@algotao/uiscope 0.0.0-stage → 0.1.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/.agents/plugins/marketplace.json +21 -0
- package/.cursor-plugin/plugin.json +8 -0
- package/LICENSE +21 -0
- package/README.md +255 -2
- package/README.zh-CN.md +256 -0
- package/bin/uiscope.js +8 -0
- package/package.json +89 -3
- package/plugin.json +17 -0
- package/presets/README.md +11 -0
- package/presets/ocpui/index.ts +107 -0
- package/skills/README.md +7 -0
- package/skills/uiscope-ux-optimize/SKILL.md +267 -0
- package/skills/uiscope-ux-optimize/scripts/uiscope.mjs +40 -0
- package/src/__tests__/cli-parity.spec.ts +59 -0
- package/src/__tests__/cli-read.spec.ts +141 -0
- package/src/__tests__/component-tree.spec.ts +72 -0
- package/src/__tests__/enhance-core-ux.spec.ts +72 -0
- package/src/__tests__/enhance-feedback-states.spec.ts +104 -0
- package/src/__tests__/facet-analyze.spec.ts +55 -0
- package/src/__tests__/fixtures/exmarket-integration.config.ts +19 -0
- package/src/__tests__/format-scan-stats.spec.ts +32 -0
- package/src/__tests__/install-skill.spec.ts +41 -0
- package/src/__tests__/merge-cli-config.spec.ts +56 -0
- package/src/__tests__/react-tree.spec.ts +29 -0
- package/src/__tests__/read-scan-report-boundaries.spec.ts +139 -0
- package/src/__tests__/read-scan-report.spec.ts +91 -0
- package/src/__tests__/resolve-enhancements.spec.ts +21 -0
- package/src/__tests__/resolve-presets.spec.ts +51 -0
- package/src/__tests__/resolve-scan-scope.spec.ts +28 -0
- package/src/__tests__/run-scan-ux.spec.ts +51 -0
- package/src/__tests__/scan-progress.spec.ts +52 -0
- package/src/__tests__/style-path.spec.ts +11 -0
- package/src/__tests__/style-rules.spec.ts +25 -0
- package/src/__tests__/template-hints.spec.ts +19 -0
- package/src/__tests__/wrapper-roles.spec.ts +31 -0
- package/src/adapters/react/collect-react-files.ts +17 -0
- package/src/adapters/react/component-tree.tsx.ts +79 -0
- package/src/adapters/react/index.ts +3 -0
- package/src/adapters/react/parse-jsx-imports.ts +38 -0
- package/src/adapters/vue/index.ts +4 -0
- package/src/cli/brand.ts +35 -0
- package/src/cli/install-skill.ts +90 -0
- package/src/cli/main.ts +578 -0
- package/src/cli/merge-cli-config.ts +86 -0
- package/src/config/defaults.ts +65 -0
- package/src/config/frameworks.ts +20 -0
- package/src/config/load-config.ts +81 -0
- package/src/config/normalize-legacy-config.ts +39 -0
- package/src/config/preset-types.ts +16 -0
- package/src/config/resolve-preset-library-roots.ts +49 -0
- package/src/config/resolve-presets.ts +142 -0
- package/src/config/resolve-scan-scope.ts +12 -0
- package/src/config/resolve-thresholds.ts +12 -0
- package/src/enhance/dir-utils.ts +25 -0
- package/src/enhance/registry.ts +107 -0
- package/src/enhance/resolve-enhancements.ts +56 -0
- package/src/enhance/rules/action-semantics.ts +60 -0
- package/src/enhance/rules/core-ux.ts +139 -0
- package/src/enhance/rules/facet-hygiene.ts +44 -0
- package/src/enhance/rules/feedback-states.ts +39 -0
- package/src/enhance/rules/form-a11y.ts +62 -0
- package/src/enhance/rules/hollow-shell.ts +39 -0
- package/src/enhance/rules/i18n-hints.ts +29 -0
- package/src/enhance/rules/list-templating.ts +38 -0
- package/src/enhance/rules/page-rollup.ts +82 -0
- package/src/enhance/tree-walk.ts +29 -0
- package/src/enhance/types.ts +48 -0
- package/src/enhance/ux-rule-pack.ts +40 -0
- package/src/enhance/workbench-defaults.ts +28 -0
- package/src/index.ts +80 -0
- package/src/manifest/consumer-wrapper-roles.ts +34 -0
- package/src/manifest/library-components.ts +46 -0
- package/src/manifest/library-style-classes.ts +31 -0
- package/src/manifest/library-style-whitelist.ts +82 -0
- package/src/manifest/library-ux-taxonomy.ts +103 -0
- package/src/paths/monorepo-root.ts +13 -0
- package/src/report/facet-output-limits.ts +56 -0
- package/src/report/format-scan-stats.ts +18 -0
- package/src/report/format-ux-scan-report.ts +59 -0
- package/src/report/markdown-report.ts +108 -0
- package/src/report/print-facets.ts +129 -0
- package/src/report/print-styles.ts +20 -0
- package/src/report/print-tree.ts +70 -0
- package/src/report/print-ux-findings.ts +53 -0
- package/src/report/read-scan-report.ts +201 -0
- package/src/report/run-report-scenarios.ts +139 -0
- package/src/run-scan.ts +341 -0
- package/src/scan/collect-source-files.ts +36 -0
- package/src/scan/component-tree.ts +155 -0
- package/src/scan/extract-node-attrs.ts +49 -0
- package/src/scan/facet-analyze.ts +318 -0
- package/src/scan/file-uses-library.ts +37 -0
- package/src/scan/library-meta.ts +71 -0
- package/src/scan/parse-imports.ts +88 -0
- package/src/scan/scan-progress.ts +89 -0
- package/src/scan/style-path.ts +26 -0
- package/src/scan/style-rules.ts +127 -0
- package/src/scan/style-trace.ts +181 -0
- package/src/scan/template-hints.ts +70 -0
- package/src/types.ts +274 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FacetKind } from '../types.js';
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_WORKBENCH_EXPECTATIONS: Array<{
|
|
4
|
+
pathIncludes: string;
|
|
5
|
+
requireFacetKinds: FacetKind[];
|
|
6
|
+
label: string;
|
|
7
|
+
}> = [
|
|
8
|
+
{
|
|
9
|
+
pathIncludes: 'components/event',
|
|
10
|
+
requireFacetKinds: ['filter-bar', 'list-region'],
|
|
11
|
+
label: 'Event 工作台',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
pathIncludes: 'components/exmarket',
|
|
15
|
+
requireFacetKinds: ['filter-bar', 'list-region'],
|
|
16
|
+
label: '扩展市场工作台',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
pathIncludes: 'components/product',
|
|
20
|
+
requireFacetKinds: ['filter-bar', 'list-region'],
|
|
21
|
+
label: 'Product 工作台',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
pathIncludes: 'contamination',
|
|
25
|
+
requireFacetKinds: ['filter-bar', 'list-region'],
|
|
26
|
+
label: 'Contamination 公示',
|
|
27
|
+
},
|
|
28
|
+
];
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
ComponentTreeNode,
|
|
3
|
+
FileComponentReport,
|
|
4
|
+
UiscopeConfig,
|
|
5
|
+
ScanResult,
|
|
6
|
+
ScanScenarioResult,
|
|
7
|
+
StyleOverrideHit,
|
|
8
|
+
StyleReloadChain,
|
|
9
|
+
StyleRuleRef,
|
|
10
|
+
StyleUsageAnchor,
|
|
11
|
+
FileFacetReport,
|
|
12
|
+
FacetRegion,
|
|
13
|
+
FacetScanConfig,
|
|
14
|
+
UxFinding,
|
|
15
|
+
UxEnhancementId,
|
|
16
|
+
UxEnhancementOptionalId,
|
|
17
|
+
UiscopeEnhanceConfig,
|
|
18
|
+
} from './types.js';
|
|
19
|
+
export { DEFAULT_FACET_CONFIG, analyzeFileFacets } from './scan/facet-analyze.js';
|
|
20
|
+
export { formatFacetReportMarkdown, formatFacetSummary } from './report/print-facets.js';
|
|
21
|
+
export {
|
|
22
|
+
LAYOUT_CLASS_HINTS,
|
|
23
|
+
uxRoleForComponent,
|
|
24
|
+
} from './manifest/library-ux-taxonomy.js';
|
|
25
|
+
export { buildUxRoleResolver, BUILTIN_WRAPPER_ROLES } from './manifest/consumer-wrapper-roles.js';
|
|
26
|
+
export { DEFAULT_UX_RULE_PACK, type UxRulePack, resolveUxRulePack } from './enhance/ux-rule-pack.js';
|
|
27
|
+
export { DEFAULT_WORKBENCH_EXPECTATIONS } from './enhance/workbench-defaults.js';
|
|
28
|
+
export { DEFAULT_CONFIG, loadScanConfig, mergeConfig, resolveRoots } from './config/load-config.js';
|
|
29
|
+
export { resolveOnlyLibraryConsumers } from './config/resolve-scan-scope.js';
|
|
30
|
+
export {
|
|
31
|
+
DEFAULT_THRESHOLDS,
|
|
32
|
+
DEFAULT_FACET_THRESHOLDS,
|
|
33
|
+
DEFAULT_STYLE_THRESHOLDS,
|
|
34
|
+
LIB_STYLE_STRICT,
|
|
35
|
+
CONSUMER_STYLE_WITH_SKIN,
|
|
36
|
+
mergeThresholds,
|
|
37
|
+
} from './config/defaults.js';
|
|
38
|
+
export { resolveThresholds } from './config/resolve-thresholds.js';
|
|
39
|
+
export {
|
|
40
|
+
getLibraryStyleClassManifest,
|
|
41
|
+
matchLibraryClassesInSelector,
|
|
42
|
+
rebuildLibraryStyleClassManifest,
|
|
43
|
+
} from './manifest/library-style-classes.js';
|
|
44
|
+
export type { UiscopePreset } from './config/preset-types.js';
|
|
45
|
+
export type { UiscopeFramework } from './types.js';
|
|
46
|
+
export { resolveFrameworks, DEFAULT_FRAMEWORKS } from './config/frameworks.js';
|
|
47
|
+
export { applyPresets, resolvePreset } from './config/resolve-presets.js';
|
|
48
|
+
export { LIBRARY_STYLE_WHITELIST_CORE, whitelistByClass, whitelistClassNames } from './manifest/library-style-whitelist.js';
|
|
49
|
+
export { discoverLibraryComponentNames } from './manifest/library-components.js';
|
|
50
|
+
export { runScan, type ScanMode, type ScanOptions } from './run-scan.js';
|
|
51
|
+
export { ENHANCEMENT_REGISTRY, OPTIONAL_ENHANCEMENT_IDS } from './enhance/registry.js';
|
|
52
|
+
export { formatUxFindings, formatUxFindingsMarkdown } from './report/print-ux-findings.js';
|
|
53
|
+
export { formatAllTrees, formatTreeNodeLines } from './report/print-tree.js';
|
|
54
|
+
export { formatStyleHits } from './report/print-styles.js';
|
|
55
|
+
export { formatUxScanReport } from './report/format-ux-scan-report.js';
|
|
56
|
+
export { renderMarkdownReport } from './report/markdown-report.js';
|
|
57
|
+
export {
|
|
58
|
+
countTextReportLines,
|
|
59
|
+
getScanReportCounts,
|
|
60
|
+
getScanReportCountsFromFile,
|
|
61
|
+
isScanResultPayload,
|
|
62
|
+
readScanReportJsonFile,
|
|
63
|
+
readScanReportSectionFromFile,
|
|
64
|
+
readTextReportLines,
|
|
65
|
+
readTextReportLinesSync,
|
|
66
|
+
sliceScanReportSection,
|
|
67
|
+
type ScanReportArraySection,
|
|
68
|
+
type ScanReportCounts,
|
|
69
|
+
type ScanReportSlice,
|
|
70
|
+
type ScanReportSliceRange,
|
|
71
|
+
type TextReportLineRange,
|
|
72
|
+
type TextReportSlice,
|
|
73
|
+
} from './report/read-scan-report.js';
|
|
74
|
+
export {
|
|
75
|
+
createTerminalProgressReporter,
|
|
76
|
+
emitScanProgress,
|
|
77
|
+
type ScanPhase,
|
|
78
|
+
type ScanProgressEvent,
|
|
79
|
+
type ScanProgressHandler,
|
|
80
|
+
} from './scan/scan-progress.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { UiscopeConfig } from '../types.js';
|
|
2
|
+
import { uxRoleForComponent, type UxComponentRole } from './library-ux-taxonomy.js';
|
|
3
|
+
|
|
4
|
+
export const BUILTIN_WRAPPER_ROLES: Record<string, UxComponentRole> = {
|
|
5
|
+
SiteButton: 'form-control',
|
|
6
|
+
SiteButtonLink: 'form-control',
|
|
7
|
+
FlowWorkbenchFilter: 'filter',
|
|
8
|
+
SiteEmpty: 'feedback',
|
|
9
|
+
SitePanel: 'container',
|
|
10
|
+
PageContainer: 'container',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type UxRoleKind = 'library' | 'local' | 'html' | 'unknown';
|
|
14
|
+
|
|
15
|
+
export type UxRoleFn = (name: string, kind: UxRoleKind) => UxComponentRole | undefined;
|
|
16
|
+
|
|
17
|
+
export function buildUxRoleResolver(config: UiscopeConfig): UxRoleFn {
|
|
18
|
+
const overrides = config.enhancements?.wrapperRoles ?? {};
|
|
19
|
+
const tags = new Set(config.consumerWrapperTags ?? []);
|
|
20
|
+
|
|
21
|
+
return (name: string, kind: UxRoleKind) => {
|
|
22
|
+
const mapped = overrides[name] ?? BUILTIN_WRAPPER_ROLES[name];
|
|
23
|
+
if (mapped && (kind === 'unknown' || kind === 'local' || tags.has(name))) return mapped;
|
|
24
|
+
|
|
25
|
+
if (kind === 'unknown' || kind === 'local') {
|
|
26
|
+
if (/Empty(State)?$/i.test(name)) return 'feedback';
|
|
27
|
+
if (/Filter/i.test(name)) return 'filter';
|
|
28
|
+
if (/Button/i.test(name)) return 'form-control';
|
|
29
|
+
if (tags.has(name) && mapped) return mapped;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return uxRoleForComponent(name, kind);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
const HTML_TAGS = new Set([
|
|
5
|
+
'a', 'abbr', 'address', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote',
|
|
6
|
+
'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data',
|
|
7
|
+
'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed',
|
|
8
|
+
'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
|
|
9
|
+
'head', 'header', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'label',
|
|
10
|
+
'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'meta', 'meter', 'nav', 'noscript',
|
|
11
|
+
'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress',
|
|
12
|
+
'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'slot', 'small', 'source', 'span',
|
|
13
|
+
'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template', 'textarea',
|
|
14
|
+
'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 从设计库源码目录发现组件 PascalCase 名(不含业务语义)
|
|
19
|
+
*/
|
|
20
|
+
export function discoverLibraryComponentNames(vueComponentsRoot: string): string[] {
|
|
21
|
+
if (!fs.existsSync(vueComponentsRoot)) return [];
|
|
22
|
+
const names: string[] = [];
|
|
23
|
+
const walk = (dir: string) => {
|
|
24
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
25
|
+
const full = path.join(dir, entry.name);
|
|
26
|
+
if (entry.isDirectory()) walk(full);
|
|
27
|
+
else if (entry.name.endsWith('.vue')) {
|
|
28
|
+
names.push(entry.name.replace(/\.vue$/, ''));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
walk(vueComponentsRoot);
|
|
33
|
+
return [...new Set(names)].sort();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function isHtmlTag(tag: string): boolean {
|
|
37
|
+
return HTML_TAGS.has(tag.toLowerCase());
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function tagToPascal(tag: string): string {
|
|
41
|
+
if (!tag.includes('-')) return tag;
|
|
42
|
+
return tag
|
|
43
|
+
.split('-')
|
|
44
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
45
|
+
.join('');
|
|
46
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 扫描用类名匹配表:与 library-style-whitelist 同步(public + internal)
|
|
3
|
+
*/
|
|
4
|
+
import { getActiveStyleWhitelist } from './library-style-whitelist.js';
|
|
5
|
+
|
|
6
|
+
let LIBRARY_STYLE_CLASS_MANIFEST: string[] = [];
|
|
7
|
+
|
|
8
|
+
export function rebuildLibraryStyleClassManifest(): void {
|
|
9
|
+
LIBRARY_STYLE_CLASS_MANIFEST = getActiveStyleWhitelist().map((e) => e.className);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
rebuildLibraryStyleClassManifest();
|
|
13
|
+
|
|
14
|
+
export function getLibraryStyleClassManifest(): readonly string[] {
|
|
15
|
+
return LIBRARY_STYLE_CLASS_MANIFEST;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const manifestSet = () => new Set(LIBRARY_STYLE_CLASS_MANIFEST);
|
|
19
|
+
|
|
20
|
+
export function isLibraryStyleClass(token: string): boolean {
|
|
21
|
+
return manifestSet().has(token);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function matchLibraryClassesInSelector(selector: string): string[] {
|
|
25
|
+
const found = new Set<string>();
|
|
26
|
+
for (const cls of LIBRARY_STYLE_CLASS_MANIFEST) {
|
|
27
|
+
const re = new RegExp(`\\.${cls}(?![\\w-])`);
|
|
28
|
+
if (re.test(selector)) found.add(cls);
|
|
29
|
+
}
|
|
30
|
+
return [...found];
|
|
31
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type LibraryStyleSurface = 'public' | 'internal';
|
|
2
|
+
|
|
3
|
+
export type LibraryStyleCategory =
|
|
4
|
+
| 'button'
|
|
5
|
+
| 'empty'
|
|
6
|
+
| 'form'
|
|
7
|
+
| 'navigation'
|
|
8
|
+
| 'feedback'
|
|
9
|
+
| 'layout'
|
|
10
|
+
| 'data-display'
|
|
11
|
+
| 'theme-token';
|
|
12
|
+
|
|
13
|
+
export interface LibraryStyleWhitelistEntry {
|
|
14
|
+
className: string;
|
|
15
|
+
category: LibraryStyleCategory;
|
|
16
|
+
surface: LibraryStyleSurface;
|
|
17
|
+
/** 主要承载组件(PascalCase) */
|
|
18
|
+
owner: string;
|
|
19
|
+
note: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const GENERIC_STYLE_WHITELIST: readonly LibraryStyleWhitelistEntry[] = [
|
|
23
|
+
{ className: 'btn', category: 'button', surface: 'public', owner: 'Button', note: '按钮根类;经 customClass 或 DOM 暴露' },
|
|
24
|
+
{ className: 'btn-primary', category: 'button', surface: 'public', owner: 'Button', note: 'variant=primary' },
|
|
25
|
+
{ className: 'btn-secondary', category: 'button', surface: 'public', owner: 'Button', note: 'variant=secondary' },
|
|
26
|
+
{ className: 'btn-text', category: 'button', surface: 'public', owner: 'Button', note: 'variant=text' },
|
|
27
|
+
{ className: 'btn-ghost', category: 'button', surface: 'public', owner: 'Button', note: 'variant=ghost' },
|
|
28
|
+
{ className: 'btn-danger', category: 'button', surface: 'public', owner: 'Button', note: 'variant=danger' },
|
|
29
|
+
{ className: 'btn-success', category: 'button', surface: 'public', owner: 'Button', note: 'variant=success' },
|
|
30
|
+
{ className: 'btn-sm', category: 'button', surface: 'public', owner: 'Button', note: 'size=sm' },
|
|
31
|
+
{ className: 'btn-lg', category: 'button', surface: 'public', owner: 'Button', note: 'size=lg' },
|
|
32
|
+
{ className: 'btn-full-width', category: 'button', surface: 'public', owner: 'Button', note: 'fullWidth' },
|
|
33
|
+
{ className: 'btn--loading', category: 'button', surface: 'internal', owner: 'Button', note: '提交中态' },
|
|
34
|
+
{ className: 'btn-content', category: 'button', surface: 'internal', owner: 'Button', note: '内容槽包裹' },
|
|
35
|
+
{ className: 'btn-arrow', category: 'button', surface: 'internal', owner: 'Button', note: '箭头装饰' },
|
|
36
|
+
{ className: 'tool-button', category: 'button', surface: 'public', owner: 'Button', note: 'variant=icon' },
|
|
37
|
+
{ className: 'tool-button-sm', category: 'button', surface: 'public', owner: 'Button', note: 'icon sm' },
|
|
38
|
+
{ className: 'tool-button-lg', category: 'button', surface: 'public', owner: 'Button', note: 'icon lg' },
|
|
39
|
+
{ className: 'empty', category: 'empty', surface: 'public', owner: 'Empty', note: '空态根' },
|
|
40
|
+
{ className: 'empty-sm', category: 'empty', surface: 'public', owner: 'Empty', note: 'size=sm' },
|
|
41
|
+
{ className: 'empty-lg', category: 'empty', surface: 'public', owner: 'Empty', note: 'size=lg' },
|
|
42
|
+
{ className: 'empty-footer', category: 'empty', surface: 'public', owner: 'Empty', note: 'footer 槽容器' },
|
|
43
|
+
{ className: 'empty-title', category: 'empty', surface: 'public', owner: 'Empty', note: '标题' },
|
|
44
|
+
{ className: 'empty-description', category: 'empty', surface: 'public', owner: 'Empty', note: '描述' },
|
|
45
|
+
{ className: 'empty-icon', category: 'empty', surface: 'public', owner: 'Empty', note: '图标区' },
|
|
46
|
+
{ className: 'empty-content', category: 'empty', surface: 'public', owner: 'Empty', note: '默认内容槽' },
|
|
47
|
+
{ className: 'empty-default-icon', category: 'empty', surface: 'internal', owner: 'Empty', note: '内置 SVG' },
|
|
48
|
+
{ className: 'empty__inner', category: 'empty', surface: 'internal', owner: 'Empty', note: '内层布局' },
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
let runtimeWhitelist: LibraryStyleWhitelistEntry[] = [...GENERIC_STYLE_WHITELIST];
|
|
52
|
+
|
|
53
|
+
export function registerStyleWhitelist(entries: readonly LibraryStyleWhitelistEntry[]): void {
|
|
54
|
+
const known = new Set(runtimeWhitelist.map((e) => e.className));
|
|
55
|
+
for (const e of entries) {
|
|
56
|
+
if (!known.has(e.className)) {
|
|
57
|
+
runtimeWhitelist.push(e);
|
|
58
|
+
known.add(e.className);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function resetStyleWhitelistForTests(): void {
|
|
64
|
+
runtimeWhitelist = [...GENERIC_STYLE_WHITELIST];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** 当前生效白名单(generic + preset) */
|
|
68
|
+
export const LIBRARY_STYLE_WHITELIST_CORE: readonly LibraryStyleWhitelistEntry[] = GENERIC_STYLE_WHITELIST;
|
|
69
|
+
|
|
70
|
+
export function getActiveStyleWhitelist(): readonly LibraryStyleWhitelistEntry[] {
|
|
71
|
+
return runtimeWhitelist;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function whitelistClassNames(surface?: LibraryStyleSurface): string[] {
|
|
75
|
+
const base = getActiveStyleWhitelist();
|
|
76
|
+
const list = surface ? base.filter((e) => e.surface === surface) : base;
|
|
77
|
+
return list.map((e) => e.className);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function whitelistByClass(className: string): LibraryStyleWhitelistEntry | undefined {
|
|
81
|
+
return getActiveStyleWhitelist().find((e) => e.className === className);
|
|
82
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export type UxComponentRole =
|
|
2
|
+
| 'container'
|
|
3
|
+
| 'filter'
|
|
4
|
+
| 'list'
|
|
5
|
+
| 'form-control'
|
|
6
|
+
| 'text'
|
|
7
|
+
| 'media'
|
|
8
|
+
| 'navigation'
|
|
9
|
+
| 'feedback'
|
|
10
|
+
| 'display';
|
|
11
|
+
|
|
12
|
+
const BASE_ROLE_MAP: Record<string, UxComponentRole> = {
|
|
13
|
+
Button: 'form-control',
|
|
14
|
+
Input: 'filter',
|
|
15
|
+
Select: 'filter',
|
|
16
|
+
Search: 'filter',
|
|
17
|
+
Textarea: 'form-control',
|
|
18
|
+
Empty: 'feedback',
|
|
19
|
+
Modal: 'container',
|
|
20
|
+
Table: 'list',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
let presetRoleMap: Record<string, UxComponentRole> = {};
|
|
24
|
+
|
|
25
|
+
export function registerComponentRoles(map: Record<string, UxComponentRole>): void {
|
|
26
|
+
presetRoleMap = { ...presetRoleMap, ...map };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function resetComponentRolesForTests(): void {
|
|
30
|
+
presetRoleMap = {};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const HTML_ROLE: Record<string, UxComponentRole> = {
|
|
34
|
+
form: 'container',
|
|
35
|
+
fieldset: 'container',
|
|
36
|
+
section: 'container',
|
|
37
|
+
article: 'container',
|
|
38
|
+
aside: 'container',
|
|
39
|
+
nav: 'navigation',
|
|
40
|
+
ul: 'list',
|
|
41
|
+
ol: 'list',
|
|
42
|
+
li: 'list',
|
|
43
|
+
table: 'list',
|
|
44
|
+
img: 'media',
|
|
45
|
+
picture: 'media',
|
|
46
|
+
video: 'media',
|
|
47
|
+
input: 'form-control',
|
|
48
|
+
textarea: 'form-control',
|
|
49
|
+
select: 'form-control',
|
|
50
|
+
button: 'form-control',
|
|
51
|
+
p: 'text',
|
|
52
|
+
span: 'text',
|
|
53
|
+
h1: 'text',
|
|
54
|
+
h2: 'text',
|
|
55
|
+
h3: 'text',
|
|
56
|
+
h4: 'text',
|
|
57
|
+
h5: 'text',
|
|
58
|
+
h6: 'text',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
function roleMap(): Record<string, UxComponentRole> {
|
|
62
|
+
return { ...BASE_ROLE_MAP, ...presetRoleMap };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function uxRoleForComponent(name: string, kind: 'library' | 'local' | 'html' | 'unknown'): UxComponentRole | undefined {
|
|
66
|
+
if (kind === 'html') return HTML_ROLE[name.toLowerCase()];
|
|
67
|
+
return roleMap()[name];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** 布局/语义 class 关键词(用于切面类型推断,非业务 class) */
|
|
71
|
+
export const LAYOUT_CLASS_HINTS = {
|
|
72
|
+
grid: ['grid', 'mosaic', 'auto-fill', 'minmax', 'grid-template', 'columns'],
|
|
73
|
+
list: ['list', 'index', 'compact', 'stack', 'rail', 'timeline', 'table', 'rows'],
|
|
74
|
+
filter: ['filter', 'facet', 'toolbar', 'wb-filter', 'search', 'seg', 'track'],
|
|
75
|
+
mixed: ['card', 'media', 'figure', 'shot', 'thumb', 'hero', 'banner'],
|
|
76
|
+
form: ['form', 'field', 'input-line'],
|
|
77
|
+
} as const;
|
|
78
|
+
|
|
79
|
+
export type LayoutHint = keyof typeof LAYOUT_CLASS_HINTS;
|
|
80
|
+
|
|
81
|
+
export function layoutHintsFromClass(classValue: string | undefined): LayoutHint[] {
|
|
82
|
+
if (!classValue) return [];
|
|
83
|
+
const lower = classValue.toLowerCase();
|
|
84
|
+
const tokens = lower.split(/[\s:]+/);
|
|
85
|
+
const hits = new Set<LayoutHint>();
|
|
86
|
+
for (const hint of Object.keys(LAYOUT_CLASS_HINTS) as LayoutHint[]) {
|
|
87
|
+
const keys = LAYOUT_CLASS_HINTS[hint];
|
|
88
|
+
if (keys.some((k) => lower.includes(k) || tokens.some((t) => t.includes(k)))) {
|
|
89
|
+
hits.add(hint);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return [...hits];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function classKeywordFingerprint(classValue: string | undefined): string[] {
|
|
96
|
+
if (!classValue) return [];
|
|
97
|
+
return classValue
|
|
98
|
+
.toLowerCase()
|
|
99
|
+
.split(/[\s:]+/)
|
|
100
|
+
.filter((t) => t.length > 1)
|
|
101
|
+
.sort()
|
|
102
|
+
.slice(0, 12);
|
|
103
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
export function findMonorepoRoot(fromDir: string): string {
|
|
5
|
+
let dir = path.resolve(fromDir);
|
|
6
|
+
for (let depth = 0; depth < 12; depth++) {
|
|
7
|
+
if (fs.existsSync(path.join(dir, 'pnpm-workspace.yaml'))) return dir;
|
|
8
|
+
const parent = path.dirname(dir);
|
|
9
|
+
if (parent === dir) break;
|
|
10
|
+
dir = parent;
|
|
11
|
+
}
|
|
12
|
+
return path.resolve(fromDir);
|
|
13
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** 终端 `formatFacetSummary` 默认展示文件数 */
|
|
2
|
+
export const DEFAULT_FACET_SUMMARY_FILE_LIMIT = 12;
|
|
3
|
+
|
|
4
|
+
/** Markdown 切面章节默认展示文件数 */
|
|
5
|
+
export const DEFAULT_FACET_MARKDOWN_FILE_LIMIT = 15;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 解析切面文件展示上限。
|
|
9
|
+
* - `0`:不截断
|
|
10
|
+
* - `undefined`:使用 `defaultLimit`
|
|
11
|
+
* - 正整数:该条数
|
|
12
|
+
*/
|
|
13
|
+
export function resolveFacetFileLimit(
|
|
14
|
+
limit: number | undefined,
|
|
15
|
+
defaultLimit: number,
|
|
16
|
+
): number | null {
|
|
17
|
+
if (limit === 0) return null;
|
|
18
|
+
if (limit == null) return defaultLimit;
|
|
19
|
+
return Math.max(1, Math.floor(limit));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function formatFacetTruncationGuide(options: {
|
|
23
|
+
channel: 'terminal' | 'markdown';
|
|
24
|
+
shown: number;
|
|
25
|
+
total: number;
|
|
26
|
+
/** 如「默认 12」「--facet-limit 20」 */
|
|
27
|
+
limitLabel: string;
|
|
28
|
+
}): string[] {
|
|
29
|
+
const rest = options.total - options.shown;
|
|
30
|
+
if (rest <= 0) return [];
|
|
31
|
+
|
|
32
|
+
const head =
|
|
33
|
+
options.channel === 'terminal'
|
|
34
|
+
? `[uiscope:facet] 已展示 ${options.shown}/${options.total} 个含切面文件(${options.limitLabel}),另有 ${rest} 个未列出。`
|
|
35
|
+
: `**切面列表截断**:已展示 **${options.shown}/${options.total}** 个文件(${options.limitLabel}),另有 **${rest}** 个未写入下文。`;
|
|
36
|
+
|
|
37
|
+
const lines: string[] = ['', head, '', '如何全量或调整展示条数:'];
|
|
38
|
+
|
|
39
|
+
if (options.channel === 'terminal') {
|
|
40
|
+
lines.push(
|
|
41
|
+
' · 全量 JSON:uiscope facets [--root <dir>] --json > .local/uiscope-facet.json',
|
|
42
|
+
' · 终端全量:uiscope facets --facet-limit 0',
|
|
43
|
+
' · 指定条数:uiscope facets --facet-limit <n>',
|
|
44
|
+
' · Markdown 全量:uiscope facets --facet-limit 0 --out .local/uiscope-facet-report.md',
|
|
45
|
+
);
|
|
46
|
+
} else {
|
|
47
|
+
lines.push(
|
|
48
|
+
'- 全量 Markdown:`uiscope facets --facet-limit 0 --out .local/uiscope-facet-report.md`',
|
|
49
|
+
'- 维护报告全量:`uiscope report --facet-limit 0 --out <path>`',
|
|
50
|
+
'- 指定条数:`uiscope report --facet-limit <n> --out <path>`',
|
|
51
|
+
'- 机器可读:`uiscope facets --json`',
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return lines;
|
|
56
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ScanResult } from '../types.js';
|
|
2
|
+
|
|
3
|
+
/** 终端一行汇总:与 Markdown「汇总」、JSON `stats` 对齐,避免只看到截断的发现列表 */
|
|
4
|
+
export function formatScanStatsBanner(
|
|
5
|
+
result: Pick<ScanResult, 'stats' | 'facetReports' | 'uxFindings' | 'warnings' | 'trees'>,
|
|
6
|
+
): string {
|
|
7
|
+
const facetFiles = result.facetReports.filter((r) => r.facetCount > 0).length;
|
|
8
|
+
const issueFiles = new Set(result.uxFindings.map((f) => f.file)).size;
|
|
9
|
+
const uxWarnInWarnings = result.warnings.filter((w) => w.includes('[uiscope:ux]')).length;
|
|
10
|
+
|
|
11
|
+
return [
|
|
12
|
+
`[uiscope] 汇总 — Vue ${result.stats.vueFilesScanned}(设计库消费 ${result.stats.vueFilesLibraryConsumers})· React ${result.stats.reactFilesScanned}(${result.stats.reactFilesLibraryConsumers})`,
|
|
13
|
+
`切面区域 ${result.stats.facetRegions}(${facetFiles} 个文件含切面)`,
|
|
14
|
+
`UX 发现 ${result.stats.uxFindings}(${issueFiles} 个文件)`,
|
|
15
|
+
`解析树 ${result.trees.length} 份`,
|
|
16
|
+
`warnings ${result.warnings.length}(UX warn ${uxWarnInWarnings})`,
|
|
17
|
+
].join(' · ');
|
|
18
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ScanResult } from '../types.js';
|
|
2
|
+
import { ENHANCEMENT_REGISTRY } from '../enhance/registry.js';
|
|
3
|
+
import { formatFacetReportMarkdown } from './print-facets.js';
|
|
4
|
+
import { formatUxFindingsMarkdown } from './print-ux-findings.js';
|
|
5
|
+
|
|
6
|
+
export interface UxScanReportMeta {
|
|
7
|
+
generatedAt: string;
|
|
8
|
+
cwd: string;
|
|
9
|
+
roots: string[];
|
|
10
|
+
enhancementsRequested: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function formatUxScanReport(result: ScanResult, meta: UxScanReportMeta): string {
|
|
14
|
+
const lines: string[] = [
|
|
15
|
+
'# UIScope UX 扫描报告',
|
|
16
|
+
'',
|
|
17
|
+
`- 生成时间:${meta.generatedAt}`,
|
|
18
|
+
`- 工作目录:\`${meta.cwd}\``,
|
|
19
|
+
`- 扫描根:${meta.roots.length ? meta.roots.map((r) => `\`${r}\``).join(', ') : '(配置默认)'}`,
|
|
20
|
+
`- 增强项:${meta.enhancementsRequested}`,
|
|
21
|
+
`- 已执行:${result.enhancementsRun.join(', ') || '无'}`,
|
|
22
|
+
'',
|
|
23
|
+
'## 汇总',
|
|
24
|
+
'',
|
|
25
|
+
`- Vue 文件:**${result.stats.vueFilesScanned}**(设计库消费 **${result.stats.vueFilesLibraryConsumers}**)`,
|
|
26
|
+
`- 切面区域:**${result.stats.facetRegions}**`,
|
|
27
|
+
`- UX 发现:**${result.stats.uxFindings}**(warn 同步于 warnings:${result.warnings.filter((w) => w.includes('[uiscope:ux]')).length})`,
|
|
28
|
+
'',
|
|
29
|
+
'### 增强模块说明',
|
|
30
|
+
'',
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
for (const id of result.enhancementsRun) {
|
|
34
|
+
const def = ENHANCEMENT_REGISTRY.find((e) => e.id === id);
|
|
35
|
+
if (def) lines.push(`- **${id}**:${def.description}`);
|
|
36
|
+
}
|
|
37
|
+
lines.push('');
|
|
38
|
+
|
|
39
|
+
lines.push(formatFacetReportMarkdown('切面明细(全量)', result.facetReports, result.stats, { maxFiles: 0 }));
|
|
40
|
+
lines.push('');
|
|
41
|
+
lines.push(formatUxFindingsMarkdown(result.uxFindings));
|
|
42
|
+
|
|
43
|
+
if (result.warnings.length) {
|
|
44
|
+
lines.push('', '## 告警(含样式/切面/UX warn)', '');
|
|
45
|
+
for (const w of result.warnings) lines.push(`- ${w}`);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
lines.push(
|
|
49
|
+
'',
|
|
50
|
+
'## 如何复现',
|
|
51
|
+
'',
|
|
52
|
+
'```bash',
|
|
53
|
+
`cd ${meta.cwd.replace(/\\/g, '/')}`,
|
|
54
|
+
`uiscope ux --enhance-all --out <path-to-this-report.md>`,
|
|
55
|
+
'```',
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
return lines.join('\n');
|
|
59
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { MarkdownReportInput, ScanScenarioResult } from '../types.js';
|
|
2
|
+
import { LIBRARY_STYLE_WHITELIST_CORE } from '../manifest/library-style-whitelist.js';
|
|
3
|
+
import { formatTreeNodeLines } from './print-tree.js';
|
|
4
|
+
import { formatFacetMarkdownBlocks } from './print-facets.js';
|
|
5
|
+
|
|
6
|
+
export function renderMarkdownReport(input: MarkdownReportInput): string {
|
|
7
|
+
const lines: string[] = [
|
|
8
|
+
'# UIScope 扫描维护报告',
|
|
9
|
+
'',
|
|
10
|
+
`- 生成时间:${input.generatedAt}`,
|
|
11
|
+
`- 工作目录:\`${input.cwd}\``,
|
|
12
|
+
'',
|
|
13
|
+
'## 1. 内置样式白名单(组件开放样式面)',
|
|
14
|
+
'',
|
|
15
|
+
'以下为 `@algotao/uiscope` 维护态清单:`surface=public` 可供消费方合法引用/叠写;`internal` 仅组件内部。',
|
|
16
|
+
'',
|
|
17
|
+
'| 类名 | 分类 | 开放面 | 承载组件 | 说明 |',
|
|
18
|
+
'| --- | --- | --- | --- | --- |',
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
for (const e of LIBRARY_STYLE_WHITELIST_CORE) {
|
|
22
|
+
lines.push(
|
|
23
|
+
`| \`.${e.className}\` | ${e.category} | ${e.surface} | ${e.owner} | ${e.note} |`,
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
lines.push('', '## 2. 扫描场景对比', '');
|
|
28
|
+
for (const scenario of input.scenarios) {
|
|
29
|
+
lines.push(`### 场景:${scenario.label} (\`${scenario.id}\`)`, '');
|
|
30
|
+
lines.push('参数:', '```json', JSON.stringify(scenario.options, null, 2), '```', '');
|
|
31
|
+
appendScenarioStats(lines, scenario);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
lines.push('', '## 3. 分场景明细', '');
|
|
35
|
+
for (const scenario of input.scenarios) {
|
|
36
|
+
lines.push(`### ${scenario.id} — 样式重载与溯源链`, '');
|
|
37
|
+
const topChains = scenario.result.styleChains.filter((c) => c.overrideCount > 0).slice(0, 15);
|
|
38
|
+
if (!topChains.length) {
|
|
39
|
+
lines.push('_无消费方重载规则命中白名单类。_', '');
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
for (const chain of topChains) {
|
|
43
|
+
lines.push(
|
|
44
|
+
`#### \`.${chain.className}\`(${chain.owner ?? '-'} / ${chain.surface ?? '-'}) — ${chain.overrideCount} 条规则`,
|
|
45
|
+
'',
|
|
46
|
+
);
|
|
47
|
+
for (const step of chain.chain) lines.push(step);
|
|
48
|
+
lines.push('');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
lines.push(`### ${scenario.id} — 组件树(设计库消费文件)`, '');
|
|
52
|
+
const treeFiles = scenario.result.trees.slice(0, 20);
|
|
53
|
+
for (const file of treeFiles) {
|
|
54
|
+
lines.push(`#### \`${rel(file.file)}\``, '');
|
|
55
|
+
if (file.fileDoc) {
|
|
56
|
+
lines.push('<details><summary>文件头注释</summary>', '', '```', file.fileDoc.slice(0, 800), '```', '</details>', '');
|
|
57
|
+
}
|
|
58
|
+
for (const line of formatTreeNodeLines(file.tree, 0)) lines.push(line);
|
|
59
|
+
lines.push('');
|
|
60
|
+
}
|
|
61
|
+
if (scenario.result.trees.length > 20) {
|
|
62
|
+
lines.push(`_… 另有 ${scenario.result.trees.length - 20} 个文件未展开_`, '');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
lines.push(`### ${scenario.id} — UI/UX 切面`, '');
|
|
66
|
+
lines.push(
|
|
67
|
+
'切面:用户可浏览/交互的面;含筛选条、列表区、栅格、表单、图文混排等。模板化率由同级结构签名与 class 关键词重叠推断。',
|
|
68
|
+
'',
|
|
69
|
+
);
|
|
70
|
+
lines.push(
|
|
71
|
+
...formatFacetMarkdownBlocks(scenario.result.facetReports, {
|
|
72
|
+
maxFiles: input.facetFileLimit,
|
|
73
|
+
fileRel: (f) => rel(f),
|
|
74
|
+
}).map((l) => (l.startsWith('### ') ? `#### ${l.slice(4)}` : l)),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
lines.push('', '## 4. 告警汇总', '');
|
|
79
|
+
for (const scenario of input.scenarios) {
|
|
80
|
+
lines.push(`### ${scenario.id}`, '');
|
|
81
|
+
if (!scenario.result.warnings.length) {
|
|
82
|
+
lines.push('_无告警_', '');
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
for (const w of scenario.result.warnings) lines.push(`- ${w}`);
|
|
86
|
+
lines.push('');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return lines.join('\n');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function appendScenarioStats(lines: string[], scenario: ScanScenarioResult) {
|
|
93
|
+
const r = scenario.result;
|
|
94
|
+
lines.push(
|
|
95
|
+
`- Vue 扫描数:**${r.stats.vueFilesScanned}**(设计库消费方 **${r.stats.vueFilesLibraryConsumers}**)`,
|
|
96
|
+
`- CSS 文件数:**${r.stats.cssFilesScanned}**`,
|
|
97
|
+
`- 组件树条目:**${r.trees.length}**`,
|
|
98
|
+
`- 样式重载类命中:**${r.styleOverrides.length}**(超阈告警 **${r.warnings.filter((w) => w.includes('样式类')).length}**)`,
|
|
99
|
+
`- 溯源链:**${r.styleChains.length}**`,
|
|
100
|
+
`- 切面区域:**${r.stats.facetRegions ?? 0}**(文件 **${r.facetReports.filter((f) => f.facetCount > 0).length}**)`,
|
|
101
|
+
`- 告警总数:**${r.warnings.length}**`,
|
|
102
|
+
'',
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function rel(file: string): string {
|
|
107
|
+
return file.replace(/\\/g, '/');
|
|
108
|
+
}
|