- Ship an AI guide in the package (ai/: usage rules, component catalog, design rules, composition patterns) via package.json files. - Add examples A-D that import only public exports: default header, viewer header, feature header, and a consumer-side search extension that reuses SWHeaderInput and the public SW tokens. - Add SW-only checks: docs/API consistency, tarball consumer project (React 19 + TS + Vite typecheck/build) and a browser check (27/27). - No runtime source or public API change; README gains a pointer section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
2.0 KiB
TypeScript
53 lines
2.0 KiB
TypeScript
// Sample host data for the examples. Every type comes from the public package API.
|
|
import {
|
|
swHeaderLinePatterns,
|
|
type SWHeaderColorOption, type SWHeaderDimensionStyleOption, type SWHeaderDocument, type SWHeaderLayer,
|
|
type SWHeaderLineType, type SWHeaderLineWeight, type SWHeaderTextStyleOption,
|
|
} from "@hm-design/sw"
|
|
|
|
export const documents: SWHeaderDocument[] = [
|
|
{ id: "doc-1", name: "C0020101-006-평면및종단면도(06)" },
|
|
{ id: "doc-2", name: "C0020101-007-횡단면도(07)" },
|
|
]
|
|
|
|
export const layers: SWHeaderLayer[] = [
|
|
{ id: "0", name: "0", color: "#ffffff" },
|
|
{ id: "center", name: "CENTER", color: "#ff0000" },
|
|
{ id: "hidden", name: "HIDDEN", color: "#ffe500", visible: false },
|
|
{ id: "dim", name: "DIM", color: "#00ff00", locked: true },
|
|
]
|
|
|
|
export const colors: SWHeaderColorOption[] = [
|
|
{ id: "white", color: "#ffffff", label: "흰색" },
|
|
{ id: "red", color: "#ff0000", label: "빨강" },
|
|
{ id: "green", color: "#00ff00", label: "초록" },
|
|
{ id: "yellow", color: "#ffff00", label: "노랑" },
|
|
{ id: "blue", color: "#0000ff", label: "파랑" },
|
|
{ id: "magenta", color: "#ff00ff", label: "자홍" },
|
|
{ id: "cyan", color: "#00ffff", label: "청록" },
|
|
]
|
|
|
|
export const lineTypes: SWHeaderLineType[] = [
|
|
{ id: "bylayer", name: "ByLayer" },
|
|
{ id: "continuous", name: "Continuous" },
|
|
{ id: "center", name: "CENTER", pattern: swHeaderLinePatterns.center },
|
|
{ id: "hidden", name: "HIDDEN", pattern: swHeaderLinePatterns.hidden },
|
|
]
|
|
|
|
export const lineWeights: SWHeaderLineWeight[] = [
|
|
{ id: "bylayer", name: "ByLayer" },
|
|
{ id: "byblock", name: "ByBlock" },
|
|
{ id: "default", name: "ByDefault", value: "0.25" },
|
|
{ id: "user", name: "User", value: "0.50", editable: true },
|
|
]
|
|
|
|
export const textStyles: SWHeaderTextStyleOption[] = [
|
|
{ id: "standard", name: "Standard", font: "Arial" },
|
|
{ id: "dotum", name: "Dotum", font: "돋움" },
|
|
]
|
|
|
|
export const dimensionStyles: SWHeaderDimensionStyleOption[] = [
|
|
{ id: "standard", name: "Standard" },
|
|
{ id: "iso", name: "ISO-25" },
|
|
]
|