@vmscloud/moz-ui-components-core 0.1.68 → 0.1.69
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/LICENSE-lucide.txt +43 -0
- package/dist/components/code-block/code-block.core.d.ts +39 -0
- package/dist/components/code-block/code-syntax.d.ts +24 -0
- package/dist/components/code-block/index.d.ts +13 -0
- package/dist/components/disclosure/disclosure.core.d.ts +37 -0
- package/dist/components/disclosure/index.d.ts +12 -0
- package/dist/components/gauge-display/gauge-display.core.d.ts +73 -0
- package/dist/components/gauge-display/index.d.ts +12 -0
- package/dist/components/icon/icon.core.d.ts +62 -0
- package/dist/components/icon/index.d.ts +10 -0
- package/dist/components/icon/lucide.generated.d.ts +869 -0
- package/dist/components/icon-button/icon-button.core.d.ts +50 -0
- package/dist/components/icon-button/index.d.ts +11 -0
- package/dist/components/link/index.d.ts +11 -0
- package/dist/components/link/link.core.d.ts +31 -0
- package/dist/components/metric-card/index.d.ts +11 -0
- package/dist/components/metric-card/metric-card.core.d.ts +36 -0
- package/dist/components/popup/index.d.ts +1 -0
- package/dist/components/popup/popup.core.d.ts +14 -0
- package/dist/components/spinner/index.d.ts +10 -0
- package/dist/components/spinner/spinner.core.d.ts +33 -0
- package/dist/index.cjs +1002 -928
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +4546 -3758
- package/dist/index.js.map +1 -1
- package/dist/locale/types.d.ts +18 -0
- package/dist/styles/default/codeblock.css +402 -0
- package/dist/styles/default/disclosure.css +360 -0
- package/dist/styles/default/gaugedisplay.css +370 -0
- package/dist/styles/default/iconbutton.css +371 -0
- package/dist/styles/default/index.css +376 -2
- package/dist/styles/default/link.css +332 -0
- package/dist/styles/default/metriccard.css +356 -0
- package/dist/styles/default/numberinput.css +1 -1
- package/dist/styles/default/popup.css +1 -1
- package/dist/styles/default/spinner.css +348 -0
- package/package.json +5 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lucide Icons and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
The following Lucide icons are derived from the Feather project:
|
|
20
|
+
|
|
21
|
+
airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
|
|
22
|
+
|
|
23
|
+
The MIT License (MIT) (for the icons listed above)
|
|
24
|
+
|
|
25
|
+
Copyright (c) 2013-present Cole Bemis
|
|
26
|
+
|
|
27
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
29
|
+
in the Software without restriction, including without limitation the rights
|
|
30
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
32
|
+
furnished to do so, subject to the following conditions:
|
|
33
|
+
|
|
34
|
+
The above copyright notice and this permission notice shall be included in all
|
|
35
|
+
copies or substantial portions of the Software.
|
|
36
|
+
|
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
38
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
39
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
40
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
41
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
42
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
43
|
+
SOFTWARE.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { MozLocaleMessages } from '../../locale/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CodeBlock 코어 — 읽기 전용 코드 원문과 복사(ITSM-2026-004955, SW `CodeBlock`·`code-syntax` 기준).
|
|
5
|
+
*
|
|
6
|
+
* - 표시와 복사 텍스트는 `code` 원문 그대로다(공백·개행·마크업 모양 문자열 포함). 텍스트로만 그린다.
|
|
7
|
+
* - SQL·Python·JS/TS·JSON·Bash(별칭 포함)·diff/patch 는 구문 색 조각을 입힌다. 빈 값·미지원 언어·
|
|
8
|
+
* 20,000자 또는 500줄 초과·`plain` 은 원문 한 조각이다.
|
|
9
|
+
* - `plain`(아직 흘러 들어오는 초안)으로 그렸다가 `plain` 을 풀면 같은 `pre` 에서 색이 `--moz-dur-tint`(200ms)에
|
|
10
|
+
* 걸쳐 입혀진다. 처음부터 색으로 그린 블록은 전이가 없다. 모션 줄이기에서는 전이를 끈다(CSS).
|
|
11
|
+
* - `pre` 는 포커스 가능(tabindex 0)해서 긴 줄을 키보드로 가로 스크롤한다.
|
|
12
|
+
* - 복사 단추는 공용 IconButton(`copy`, sm)이며 접근 이름은 로케일 `CodeBlock.copy`(`{label} 복사`)다.
|
|
13
|
+
* `copy=false` 면 그리지 않는다. 쓰기 성공·거부를 `role="status"` 문구로 각각 알리고 `copy` 이벤트로 결과를 올린다.
|
|
14
|
+
*/
|
|
15
|
+
export interface CodeBlockProps {
|
|
16
|
+
/** 코드 원문. 표시·복사 모두 이 문자열 그대로다. */
|
|
17
|
+
code?: string;
|
|
18
|
+
/** 언어 이름(sql·python·py·js·ts·json·bash·sh·diff·patch 등). 머리 줄에 표시하고 구문 색을 고른다. */
|
|
19
|
+
language?: string;
|
|
20
|
+
/** 머리 줄 이름(language 가 없을 때)이자 복사 단추 이름의 블록 이름. 생략하면 로케일 문구(코드). */
|
|
21
|
+
label?: string;
|
|
22
|
+
/** 단색 표시(흘러 들어오는 초안). 풀면 같은 pre 에서 색이 입혀진다. 기본 false. */
|
|
23
|
+
plain?: boolean;
|
|
24
|
+
/** 복사 단추 표시. 기본 true. false 면 단추를 두지 않는다(수락 전 초안). */
|
|
25
|
+
copy?: boolean;
|
|
26
|
+
/** 패스스루 — 루트 div 에 붙는다 */
|
|
27
|
+
class?: unknown;
|
|
28
|
+
style?: unknown;
|
|
29
|
+
[attr: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface CodeBlockEmits {
|
|
32
|
+
/** 클립보드 쓰기 결과 — 성공 true, 거부·실패 false */
|
|
33
|
+
copy: [boolean];
|
|
34
|
+
}
|
|
35
|
+
type CodeBlockMessages = NonNullable<MozLocaleMessages['CodeBlock']>;
|
|
36
|
+
/** 로케일 문구 — 사전에 `CodeBlock` 이 없으면 한국어 기본값. */
|
|
37
|
+
export declare function codeBlockMessages(locale?: Partial<MozLocaleMessages> | null): CodeBlockMessages;
|
|
38
|
+
export declare const createCodeBlock: import('../..').CoreFactory<CodeBlockProps, CodeBlockEmits, void>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 코드 블록 구문 색의 글자 나누기 (ITSM-2026-004955, SW `moz-sw/src/react/code-syntax.ts` 이관).
|
|
3
|
+
*
|
|
4
|
+
* 키워드·문자열·주석·숫자 네 가지와 diff 의 더한 줄·뺀 줄·구간 머리만 가른다. 모르는 언어는 나누지 않는다(색 없음).
|
|
5
|
+
* 코드 글 그대로를 쪼개므로 글자는 하나도 바뀌지 않는다(조각을 이으면 원문과 같다).
|
|
6
|
+
* 닫히지 않은 여러 줄 주석·문자열은 글 끝까지 한 조각이다(시간이 길이에 비례한다).
|
|
7
|
+
* 정규식 구분이라 문법을 정확히 읽지 못한다(중첩 템플릿·heredoc 등).
|
|
8
|
+
*/
|
|
9
|
+
export type CodeTokenKind = 'kw' | 'str' | 'com' | 'num' | 'add' | 'del' | 'hunk';
|
|
10
|
+
export interface CodeToken {
|
|
11
|
+
text: string;
|
|
12
|
+
kind?: CodeTokenKind;
|
|
13
|
+
}
|
|
14
|
+
/** 구문 색을 입히는 언어 이름(별칭 포함, diff·patch 제외). */
|
|
15
|
+
export declare const CODE_LANGUAGES: readonly string[];
|
|
16
|
+
/**
|
|
17
|
+
* 색을 입히는 상한. 넘는 코드는 색 없이 원문 한 조각으로 둔다 — 수천 줄 코드에 토큰 span 수만 개를 한 번에 올리지 않는다.
|
|
18
|
+
*/
|
|
19
|
+
export declare const CODE_SYNTAX_LIMIT: {
|
|
20
|
+
readonly chars: 20000;
|
|
21
|
+
readonly lines: 500;
|
|
22
|
+
};
|
|
23
|
+
/** 코드 글을 색 종류별 조각으로 나눈다. 조각을 이으면 원문과 정확히 같다. 모르는 언어·빈 글·상한 초과는 한 조각(색 없음)이다. */
|
|
24
|
+
export declare function tokenizeCode(code: string, name?: string): CodeToken[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MozSpec } from '../../runtime/types';
|
|
2
|
+
import { CodeBlockProps, CodeBlockEmits } from './code-block.core';
|
|
3
|
+
|
|
4
|
+
export { createCodeBlock, codeBlockMessages } from './code-block.core';
|
|
5
|
+
export type { CodeBlockProps, CodeBlockEmits } from './code-block.core';
|
|
6
|
+
export { tokenizeCode, CODE_LANGUAGES, CODE_SYNTAX_LIMIT } from './code-syntax';
|
|
7
|
+
export type { CodeToken, CodeTokenKind } from './code-syntax';
|
|
8
|
+
/**
|
|
9
|
+
* CODE_BLOCK_SPEC — 코드 원문 표시·구문 색·복사. React·Vue 는 공용 브릿지 1줄로 찍는다
|
|
10
|
+
* (같은 Core 인스턴스가 `plain` 해제 전후 같은 `pre` 를 유지한다).
|
|
11
|
+
* (스타일: `styles/default/codeblock.css` + `button.css` + `iconbutton.css` + `tooltip.css`, 또는 기본 테마 배럴 `styles/default`)
|
|
12
|
+
*/
|
|
13
|
+
export declare const CODE_BLOCK_SPEC: MozSpec<CodeBlockProps, CodeBlockEmits, void>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disclosure 코어 — 머리 줄 하나로 본문을 펼치고 접는 단일 호출 조합(ITSM-2026-004955, SW `Disclosure` 기준).
|
|
3
|
+
*
|
|
4
|
+
* Collapsible 의 상태 규약(제어 `open`·비제어 `defaultOpen`, 다음 값 알림, `aria-expanded`/`aria-controls`,
|
|
5
|
+
* forceMount 패널의 `hidden`)에 SW 기본값·표제 구성을 얹는다. React·Vue 래퍼는 Collapsible·CollapsibleTrigger 와
|
|
6
|
+
* Button 을 조립하고, 이 코어는 프레임워크 없이 같은 DOM 을 그리는 Core 단독 경로다.
|
|
7
|
+
*
|
|
8
|
+
* DOM: `section.moz-disclosure > button.moz-button.moz-disclosure__summary[aria-expanded]` 와
|
|
9
|
+
* 직계 본문 `div.moz-disclosure__body`. 머리 줄 안에는 `.moz-disclosure__marker`(장식)·`.moz-disclosure__title`·
|
|
10
|
+
* `.moz-disclosure__meta` 가 순서대로 온다.
|
|
11
|
+
* - 기본 닫힘. 닫혀도 본문 DOM 은 남고(`hidden`) 입력한 값이 유지된다 — Collapsible 기본(언마운트)과 다르다.
|
|
12
|
+
* - 클릭·Enter·Space(실제 button) 한 번에 다음 상태를 `update:open` 으로 한 번 알린다. 제어형은 부모가 `open`
|
|
13
|
+
* 을 바꿀 때만 표시가 바뀐다.
|
|
14
|
+
*/
|
|
15
|
+
export interface DisclosureProps {
|
|
16
|
+
/** 제어형 열림 상태. 주면 내부 상태 대신 이 값을 따른다. */
|
|
17
|
+
open?: boolean;
|
|
18
|
+
/** 비제어형 처음 열림 상태. 기본 false. */
|
|
19
|
+
defaultOpen?: boolean;
|
|
20
|
+
/** 머리 줄 제목(문자열). `title` slot 이 있으면 slot 이 우선한다. */
|
|
21
|
+
title?: string;
|
|
22
|
+
/** 머리 줄 끝의 짧은 보조 내용(개수·상태). `meta` slot 이 있으면 slot 이 우선한다. */
|
|
23
|
+
meta?: string;
|
|
24
|
+
/** 접힘 표시(▶/▼ 도형)를 그릴지. 기본 true. */
|
|
25
|
+
marker?: boolean;
|
|
26
|
+
/** 사용자 조작 비활성화(머리 줄 button disabled). */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** 패스스루 — 루트 section 에 붙는다 */
|
|
29
|
+
class?: unknown;
|
|
30
|
+
style?: unknown;
|
|
31
|
+
[attr: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
export interface DisclosureEmits {
|
|
34
|
+
/** 머리 줄 조작으로 바뀔 다음 열림 상태(제어형·비제어형 모두) */
|
|
35
|
+
'update:open': [boolean];
|
|
36
|
+
}
|
|
37
|
+
export declare const createDisclosure: import('../..').CoreFactory<DisclosureProps, DisclosureEmits, void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MozSpec } from '../../runtime/types';
|
|
2
|
+
import { DisclosureProps, DisclosureEmits } from './disclosure.core';
|
|
3
|
+
|
|
4
|
+
export { createDisclosure } from './disclosure.core';
|
|
5
|
+
export type { DisclosureProps, DisclosureEmits } from './disclosure.core';
|
|
6
|
+
/**
|
|
7
|
+
* DISCLOSURE_SPEC — Core 단독 소비자가 마운트하는 Disclosure 스펙(`title`·`meta`·`default` slot).
|
|
8
|
+
* React·Vue 는 같은 DOM 을 Collapsible·CollapsibleTrigger·Button 조립으로 그리는 전용 `Disclosure` 를 쓴다
|
|
9
|
+
* (제목·meta 노드와 본문이 소비자 트리 안에 남아 context 가 이어진다).
|
|
10
|
+
* (스타일: `styles/default/disclosure.css` + `button.css`, 또는 기본 테마 배럴 `styles/default`)
|
|
11
|
+
*/
|
|
12
|
+
export declare const DISCLOSURE_SPEC: MozSpec<DisclosureProps, DisclosureEmits, void>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GaugeDisplay 코어 — 소비자가 계산한 비율·경로·색으로 게이지를 그리는 표시 골격
|
|
3
|
+
* (ITSM-2026-004955, SW `GaugeDisplay` 기준). 차트 엔진을 쓰지 않는다.
|
|
4
|
+
*
|
|
5
|
+
* 비율·경곗값·등급·호 경로·숫자 형식은 소비자가 정해 입력으로 넘긴다. 이 코어는 그대로 그린다.
|
|
6
|
+
* DOM: `div.moz-gauge-display[data-gauge-shape][data-gauge-level] > label + div[data-gauge-body] + 하단`.
|
|
7
|
+
* - linear: 값 strong + 이름 있는 `<progress max=1>`(비율 0~1 로 자른다) + 범위 small.
|
|
8
|
+
* - semicircle·circle: `role="img"`·이름 있는 SVG. 트랙 경로 위에 비율이 0 보다 클 때만 채움 경로를 그린다.
|
|
9
|
+
* 가운데 값·단위, 선택 min/max 레이블. min 레이블이 없고 range 가 있으면 SVG 아래 범위 small.
|
|
10
|
+
* - `status`(조회 중·실패·대기 문구)가 있으면 본문은 `span[role=status]` 하나뿐이며 수치·게이지를 함께 그리지 않는다.
|
|
11
|
+
* - footer 는 상태와 무관하게 루트의 직계 자식으로 유지된다(소비자 `> small` 같은 배치 훅).
|
|
12
|
+
*/
|
|
13
|
+
export type GaugeShape = 'linear' | 'semicircle' | 'circle';
|
|
14
|
+
export declare const GAUGE_SHAPES: readonly ["linear", "semicircle", "circle"];
|
|
15
|
+
export interface GaugeDisplayProps {
|
|
16
|
+
/** 제목. `title` slot 이 우선한다. */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** 소비자가 형식화한 값 문자열(접근 이름·가운데 표시). */
|
|
19
|
+
value?: string;
|
|
20
|
+
/** 값 뒤 단위. */
|
|
21
|
+
unit?: string;
|
|
22
|
+
/** 범위 문구(예: `0 – 100`). `range` slot 이 우선한다. */
|
|
23
|
+
range?: string;
|
|
24
|
+
/** 원형 계열 왼쪽 아래 최솟값 레이블. 생략하면 그리지 않는다. */
|
|
25
|
+
minLabel?: string;
|
|
26
|
+
/** 원형 계열 오른쪽 아래 최댓값 레이블. 생략하면 그리지 않는다. */
|
|
27
|
+
maxLabel?: string;
|
|
28
|
+
/** 하단 문자열. `footer` slot 이 우선한다. */
|
|
29
|
+
footer?: string;
|
|
30
|
+
/** 조회 중·실패·대기 같은 상태 문구. 있으면 본문은 이 상태 하나만 그린다. `status` slot 이 우선한다. */
|
|
31
|
+
status?: string;
|
|
32
|
+
/** 모양. 기본 semicircle. */
|
|
33
|
+
shape?: GaugeShape;
|
|
34
|
+
/** 소비자 등급(`data-gauge-level`) — 스타일 훅이다. */
|
|
35
|
+
level?: string;
|
|
36
|
+
/** 채움 색(CSS 색·var()). 등급별 색은 소비자가 고른다. */
|
|
37
|
+
color?: string;
|
|
38
|
+
/** 채움 비율 0~1. 범위를 벗어나면 0·1 로 자른다. */
|
|
39
|
+
ratio?: number;
|
|
40
|
+
/** 원형 계열 트랙 경로 d(200×200 또는 200×128 좌표계). */
|
|
41
|
+
trackPath?: string;
|
|
42
|
+
/** 원형 계열 채움 경로 d. */
|
|
43
|
+
fillPath?: string;
|
|
44
|
+
/** 트랙 색. 기본 `var(--moz-color-border)`. */
|
|
45
|
+
trackColor?: string;
|
|
46
|
+
/** 패스스루 — 루트 div 에 붙는다 */
|
|
47
|
+
class?: unknown;
|
|
48
|
+
style?: unknown;
|
|
49
|
+
[attr: string]: unknown;
|
|
50
|
+
}
|
|
51
|
+
export interface GaugeDisplayEmits {
|
|
52
|
+
}
|
|
53
|
+
/** 0~1 로 자른 비율. 숫자가 아니면 0. */
|
|
54
|
+
export declare function gaugeRatio(ratio: unknown): number;
|
|
55
|
+
/** 알 수 없는 모양은 semicircle. */
|
|
56
|
+
export declare function gaugeShape(shape: unknown): GaugeShape;
|
|
57
|
+
/**
|
|
58
|
+
* 원형 계열 SVG 기하 — React·Vue 래퍼도 같은 값을 쓴다(SW 좌표 그대로).
|
|
59
|
+
* circle 은 200×200, semicircle 은 200×128 좌표계다.
|
|
60
|
+
*/
|
|
61
|
+
export declare function gaugeGeometry(shape: GaugeShape): {
|
|
62
|
+
readonly viewBox: "0 0 200 200" | "0 0 200 128";
|
|
63
|
+
readonly valueY: 110 | 88;
|
|
64
|
+
readonly minX: 22 | 40;
|
|
65
|
+
readonly maxX: 160 | 178;
|
|
66
|
+
readonly labelY: 180 | 124;
|
|
67
|
+
readonly strokeWidth: 16;
|
|
68
|
+
};
|
|
69
|
+
/** 가운데 값 글자 크기(px) — 값·단위 길이에 맞춰 12~30 사이로 줄인다(SW 식). */
|
|
70
|
+
export declare function gaugeValueFontSize(value: string, unit?: unknown): number;
|
|
71
|
+
/** 원형 SVG 의 접근 이름 — `제목: 값단위`(문자열 제목·단위만). */
|
|
72
|
+
export declare function gaugeLabel(title: unknown, value: string, unit?: unknown): string;
|
|
73
|
+
export declare const createGaugeDisplay: import('../..').CoreFactory<GaugeDisplayProps, GaugeDisplayEmits, void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MozSpec } from '../../runtime/types';
|
|
2
|
+
import { GaugeDisplayProps, GaugeDisplayEmits } from './gauge-display.core';
|
|
3
|
+
|
|
4
|
+
export { createGaugeDisplay, gaugeRatio, gaugeShape, gaugeGeometry, gaugeValueFontSize, gaugeLabel, GAUGE_SHAPES, } from './gauge-display.core';
|
|
5
|
+
export type { GaugeDisplayProps, GaugeDisplayEmits, GaugeShape } from './gauge-display.core';
|
|
6
|
+
/**
|
|
7
|
+
* GAUGE_DISPLAY_SPEC — Core 단독 소비자가 마운트하는 GaugeDisplay 스펙(`title`·`range`·`status`·`footer` slot).
|
|
8
|
+
* React(노드 props)·Vue(이름 slot)는 같은 DOM·기하(`gaugeGeometry`)를 직접 그리는 전용 `GaugeDisplay` 를 쓴다 —
|
|
9
|
+
* 본문(`[data-gauge-body]`)·하단이 루트 직계 자식이어야 하는 소비자 배치 훅을 지키기 위해서다.
|
|
10
|
+
* (스타일: `styles/default/gaugedisplay.css`, 또는 기본 테마 배럴 `styles/default`)
|
|
11
|
+
*/
|
|
12
|
+
export declare const GAUGE_DISPLAY_SPEC: MozSpec<GaugeDisplayProps, GaugeDisplayEmits, void>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { nothing, TemplateResult } from 'lit-html';
|
|
2
|
+
import { LUCIDE_ICONS, LUCIDE_VERSION, IconNode } from './lucide.generated';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 공용 아이콘 — Lucide 선 아이콘 88종(ITSM-2026-004955). 데이터는 `lucide.generated.ts` 하나가 정본이며
|
|
6
|
+
* Core(lit)·React·Vue 가 같은 도형·속성 순서를 그대로 그린다. 고지는 패키지 루트 `LICENSE-lucide.txt`.
|
|
7
|
+
*
|
|
8
|
+
* 모양은 24 격자 선 아이콘, 색은 `currentColor` 다. 기본 16px·획 1.5 이며 호출처가 바꾼다.
|
|
9
|
+
* `title` 이 없으면 장식(aria-hidden·포커스 제외), 있으면 `role="img"` 와 접근 이름을 가진다.
|
|
10
|
+
* 등록되지 않은 이름(빈 문자열·상속 키 포함)은 SVG 를 그리지 않는다.
|
|
11
|
+
*/
|
|
12
|
+
export type { IconNode };
|
|
13
|
+
export type IconName = keyof typeof LUCIDE_ICONS;
|
|
14
|
+
export declare const ICONS: Readonly<Record<IconName, IconNode>>;
|
|
15
|
+
/** 공개 이름 전체(이름순). 문서·선택 UI 가 목록을 직접 만들지 않게 한다. */
|
|
16
|
+
export declare const ICON_NAMES: readonly IconName[];
|
|
17
|
+
export { LUCIDE_VERSION };
|
|
18
|
+
/** 기본 크기(px)·획. React·Vue 래퍼도 이 값을 쓴다. */
|
|
19
|
+
export declare const ICON_DEFAULT_SIZE = 16;
|
|
20
|
+
export declare const ICON_DEFAULT_STROKE_WIDTH = 1.5;
|
|
21
|
+
/** 아이콘 이름이 공용 목록에 있는지. 자체 키만 인정한다(`toString`·`__proto__` 같은 상속 키는 false). */
|
|
22
|
+
export declare function hasIcon(name: unknown): name is IconName;
|
|
23
|
+
/** 의미 있는 title 인지 — 공백만 있으면 장식으로 본다. */
|
|
24
|
+
export declare function iconTitle(title: unknown): string | undefined;
|
|
25
|
+
export interface IconSvgOptions {
|
|
26
|
+
/** 표시 크기(px). 기본 16. */
|
|
27
|
+
size?: number;
|
|
28
|
+
/** 선 굵기(24 격자 기준). 기본 1.5. */
|
|
29
|
+
strokeWidth?: number;
|
|
30
|
+
class?: string;
|
|
31
|
+
/** 루트 svg 인라인 스타일(문자열 또는 객체). */
|
|
32
|
+
style?: unknown;
|
|
33
|
+
/** 있으면 `role="img"`·접근 이름을 가진다. 없으면 장식(aria-hidden)이다. */
|
|
34
|
+
title?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 루트 `<svg>` 속성 — 순서까지 Core·React·Vue 가 같게 그린다(React 는 같은 이름을 JSX 표기로 옮긴다).
|
|
38
|
+
* 접근 의미 속성은 title 유무로 갈린다.
|
|
39
|
+
*/
|
|
40
|
+
export declare function iconRootAttributes({ size, strokeWidth, title }?: IconSvgOptions): Record<string, string>;
|
|
41
|
+
/**
|
|
42
|
+
* lit 템플릿용 `<svg>`. 등록되지 않은 이름은 `nothing` 이다.
|
|
43
|
+
* `rest` 는 루트 svg 로 패스스루할 추가 속성(data-* 등)이다.
|
|
44
|
+
*/
|
|
45
|
+
export declare function iconSvg(name: IconName, options?: IconSvgOptions, rest?: Record<string, unknown>): TemplateResult | typeof nothing;
|
|
46
|
+
export interface IconProps {
|
|
47
|
+
/** 공용 아이콘 이름(kebab-case, 대소문자 구분). 목록에 없으면 아무것도 그리지 않는다. */
|
|
48
|
+
name: IconName;
|
|
49
|
+
/** 표시 크기(px). 기본 16. */
|
|
50
|
+
size?: number;
|
|
51
|
+
/** 선 굵기(24 격자 기준). 기본 1.5. */
|
|
52
|
+
strokeWidth?: number;
|
|
53
|
+
/** 있으면 `role="img"`·접근 이름을 가진다. 없으면 장식(aria-hidden·포커스 제외)이다. */
|
|
54
|
+
title?: string;
|
|
55
|
+
/** 패스스루 (Vue $attrs / React className·rest) */
|
|
56
|
+
class?: unknown;
|
|
57
|
+
style?: unknown;
|
|
58
|
+
[attr: string]: unknown;
|
|
59
|
+
}
|
|
60
|
+
export interface IconEmits {
|
|
61
|
+
}
|
|
62
|
+
export declare const createIcon: import('../..').CoreFactory<IconProps, IconEmits, void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MozSpec } from '../../runtime/types';
|
|
2
|
+
import { IconProps, IconEmits } from './icon.core';
|
|
3
|
+
|
|
4
|
+
export { createIcon, iconSvg, iconRootAttributes, iconTitle, hasIcon, ICONS, ICON_NAMES, ICON_DEFAULT_SIZE, ICON_DEFAULT_STROKE_WIDTH, LUCIDE_VERSION, } from './icon.core';
|
|
5
|
+
export type { IconProps, IconEmits, IconName, IconNode, IconSvgOptions } from './icon.core';
|
|
6
|
+
/**
|
|
7
|
+
* ICON_SPEC — Core 단독 소비자가 마운트하는 공용 아이콘 스펙.
|
|
8
|
+
* React·Vue 는 브릿지 호스트 없이 `<svg>` 를 직접 그리는 전용 `Icon` 을 쓴다(같은 ICONS·속성 순서).
|
|
9
|
+
*/
|
|
10
|
+
export declare const ICON_SPEC: MozSpec<IconProps, IconEmits>;
|