@designbasekorea/ui-wc 0.8.13 → 0.9.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 +46 -0
- package/LICENSE-PAYMENT-LOGOS.md +437 -0
- package/README.md +51 -3
- package/dist/esm/components/db-achievement-list.d.ts +31 -0
- package/dist/esm/components/db-achievement-list.js +1 -0
- package/dist/esm/components/db-achievement-modal.d.ts +38 -0
- package/dist/esm/components/db-achievement-modal.js +1 -0
- package/dist/esm/components/db-ai-chain-of-thought.d.ts +14 -0
- package/dist/esm/components/db-ai-chain-of-thought.js +1 -0
- package/dist/esm/components/db-ai-chat.js +1 -1
- package/dist/esm/components/db-ai-checkpoint.d.ts +14 -0
- package/dist/esm/components/db-ai-checkpoint.js +1 -0
- package/dist/esm/components/db-ai-confirmation.d.ts +14 -0
- package/dist/esm/components/db-ai-confirmation.js +1 -0
- package/dist/esm/components/db-ai-context.d.ts +15 -0
- package/dist/esm/components/db-ai-context.js +1 -0
- package/dist/esm/components/db-ai-conversation.d.ts +21 -0
- package/dist/esm/components/db-ai-conversation.js +1 -0
- package/dist/esm/components/db-ai-execution-quote.d.ts +41 -0
- package/dist/esm/components/db-ai-execution-quote.js +1 -0
- package/dist/esm/components/db-ai-file-tree.d.ts +14 -0
- package/dist/esm/components/db-ai-file-tree.js +1 -0
- package/dist/esm/components/db-ai-glow.d.ts +1 -1
- package/dist/esm/components/db-ai-inline-citation.d.ts +16 -0
- package/dist/esm/components/db-ai-inline-citation.js +1 -0
- package/dist/esm/components/db-ai-message.d.ts +19 -0
- package/dist/esm/components/db-ai-message.js +1 -0
- package/dist/esm/components/db-ai-model-select.d.ts +36 -0
- package/dist/esm/components/db-ai-model-select.js +1 -0
- package/dist/esm/components/db-ai-plan.d.ts +14 -0
- package/dist/esm/components/db-ai-plan.js +1 -0
- package/dist/esm/components/db-ai-queue.d.ts +14 -0
- package/dist/esm/components/db-ai-queue.js +1 -0
- package/dist/esm/components/db-ai-reasoning.d.ts +14 -0
- package/dist/esm/components/db-ai-reasoning.js +1 -0
- package/dist/esm/components/db-ai-sources.d.ts +14 -0
- package/dist/esm/components/db-ai-sources.js +1 -0
- package/dist/esm/components/db-ai-stack-trace.d.ts +14 -0
- package/dist/esm/components/db-ai-stack-trace.js +1 -0
- package/dist/esm/components/db-ai-subagent.d.ts +14 -0
- package/dist/esm/components/db-ai-subagent.js +1 -0
- package/dist/esm/components/db-ai-task-status.d.ts +26 -0
- package/dist/esm/components/db-ai-task-status.js +1 -0
- package/dist/esm/components/db-ai-task.d.ts +14 -0
- package/dist/esm/components/db-ai-task.js +1 -0
- package/dist/esm/components/db-ai-terminal.d.ts +14 -0
- package/dist/esm/components/db-ai-terminal.js +1 -0
- package/dist/esm/components/db-ai-test-results.d.ts +14 -0
- package/dist/esm/components/db-ai-test-results.js +1 -0
- package/dist/esm/components/db-ai-tool.d.ts +14 -0
- package/dist/esm/components/db-ai-tool.js +1 -0
- package/dist/esm/components/db-attachment-list.d.ts +38 -0
- package/dist/esm/components/db-attachment-list.js +1 -0
- package/dist/esm/components/db-bento-card.d.ts +55 -0
- package/dist/esm/components/db-bento-card.js +1 -0
- package/dist/esm/components/db-bento-grid.d.ts +25 -0
- package/dist/esm/components/db-bento-grid.js +1 -0
- package/dist/esm/components/db-boarding-pass-stack.d.ts +49 -0
- package/dist/esm/components/db-boarding-pass-stack.js +1 -0
- package/dist/esm/components/db-boarding-pass.d.ts +32 -0
- package/dist/esm/components/db-boarding-pass.js +1 -0
- package/dist/esm/components/db-border-beam.d.ts +52 -0
- package/dist/esm/components/db-border-beam.js +1 -0
- package/dist/esm/components/db-button.d.ts +1 -1
- package/dist/esm/components/db-button.js +1 -1
- package/dist/esm/components/db-chat-composer.d.ts +2 -0
- package/dist/esm/components/db-chat-composer.js +1 -1
- package/dist/esm/components/db-chat-message.d.ts +1 -1
- package/dist/esm/components/db-chat-orb.d.ts +1 -1
- package/dist/esm/components/db-chat-widget.d.ts +1 -1
- package/dist/esm/components/db-color-picker.d.ts +1 -0
- package/dist/esm/components/db-color-picker.js +1 -1
- package/dist/esm/components/db-confetti.d.ts +90 -0
- package/dist/esm/components/db-confetti.js +1 -0
- package/dist/esm/components/db-context-bar.d.ts +13 -0
- package/dist/esm/components/db-context-bar.js +1 -0
- package/dist/esm/components/db-credit-balance.d.ts +17 -0
- package/dist/esm/components/db-credit-balance.js +1 -0
- package/dist/esm/components/db-credit-card.d.ts +51 -0
- package/dist/esm/components/db-credit-card.js +1 -0
- package/dist/esm/components/db-credit-dropdown.d.ts +31 -0
- package/dist/esm/components/db-credit-dropdown.js +1 -0
- package/dist/esm/components/db-credit-history.d.ts +31 -0
- package/dist/esm/components/db-credit-history.js +1 -0
- package/dist/esm/components/db-credit-recharge-modal.d.ts +35 -0
- package/dist/esm/components/db-credit-recharge-modal.js +1 -0
- package/dist/esm/components/db-credit-recharge.d.ts +39 -0
- package/dist/esm/components/db-credit-recharge.js +1 -0
- package/dist/esm/components/db-design-canvas.d.ts +137 -0
- package/dist/esm/components/db-design-canvas.js +1 -0
- package/dist/esm/components/db-design-toolbar.d.ts +60 -0
- package/dist/esm/components/db-design-toolbar.js +1 -0
- package/dist/esm/components/db-device-mockup.d.ts +100 -0
- package/dist/esm/components/db-device-mockup.js +1 -0
- package/dist/esm/components/db-download-progress.d.ts +1 -1
- package/dist/esm/components/db-drawer.js +1 -1
- package/dist/esm/components/db-dropdown.d.ts +2 -0
- package/dist/esm/components/db-dropdown.js +1 -1
- package/dist/esm/components/db-email-verify.d.ts +1 -1
- package/dist/esm/components/db-file-uploader.d.ts +10 -0
- package/dist/esm/components/db-filter-bar.d.ts +34 -0
- package/dist/esm/components/db-filter-bar.js +1 -0
- package/dist/esm/components/db-flight-status.d.ts +33 -0
- package/dist/esm/components/db-flight-status.js +1 -0
- package/dist/esm/components/db-floating-action-button.d.ts +24 -14
- package/dist/esm/components/db-floating-action-button.js +1 -1
- package/dist/esm/components/db-footer.d.ts +3 -0
- package/dist/esm/components/db-footer.js +1 -1
- package/dist/esm/components/db-glyph-matrix.d.ts +58 -0
- package/dist/esm/components/db-glyph-matrix.js +1 -0
- package/dist/esm/components/db-icons.d.ts +1 -1
- package/dist/esm/components/db-icons.js +1 -1
- package/dist/esm/components/db-menu-item.d.ts +2 -0
- package/dist/esm/components/db-menu-item.js +1 -1
- package/dist/esm/components/db-modal.d.ts +1 -1
- package/dist/esm/components/db-modal.js +1 -1
- package/dist/esm/components/db-navbar.d.ts +3 -1
- package/dist/esm/components/db-navbar.js +1 -1
- package/dist/esm/components/db-navigation-rail.d.ts +1 -1
- package/dist/esm/components/db-node.d.ts +83 -0
- package/dist/esm/components/db-node.js +1 -0
- package/dist/esm/components/db-notification-dropdown.d.ts +30 -0
- package/dist/esm/components/db-notification-dropdown.js +1 -0
- package/dist/esm/components/db-notification-inbox.d.ts +25 -0
- package/dist/esm/components/db-notification-inbox.js +1 -0
- package/dist/esm/components/db-otp-input.d.ts +1 -1
- package/dist/esm/components/db-phone-verify.d.ts +1 -1
- package/dist/esm/components/db-plan-overview.d.ts +26 -0
- package/dist/esm/components/db-plan-overview.js +1 -0
- package/dist/esm/components/db-popover.js +1 -1
- package/dist/esm/components/db-progressive-blur.d.ts +35 -0
- package/dist/esm/components/db-progressive-blur.js +1 -0
- package/dist/esm/components/db-receipt.d.ts +37 -0
- package/dist/esm/components/db-receipt.js +1 -0
- package/dist/esm/components/db-search-bar.js +1 -1
- package/dist/esm/components/db-segment-control.js +1 -1
- package/dist/esm/components/db-select.js +1 -1
- package/dist/esm/components/db-sidebar.d.ts +14 -1
- package/dist/esm/components/db-sidebar.js +1 -1
- package/dist/esm/components/db-split-view.d.ts +2 -0
- package/dist/esm/components/db-split-view.js +1 -1
- package/dist/esm/components/db-textarea.js +1 -1
- package/dist/esm/components/db-ticket.d.ts +18 -0
- package/dist/esm/components/db-ticket.js +1 -0
- package/dist/esm/components/db-time-picker.d.ts +1 -1
- package/dist/esm/components/db-tool-button.d.ts +57 -0
- package/dist/esm/components/db-tool-button.js +1 -0
- package/dist/esm/components/db-tweet-card.d.ts +101 -0
- package/dist/esm/components/db-tweet-card.js +1 -0
- package/dist/esm/components/db-two-factor.d.ts +1 -1
- package/dist/esm/components/db-voice-control.d.ts +25 -0
- package/dist/esm/components/db-voice-control.js +1 -0
- package/dist/esm/components/db-workspace-invite-modal.d.ts +51 -0
- package/dist/esm/components/db-workspace-invite-modal.js +1 -0
- package/dist/esm/components/db-workspace-members.d.ts +36 -0
- package/dist/esm/components/db-workspace-members.js +1 -0
- package/dist/esm/components/device-mockup-style.js +1 -0
- package/dist/esm/components/flight-route.js +1 -0
- package/dist/esm/components/node-style.js +1 -0
- package/dist/esm/components/paper-card.d.ts +26 -0
- package/dist/esm/components/paper-card.js +1 -0
- package/dist/esm/components/random-gradient-palettes.d.ts +4 -0
- package/dist/esm/core/ai-element.d.ts +47 -0
- package/dist/esm/core/ai-element.js +1 -0
- package/dist/esm/core/credit-ui.js +1 -0
- package/dist/esm/core/i18n.d.ts +153 -0
- package/dist/esm/core/i18n.js +1 -1
- package/dist/esm/core/notification-ui.d.ts +17 -0
- package/dist/esm/core/notification-ui.js +1 -0
- package/dist/esm/helpers/payment-brands.d.ts +56 -0
- package/dist/esm/helpers/payment-brands.js +1 -0
- package/dist/esm/helpers/toast.d.ts +2 -3
- package/dist/esm/index.d.ts +62 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@designbasekorea/ui-contracts/dist/components.js +1 -1
- package/dist/esm/ui-contracts/dist/components.d.d.ts +76 -0
- package/dist/esm/ui-contracts/dist/primitives.d.d.ts +21 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2149 -23
- package/dist/index.esm.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +786 -6727
- package/dist/react/index.esm.js +1 -1
- package/package.json +13 -7
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import './db-button.js';
|
|
2
|
+
|
|
3
|
+
type DbVoiceState = 'idle' | 'starting' | 'listening' | 'stopping' | 'completed' | 'cancelled' | 'error' | 'unsupported';
|
|
4
|
+
/** Controlled voice UI only: emits intent, never opens the microphone or uploads audio. */
|
|
5
|
+
declare class DbVoiceControl extends HTMLElement {
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
private built;
|
|
8
|
+
private action;
|
|
9
|
+
private cancel;
|
|
10
|
+
private label;
|
|
11
|
+
private status;
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
attributeChangedCallback(): void;
|
|
14
|
+
private get active();
|
|
15
|
+
private emit;
|
|
16
|
+
private sync;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
'db-voice-control': DbVoiceControl;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { DbVoiceControl };
|
|
25
|
+
export type { DbVoiceState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./db-button.js";class DbVoiceControl extends HTMLElement{constructor(){super(...arguments),this.built=!1}static get observedAttributes(){return["state","message","disabled","compact","start-label","stop-label","cancel-label"]}connectedCallback(){this.built||(this.built=!0,this.classList.add("designbase-wc-voice-control"),this.action=document.createElement("db-button"),this.label=document.createElement("span"),this.action.append(this.label),this.action.setAttribute("size","m"),this.action.setAttribute("radius","pill"),this.action.addEventListener("db-click",()=>{this.hasAttribute("disabled")||"unsupported"===this.getAttribute("state")||"stopping"===this.getAttribute("state")||this.emit(this.active?"stop":"start")}),this.cancel=document.createElement("db-button"),this.cancel.setAttribute("variant","ghost"),this.cancel.setAttribute("size","s"),this.cancel.setAttribute("start-icon","close"),this.cancel.setAttribute("icon-only",""),this.cancel.addEventListener("db-click",()=>{!this.hasAttribute("disabled")&&this.active&&this.emit("cancel")}),this.status=document.createElement("span"),this.status.setAttribute("role","status"),this.status.setAttribute("aria-live","polite"),this.append(this.action,this.status,this.cancel)),this.sync()}attributeChangedCallback(){this.built&&this.sync()}get active(){return["starting","listening","stopping"].includes(this.getAttribute("state")||"idle")}emit(t){this.dispatchEvent(new CustomEvent(`db-${t}`,{bubbles:!0,composed:!0}))}sync(){const t=this.getAttribute("state")||"idle",e=this.active?this.getAttribute("stop-label")||"받아쓰기 완료":this.getAttribute("start-label")||"음성 입력";this.action.setAttribute("aria-label",e),this.action.setAttribute("aria-pressed",String(this.active)),this.action.setAttribute("variant",this.active?"secondary":"ghost"),this.action.setAttribute("start-icon",this.active?"stop":"microphone"),this.action.toggleAttribute("icon-only",this.hasAttribute("compact")),this.label.textContent=e,this.label.hidden=this.hasAttribute("compact"),this.action.toggleAttribute("disabled",this.hasAttribute("disabled")||"unsupported"===t||"stopping"===t);this.status.textContent=this.getAttribute("message")||{starting:"마이크 연결 중",listening:"음성 인식 중",stopping:"마지막 문장 확인 중",error:"음성 인식 실패",unsupported:"음성 입력 미지원"}[t]||"",this.status.hidden=!this.status.textContent,this.cancel.hidden=!this.active,this.cancel.toggleAttribute("disabled",this.hasAttribute("disabled")),this.cancel.setAttribute("aria-label",this.getAttribute("cancel-label")||"음성 입력 취소"),this.dataset.active=String(this.active)}}customElements.get("db-voice-control")||customElements.define("db-voice-control",DbVoiceControl);export{DbVoiceControl};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import './db-button.js';
|
|
2
|
+
import { DbElement } from '../core/base-element.js';
|
|
3
|
+
import './db-modal.js';
|
|
4
|
+
import './db-input.js';
|
|
5
|
+
import './db-select.js';
|
|
6
|
+
|
|
7
|
+
interface DbWorkspaceInviteRole {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
interface DbWorkspaceInviteDraft {
|
|
12
|
+
email: string;
|
|
13
|
+
roleId: string;
|
|
14
|
+
}
|
|
15
|
+
/** Owns an unsaved UI draft. Emits intent only; never sends mail or grants membership. */
|
|
16
|
+
declare class DbWorkspaceInviteModal extends DbElement {
|
|
17
|
+
private roleData;
|
|
18
|
+
private emailDraft;
|
|
19
|
+
private roleDraft;
|
|
20
|
+
private fieldError;
|
|
21
|
+
private modal?;
|
|
22
|
+
private emailField?;
|
|
23
|
+
private roleField?;
|
|
24
|
+
private message?;
|
|
25
|
+
private intro?;
|
|
26
|
+
private readonly descriptionId;
|
|
27
|
+
private confirm?;
|
|
28
|
+
static get observedAttributes(): string[];
|
|
29
|
+
get roles(): DbWorkspaceInviteRole[];
|
|
30
|
+
set roles(value: DbWorkspaceInviteRole[]);
|
|
31
|
+
get open(): boolean;
|
|
32
|
+
set open(value: boolean);
|
|
33
|
+
get draft(): DbWorkspaceInviteDraft;
|
|
34
|
+
connectedCallback(): void;
|
|
35
|
+
disconnectedCallback(): void;
|
|
36
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
37
|
+
private blocked;
|
|
38
|
+
private validateEmail;
|
|
39
|
+
private submit;
|
|
40
|
+
private ensureView;
|
|
41
|
+
private syncErrors;
|
|
42
|
+
private sync;
|
|
43
|
+
}
|
|
44
|
+
declare global {
|
|
45
|
+
interface HTMLElementTagNameMap {
|
|
46
|
+
'db-workspace-invite-modal': DbWorkspaceInviteModal;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { DbWorkspaceInviteModal };
|
|
51
|
+
export type { DbWorkspaceInviteDraft, DbWorkspaceInviteRole };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./db-button.js";import{DbElement as t}from"../core/base-element.js";import{textNode as e,creditAction as i}from"../core/credit-ui.js";import{dbUid as s}from"../core/uid.js";import{t as r}from"../core/i18n.js";import"./db-modal.js";import"./db-input.js";import"./db-select.js";class DbWorkspaceInviteModal extends t{constructor(){super(...arguments),this.roleData=[],this.emailDraft="",this.roleDraft="",this.fieldError="",this.descriptionId=s("workspace-invite-description")}static get observedAttributes(){return["open","title","description","loading","disabled","error","default-role-id","reset-key"]}get roles(){return this.roleData.map(t=>({...t}))}set roles(t){const e=new Set;this.roleData=Array.isArray(t)?t.filter(t=>!(!t||"string"!=typeof t.id||!t.id||e.has(t.id)||"string"!=typeof t.label)&&(e.add(t.id),!0)).map(t=>({...t})):[],this.isConnected&&this.sync()}get open(){return this.hasAttribute("open")&&"false"!==this.getAttribute("open")}set open(t){this.toggleAttribute("open",t)}get draft(){return{email:this.emailDraft,roleId:this.roleDraft}}connectedCallback(){this.upgradeProperties(["roles","open"]),this.ensureView(),this.cleanups.listen(this.modal,"db-close",t=>{t.stopPropagation(),this.open=!1,this.dbEmit("close")}),this.cleanups.listen(this.emailField,"db-input",()=>{this.emailDraft=this.emailField.value,this.fieldError="",this.syncErrors(),this.dbEmit("draft-change",this.draft)}),this.cleanups.listen(this.emailField,"focusout",()=>this.validateEmail()),this.cleanups.listen(this.emailField,"keydown",t=>{"Enter"===t.key&&(t.preventDefault(),this.submit())}),this.cleanups.listen(this.roleField,"db-change",t=>{t.stopPropagation(),this.roleDraft=this.roleField.value,this.syncErrors(),this.dbEmit("draft-change",this.draft)}),this.cleanups.listen(this.confirm,"db-click",()=>this.submit()),this.sync()}disconnectedCallback(){this.modal?.remove(),this.modal=void 0,super.disconnectedCallback()}attributeChangedCallback(t,e,i){e!==i&&("reset-key"===t&&(this.emailDraft="",this.roleDraft="",this.fieldError=""),this.isConnected&&this.sync())}blocked(){return this.hasAttribute("loading")||this.hasAttribute("disabled")}validateEmail(){const t=this.emailDraft.trim(),e=this.emailField?.querySelector("input"),i=!!t&&t.length<=254&&!!e?.validity.valid;return this.fieldError=i?"":r("workspace.emailError"),this.syncErrors(),i}submit(){if(!this.blocked()&&this.open){if(this.validateEmail())return this.roleData.some(t=>t.id===this.roleDraft)?void this.dbEmit("invite",{email:this.emailDraft.trim(),roleId:this.roleDraft}):(this.roleField?.setAttribute("error",""),this.roleField?.setAttribute("error-message",r("workspace.roleError")),void this.roleField?.querySelector('[role="combobox"]')?.focus());this.emailField?.focus()}}ensureView(){if(this.modal)return;this.modal=document.createElement("db-modal"),this.modal.setAttribute("size","m");const t=e("div","designbase-wc-workspace-invite-modal__body","");t.setAttribute("data-modal-part","body"),this.intro=e("p","designbase-wc-workspace-invite-modal__intro",""),this.intro.id=this.descriptionId,this.emailField=document.createElement("db-input"),this.emailField.setAttribute("type","email"),this.emailField.setAttribute("required",""),this.emailField.setAttribute("label",r("workspace.email")),this.emailField.setAttribute("placeholder","name@company.com"),this.roleField=document.createElement("db-select"),this.roleField.setAttribute("label",r("workspace.role")),this.roleField.setAttribute("placeholder",r("workspace.chooseRole")),this.roleField.setAttribute("full-width",""),this.roleField.setAttribute("show-clear-button","false"),this.message=e("p","designbase-wc-workspace-invite-modal__message",""),this.message.setAttribute("role","alert"),t.append(this.intro,this.emailField,this.roleField,this.message);const s=e("div","designbase-wc-workspace-invite-modal__footer","");s.setAttribute("data-modal-part","footer"),this.confirm=i("workspace-send-invite",r("workspace.submit"),!1),this.confirm.setAttribute("variant","primary"),this.confirm.setAttribute("size","m"),s.append(this.confirm),this.modal.append(t,s),this.append(this.modal)}syncErrors(){this.emailField&&this.roleField&&this.message&&(this.emailField.toggleAttribute("error",!!this.fieldError),this.emailField.setAttribute("error-message",this.fieldError),this.roleField.removeAttribute("error"),this.roleField.removeAttribute("error-message"),this.message.textContent=this.getAttribute("error")||"",this.message.hidden=!this.message.textContent)}sync(){if(this.modal&&this.emailField&&this.roleField&&this.confirm){this.roleDraft||(this.roleDraft=this.getAttribute("default-role-id")||""),this.modal.setAttribute("title",this.getAttribute("title")||r("workspace.invite")),this.intro.textContent=this.getAttribute("description")||r("workspace.description"),this.modal.setAttribute("describedby",this.descriptionId);for(const t of["show-close-button","close-on-escape","close-on-outside-click"])this.modal.setAttribute(t,String(!this.hasAttribute("loading")));this.emailField.value!==this.emailDraft&&(this.emailField.value=this.emailDraft),this.emailField.toggleAttribute("disabled",this.blocked()),this.roleField.toggleAttribute("disabled",this.blocked()),this.roleField.setAttribute("options",JSON.stringify(this.roleData.map(t=>({value:t.id,label:t.label})))),this.roleField.value=this.roleDraft,this.confirm.toggleAttribute("disabled",this.blocked()||!this.roleData.length),this.confirm.toggleAttribute("loading",this.hasAttribute("loading")),this.syncErrors(),this.modal.open!==this.open&&(this.modal.open=this.open)}}}customElements.get("db-workspace-invite-modal")||customElements.define("db-workspace-invite-modal",DbWorkspaceInviteModal);export{DbWorkspaceInviteModal};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './db-button.js';
|
|
2
|
+
import { DbElement } from '../core/base-element.js';
|
|
3
|
+
import './db-avatar.js';
|
|
4
|
+
import './db-badge.js';
|
|
5
|
+
|
|
6
|
+
type DbWorkspaceMemberState = 'active' | 'invited' | 'expired';
|
|
7
|
+
interface DbWorkspaceMember {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
email: string;
|
|
11
|
+
roleLabel: string;
|
|
12
|
+
state: DbWorkspaceMemberState;
|
|
13
|
+
canReinvite?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface DbWorkspaceMemberAction {
|
|
16
|
+
id: string;
|
|
17
|
+
}
|
|
18
|
+
/** Display only. Roles and invitation status must come from the product's server. */
|
|
19
|
+
declare class DbWorkspaceMembers extends DbElement {
|
|
20
|
+
private data;
|
|
21
|
+
static get observedAttributes(): string[];
|
|
22
|
+
get members(): DbWorkspaceMember[];
|
|
23
|
+
set members(value: DbWorkspaceMember[]);
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
attributeChangedCallback(): void;
|
|
26
|
+
private blocked;
|
|
27
|
+
private render;
|
|
28
|
+
}
|
|
29
|
+
declare global {
|
|
30
|
+
interface HTMLElementTagNameMap {
|
|
31
|
+
'db-workspace-members': DbWorkspaceMembers;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { DbWorkspaceMembers };
|
|
36
|
+
export type { DbWorkspaceMember, DbWorkspaceMemberAction, DbWorkspaceMemberState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./db-button.js";import{createDbIcon as e}from"./db-icons.js";import{DbElement as t}from"../core/base-element.js";import{textNode as i,creditAction as s,replaceView as r}from"../core/credit-ui.js";import{t as a}from"../core/i18n.js";import"./db-avatar.js";import"./db-badge.js";class DbWorkspaceMembers extends t{constructor(){super(...arguments),this.data=[]}static get observedAttributes(){return["label","invite-label","loading","pending","disabled","error"]}get members(){return this.data.map(e=>({...e}))}set members(e){const t=new Set;this.data=Array.isArray(e)?e.filter(e=>!(!e||"string"!=typeof e.id||!e.id||t.has(e.id)||"string"!=typeof e.name||"string"!=typeof e.email||"string"!=typeof e.roleLabel||!["active","invited","expired"].includes(e.state)||void 0!==e.canReinvite&&"boolean"!=typeof e.canReinvite)&&(t.add(e.id),!0)).map(e=>({...e})):[],this.isConnected&&this.render()}connectedCallback(){this.upgradeProperties(["members"]),this.cleanups.listen(this,"db-click",e=>{if(!(e.target instanceof HTMLElement)||this.blocked())return;const t=e.target,i=t.dataset.action;if("workspace-retry"===i)return void this.dbEmit("retry");if(this.hasAttribute("error"))return;"workspace-invite"===i&&this.hasAttribute("invite-label")&&this.dbEmit("invite");const s=this.data.find(e=>e.id===t.dataset.memberId);s&&i===`workspace-reinvite:${s.id}`&&"active"!==s.state&&s.canReinvite&&this.dbEmit("reinvite",{id:s.id})}),this.render()}attributeChangedCallback(){this.isConnected&&this.render()}blocked(){return["loading","pending","disabled"].some(e=>this.hasAttribute(e))}render(){const t="designbase-wc-workspace-members";this.classList.add(t),this.setAttribute("aria-busy",String(this.hasAttribute("loading")||this.hasAttribute("pending")));const n=i("div",`${t}__header`,"");n.append(i("h3","",this.getAttribute("label")||a("workspace.members"))),this.hasAttribute("invite-label")&&n.append(s("workspace-invite",this.getAttribute("invite-label")||a("workspace.invite"),this.blocked()||this.hasAttribute("error")));const o=[n],d=this.getAttribute("error");if(d){const e=i("p","",d);e.setAttribute("role","alert"),o.push(e,s("workspace-retry",a("workspace.retry"),this.blocked()))}if(this.hasAttribute("loading")||!this.data.length){const e=i("p",`${t}__message`,a(this.hasAttribute("loading")?"loading":"workspace.empty"));e.setAttribute("role","status"),o.push(e)}else{const r=i("ul",`${t}__list`,"");for(const n of this.data){const o=i("li",`${t}__row`,"");o.dataset.state=n.state;const c=document.createElement("db-avatar");c.setAttribute("initials",(n.name||n.email).slice(0,2)),c.setAttribute("size","m"),c.setAttribute("aria-hidden","true");const b=i("div",`${t}__identity`,"");b.append(i("strong","",n.name||n.email),i("span","",n.email));const p=i("div",`${t}__meta`,""),l=document.createElement("db-badge");if(l.setAttribute("type","text"),l.setAttribute("variant","secondary"),l.textContent=a(`workspace.${n.state}`),l.prepend(e("active"===n.state?"circle-checked":"expired"===n.state?"error-filled":"clock",14)),p.append(i("span","",n.roleLabel),l),o.append(c,b,p),"active"!==n.state&&n.canReinvite){const e=s(`workspace-reinvite:${n.id}`,a("workspace.reinvite"),this.blocked()||!!d);e.dataset.memberId=n.id,o.append(e)}r.append(o)}o.push(r)}r(this,...o)}}customElements.get("db-workspace-members")||customElements.define("db-workspace-members",DbWorkspaceMembers);export{DbWorkspaceMembers};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a="\n:host { display:block; inline-size:100%; max-inline-size:960px; min-inline-size:0; container-type:inline-size; color:var(--db-text-primary); --shell-radius:12px; --shell-pad:0px; --safe-top:0px; --hardware:var(--db-mockup-bezel, var(--color-foundation-neutral-1000)); }\n:host([hidden]) { display:none; }\n* { box-sizing:border-box; }\n.frame { position:relative; border:1px solid var(--db-border-base); border-radius:var(--shell-radius); background:var(--db-surface-layer-1); box-shadow:var(--db-shadow-lg); isolation:isolate; }\n.screen { position:relative; aspect-ratio:var(--db-mockup-ratio, 16 / 10); overflow:hidden; background:var(--db-surface-base); border-radius:0 0 calc(var(--shell-radius) - 1px) calc(var(--shell-radius) - 1px); }\n.content { position:absolute; inset:var(--safe-top) 0 0; overflow:auto; scrollbar-width:none; overscroll-behavior:contain; }\n.content::-webkit-scrollbar { display:none; }\nslot { display:block; block-size:100%; min-block-size:100%; }\nimg { display:block; inline-size:100%; block-size:100%; object-fit:var(--db-mockup-fit, cover); object-position:top; }\n.chrome { overflow:hidden; border-radius:calc(var(--shell-radius) - 1px) calc(var(--shell-radius) - 1px) 0 0; }\n.tab-strip { display:flex; align-items:center; gap:22px; block-size:34px; padding:0 14px; background:color-mix(in srgb, var(--db-text-primary) 5%, var(--db-surface-layer-1)); }\n.dots { display:flex; align-items:center; gap:7px; flex-shrink:0; }\n.dots i { inline-size:10px; block-size:10px; border-radius:50%; background:var(--db-border-base); box-shadow:inset 0 0 0 1px rgb(0 0 0 / .08); }\n:host([data-variant='realistic']) .dots i:nth-child(1) { background:#ff5f57; }\n:host([data-variant='realistic']) .dots i:nth-child(2) { background:#febc2e; }\n:host([data-variant='realistic']) .dots i:nth-child(3) { background:#28c840; }\n.tab { display:flex; align-items:center; gap:8px; align-self:end; inline-size:190px; min-inline-size:0; block-size:27px; padding:0 10px; border-radius:7px 7px 0 0; background:var(--db-surface-layer-1); font:500 10px/1.4 var(--db-font-primary, sans-serif); color:var(--db-text-secondary); }\n.tab b { inline-size:10px; block-size:10px; border-radius:3px; background:var(--db-text-primary); flex-shrink:0; }\n.tab span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }\n.tab svg { inline-size:11px; block-size:11px; opacity:.5; flex-shrink:0; }\n.toolbar { display:flex; align-items:center; gap:12px; block-size:44px; padding:0 14px; border-bottom:1px solid var(--db-border-base); }\n.tools { display:flex; align-items:center; gap:13px; color:var(--db-text-secondary); flex-shrink:0; }\n.tools > svg { inline-size:14px; block-size:14px; }\n.tools > svg:first-child { opacity:.5; }\n.url { display:flex; align-items:center; justify-content:center; gap:6px; min-inline-size:0; flex:1; max-inline-size:520px; margin-inline:auto; block-size:27px; padding-inline:10px; border:1px solid color-mix(in srgb, var(--db-border-base) 65%, transparent); border-radius:7px; background:var(--db-surface-base); color:var(--db-text-secondary); font:400 11px/1.4 var(--db-font-primary, sans-serif); }\n.url span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.url svg { inline-size:11px; block-size:11px; flex-shrink:0; opacity:.7; }\n:host([data-device='tablet']) { max-inline-size:680px; --shell-radius:clamp(20px, 4.5cqw, 32px); --shell-pad:clamp(10px, 2.2cqw, 16px); --safe-top:0px; }\n:host([data-device='mobile']) { max-inline-size:320px; --shell-radius:clamp(28px, 14cqw, 50px); --shell-pad:clamp(6px, 2.5cqw, 10px); --safe-top:0px; }\n:host(:not([data-device='browser'])) .frame { padding:var(--shell-pad); border:1px solid var(--color-foundation-neutral-700); border-radius:var(--shell-radius); background:var(--hardware); box-shadow:inset 0 0 0 1px var(--color-foundation-neutral-900), inset 0 0 0 3px color-mix(in srgb, var(--color-foundation-neutral-700) 40%, transparent), 0 25px 45px -24px rgb(0 0 0 / .4), 0 3px 8px -4px rgb(0 0 0 / .25); }\n:host(:not([data-device='browser'])) .screen { border-radius:calc(var(--shell-radius) - var(--shell-pad)); outline:1px solid rgb(0 0 0 / .8); }\n:host([data-device='tablet']) .screen { aspect-ratio:var(--db-mockup-ratio, 3 / 4); }\n:host([data-device='mobile']) .screen { aspect-ratio:var(--db-mockup-ratio, 9 / 19.5); }\n.camera { position:absolute; z-index:3; pointer-events:none; background:var(--color-foundation-black); }\n:host([data-device='mobile']) .camera { inline-size:28%; block-size:6.4cqw; top:calc(var(--shell-pad) + 3cqw); left:36%; border-radius:30px; box-shadow:inset 0 0 0 1px rgb(255 255 255 / .05); }\n.camera::after { content:''; position:absolute; inline-size:4px; block-size:4px; border-radius:50%; background:#142031; box-shadow:inset 0 0 0 1px rgb(255 255 255 / .07); top:calc(50% - 2px); right:12%; }\n:host([data-device='tablet']) .camera { inline-size:16%; block-size:2.8cqw; top:calc(var(--shell-pad) + 1.5cqw); left:42%; border-radius:30px; }\n:host([data-device='mobile'][data-notch='island']) { --safe-top:12.5cqw; }\n:host([data-device='tablet'][data-notch='island']) { --safe-top:5.8cqw; }\n.side { position:absolute; z-index:-1; inline-size:3px; border-radius:2px; background:var(--color-foundation-neutral-700); box-shadow:inset -1px 0 0 var(--color-foundation-neutral-900); pointer-events:none; }\n.side--power { right:-3px; top:30%; block-size:14%; }.side--volume { left:-3px; top:27%; block-size:9%; }.side--volume::after { content:''; position:absolute; top:calc(100% + 9px); inline-size:3px; block-size:100%; border-radius:2px; background:inherit; }.side--action { left:-3px; top:18%; block-size:5%; }\n:host([data-device='tablet']) .side--power { top:-3px; right:12%; block-size:3px; inline-size:9%; }:host([data-device='tablet']) .side--volume { left:auto; right:-3px; top:10%; block-size:7%; }:host([data-device='tablet']) .side--action { display:none; }\n:host([data-variant='minimal']) .frame { box-shadow:var(--db-shadow-sm); }\n:host([data-variant='minimal']) .tab-strip, :host([data-variant='gradient']) .tab-strip,\n:host([data-variant='minimal']) .tools, :host([data-variant='gradient']) .tools { display:none; }\n:host([data-variant='minimal']) .toolbar::before, :host([data-variant='gradient']) .toolbar::before { content:''; inline-size:6px; block-size:6px; border-radius:50%; background:currentColor; opacity:.4; }\n:host([data-variant='minimal']:not([data-device='browser'])), :host([data-variant='gradient']:not([data-device='browser'])) { --shell-pad:clamp(5px, 2cqw, 9px); }\n:host([data-variant='minimal']:not([data-device='browser'])) .frame { border-color:var(--color-foundation-neutral-200); background:var(--color-foundation-neutral-200); box-shadow:inset 0 0 0 1px var(--color-foundation-neutral-white), var(--db-shadow-sm); }\n:host([data-variant='minimal']:not([data-device='browser'])) .screen { outline:1px solid rgb(0 0 0 / .08); }\n:host([data-variant='minimal']) .side, :host([data-variant='gradient']) .side { display:none; }\n:host([data-variant='gradient']) .frame { border:1px solid var(--color-foundation-neutral-700); background:linear-gradient(145deg, var(--color-foundation-neutral-700), var(--color-foundation-neutral-900) 42%, var(--color-foundation-neutral-1000) 72%, var(--color-foundation-neutral-800)); box-shadow:inset 0 1px 0 rgb(255 255 255 / .2), inset 0 -1px 0 rgb(0 0 0 / .3), var(--db-shadow-sm); }\n:host([data-variant='gradient']) .toolbar { color:var(--color-foundation-neutral-200); border-color:rgb(255 255 255 / .1); }\n:host([data-variant='gradient']) .url { color:var(--color-foundation-neutral-200); background:rgb(0 0 0 / .18); border-color:rgb(255 255 255 / .08); }\n:host([data-device='tablet'][orientation='landscape']) { max-inline-size:880px; }:host([data-device='tablet'][orientation='landscape']) .screen { aspect-ratio:var(--db-mockup-ratio, 4 / 3); }\n:host([data-device='mobile'][orientation='landscape']) { max-inline-size:720px; --safe-top:0px; --shell-radius:clamp(28px, 6.5cqw, 50px); --shell-pad:clamp(6px, 1.2cqw, 10px); }\n:host([data-device='mobile'][orientation='landscape']) .screen { aspect-ratio:var(--db-mockup-ratio, 19.5 / 9); }\n:host([data-device='mobile'][orientation='landscape']) .camera { inline-size:clamp(16px, 3cqw, 22px); block-size:28%; left:calc(var(--shell-pad) + 2cqw); top:36%; }\n:host([data-device='mobile'][orientation='landscape'][data-notch='island']) .content { inset-inline-start:6cqw; }\n/* Platform silhouettes and hardware details; display ratios come from the native pixel profiles. */\n:host([data-model='android']), :host([data-model='flip']), :host([data-model='fold']) { --shell-radius:clamp(20px, 9cqw, 32px); }\n:host([data-notch='punch']) { --safe-top:6cqw; }\n:host([data-notch='punch']) .camera { inline-size:2.8cqw; block-size:2.8cqw; left:calc(50% - 1.4cqw); top:calc(var(--shell-pad) + 1.6cqw); border-radius:50%; box-shadow:0 0 0 1px rgb(255 255 255 / .12); }\n:host([data-notch='punch']) .camera::after { inline-size:1cqw; block-size:1cqw; inset:32%; }\n:host([data-notch='punch'][orientation='landscape']) { --safe-top:0px; }\n:host([data-notch='punch'][orientation='landscape']) .camera { inline-size:1.6cqw; block-size:1.6cqw; left:calc(var(--shell-pad) + 1cqw); top:calc(50% - .8cqw); }\n:host([data-notch='punch'][orientation='landscape']) .content { inset-inline-start:4cqw; }\n:host([data-model='android']) .side--action, :host([data-model='flip']) .side--action, :host([data-model='fold']) .side--action { display:none; }\n:host([data-model='android']) .side--volume, :host([data-model='flip']) .side--volume, :host([data-model='fold']) .side--volume { left:auto; right:-3px; top:17%; }\n:host([data-model='android']) .side--volume::after, :host([data-model='flip']) .side--volume::after, :host([data-model='fold']) .side--volume::after { display:none; }\n:host([data-model='fold'][data-fold-state='open']) { max-inline-size:560px; --shell-radius:clamp(20px, 5cqw, 28px); }\n:host([data-model='fold'][data-fold-state='open'][data-notch='punch']) .camera { left:auto; right:calc(var(--shell-pad) + 4cqw); }\n:host([data-model='fold'][data-fold-state='open']) .side--power { block-size:10%; }\n.crease { position:absolute; z-index:2; pointer-events:none; opacity:.38; filter:blur(1.5px); --crease-shade:linear-gradient(transparent, rgb(0 0 0 / .025) 25%, rgb(0 0 0 / .04) 45%, rgb(255 255 255 / .06) 58%, transparent); --crease-shade-horizontal:linear-gradient(90deg, transparent, rgb(0 0 0 / .025) 25%, rgb(0 0 0 / .04) 45%, rgb(255 255 255 / .06) 58%, transparent); }\n:host([data-model='flip']) .crease { inset:calc(50% - 10px) 0 auto; block-size:20px; background:var(--crease-shade); }\n:host([data-model='fold']) .crease, :host([data-model='duo']) .crease { inset:0 auto 0 calc(50% - 10px); inline-size:20px; background:var(--crease-shade-horizontal); }\n:host([data-model='flip'][orientation='landscape']) .crease { inset:0 auto 0 calc(50% - 10px); inline-size:20px; block-size:auto; background:var(--crease-shade-horizontal); }\n:host([data-model='fold'][orientation='landscape']) .crease, :host([data-model='duo'][orientation='landscape']) .crease { inset:calc(50% - 10px) 0 auto; block-size:20px; inline-size:auto; background:var(--crease-shade); }\n:host([data-model='flip'][data-fold-state='closed']) .content { bottom:17cqw; }\n.cover-cameras { position:absolute; bottom:5cqw; left:5cqw; inline-size:9cqw; block-size:9cqw; border-radius:50%; background:radial-gradient(circle, #182533 12%, #080a0c 22%, #202328 30%, #050506 49%, #37393d 53%, #0c0d0f 62%); box-shadow:0 1px 3px rgb(0 0 0 / .5); pointer-events:none; }\n.cover-cameras::after { content:''; position:absolute; inset:0; transform:translateX(12cqw); border-radius:inherit; background:inherit; box-shadow:inherit; }\n:host([data-device='watch']) { max-inline-size:240px; display:grid; --shell-pad:clamp(6px, 2.8cqw, 8px); --shell-radius:24cqw; }\n:host([data-device='watch']) .frame { margin-block:30cqw; }\n:host([data-device='watch']) .screen { background:var(--color-foundation-neutral-1000); outline:1px solid rgb(0 0 0 / .9); }\n:host([data-device='watch'][data-variant='realistic']) .frame { background:linear-gradient(90deg, #535457, #303134 6%, #343538 50%, #303134 94%, #555659); border-color:#626366; box-shadow:inset 0 1px 1px rgb(255 255 255 / .38), inset 0 -1px 1px rgb(0 0 0 / .65), inset 1px 0 1px rgb(255 255 255 / .12), inset -1px 0 1px rgb(255 255 255 / .12), 0 12px 18px -12px rgb(0 0 0 / .35), 0 2px 4px rgb(0 0 0 / .12); }\n.watch-band { position:absolute; z-index:-1; inline-size:82%; block-size:38%; left:9%; overflow:visible; pointer-events:none; }\n.watch-band--top { bottom:87%; }\n.watch-band--bottom { top:87%; transform:rotate(180deg); }\n:host([data-device='watch']) .side--volume, :host([data-device='watch']) .side--action { display:none; }\n:host([data-device='watch']) .side--power { display:block; top:58%; block-size:14%; inline-size:1.5%; right:-.8%; border-radius:1cqw; background:var(--color-foundation-neutral-700); box-shadow:none; }\n.crown { position:absolute; right:-4.2%; top:25%; inline-size:5%; block-size:14%; border-radius:2cqw; background:linear-gradient(90deg, rgb(0 0 0 / .25), transparent 30%, rgb(255 255 255 / .12) 56%, rgb(0 0 0 / .3)), repeating-linear-gradient(0deg, #46474a 0 1px, #7a7b7e 1px 1.5px, #4b4c4f 1.5px 3px); box-shadow:inset 0 1px 1px rgb(255 255 255 / .25), inset 0 -1px 1px rgb(0 0 0 / .4); }\n:host([data-device='watch'][data-variant='minimal']) .crown { background:linear-gradient(90deg, rgb(0 0 0 / .12), transparent 40%, rgb(0 0 0 / .1)), repeating-linear-gradient(0deg, #b8b9bc 0 1px, #e1e2e4 1px 3px); }\n.watch-glass { position:absolute; inset:0; z-index:4; border-radius:inherit; pointer-events:none; background:radial-gradient(ellipse 70% 5% at 50% 0%, rgb(255 255 255 / .17), transparent), linear-gradient(180deg, rgb(255 255 255 / .035), transparent 8%, transparent 92%, rgb(255 255 255 / .015)); box-shadow:inset 0 2px 2px rgb(255 255 255 / .14), inset 0 -2px 3px rgb(0 0 0 / .8), inset 3px 0 4px rgb(0 0 0 / .45), inset -3px 0 4px rgb(0 0 0 / .45); }\n/* Closed Duo has a flat hinge edge; opened Duo is one rounded display with centered top/bottom hinges. */\n:host([data-model='duo']) { --shell-pad:clamp(5px, 1.4cqw, 9px); --shell-radius:clamp(20px, 6.5cqw, 36px); }\n:host([data-model='duo'][data-fold-state='open']) { max-inline-size:680px; --shell-radius:clamp(24px, 6cqw, 44px); }\n:host([data-model='duo'][data-fold-state='open'][data-notch='punch']) { --safe-top:3cqw; }\n:host([data-model='duo'][data-fold-state='open'][data-notch='punch']) .camera { inline-size:1.4cqw; block-size:1.4cqw; top:calc(var(--shell-pad) + 2cqw); right:27cqw; opacity:.5; }\n:host([data-model='duo'][data-fold-state='closed']) { max-inline-size:320px; }\n:host([data-model='duo'][data-fold-state='closed']) .frame { border-radius:4px var(--shell-radius) var(--shell-radius) 4px; }\n:host([data-model='duo'][data-fold-state='closed']) .screen { border-radius:2px calc(var(--shell-radius) - var(--shell-pad)) calc(var(--shell-radius) - var(--shell-pad)) 2px; }\n:host([data-model='duo'][data-fold-state='open']) .frame { border-radius:var(--shell-radius); }\n:host([data-model='duo'][data-fold-state='open']) .screen { border-radius:calc(var(--shell-radius) - var(--shell-pad)); }\n:host([data-model='duo'][data-notch='punch']) .camera { left:auto; right:calc(var(--shell-pad) + 4cqw); }\n:host([data-model='duo']) .side--action { display:none; }\n:host([data-model='duo']) .side--volume { left:auto; right:-3px; top:17%; }\n:host([data-model='duo']) .side--volume::after { display:none; }\n.hinge { position:absolute; inset:0 auto 0 -4px; inline-size:5px; border-radius:2px; background:linear-gradient(90deg, #707174, #ceced0 35%, #55565a 70%, #999a9e); box-shadow:-1px 0 1px rgb(0 0 0 / .22); pointer-events:none; }\n.hinge::before, .hinge::after { content:''; position:absolute; inset:14% 0 auto; block-size:1px; background:rgb(0 0 0 / .3); }.hinge::after { top:86%; }\n:host([data-model='duo'][data-fold-state='open']) .hinge { inset:-2px 0; inline-size:100%; border-radius:0; background:none; box-shadow:none; }\n:host([data-model='duo'][data-fold-state='open']) .hinge::before, :host([data-model='duo'][data-fold-state='open']) .hinge::after { inset:0 auto auto 46.8%; inline-size:6.4%; block-size:4px; border-radius:2px; border:1px solid rgb(0 0 0 / .25); background:linear-gradient(180deg, #898a8d, #36373a 45%, #67686b); }\n:host([data-model='duo'][data-fold-state='open']) .hinge::after { top:auto; bottom:0; }\n:host([data-model='duo'][data-fold-state='open']) .side--volume { right:18%; top:-3px; inline-size:7%; block-size:3px; }\n:host([data-model='duo'][data-fold-state='open']) .side--volume::after { display:block; top:0; left:140%; inline-size:100%; block-size:3px; }\n:host([data-model='duo'][data-fold-state='closed']) .frame { box-shadow:inset 0 0 0 1px rgb(255 255 255 / .15), -3px 0 0 #65666a, -5px 0 0 #b0b1b3, var(--db-shadow-sm); }\n@container (max-width:480px) { .tab-strip { block-size:28px; gap:16px; }.dots { gap:5px; }.dots i { inline-size:7px; block-size:7px; }.toolbar { block-size:36px; gap:8px; padding-inline:10px; }.tools { gap:6px; }.tools > svg { inline-size:11px; block-size:11px; }.tools--right { display:none; }.url { font-size:10px; block-size:24px; }.tab { block-size:23px; inline-size:140px; font-size:9px; } }\n";export{a as deviceMockupStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const point=(t,o,n)=>({x:(12+216*t)*o/240,y:(46-108*t*(1-t))*n/64}),t=128,o=[0];let n=point(0,240,64);for(let a=1;a<=t;a++){const h=point(a/t,240,64);o.push(o[a-1]+Math.hypot(h.x-n.x,h.y-n.y)),n=h}function flightRoutePosition(n,a,h){const e=Math.min(100,Math.max(0,n))/100*o[128];let i=1;for(;i<t&&o[i]<e;)i++;const s=o[i]-o[i-1],l=(i-1+(s?(e-o[i-1])/s:0))/t;return{...point(l,a,h),angle:45+180*Math.atan2((216*l-108)*h/64,216*a/240)/Math.PI}}export{flightRoutePosition};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e="\n:host { display:block; inline-size:var(--db-node-width, 280px); max-inline-size:100%; min-inline-size:0; color:var(--db-text-primary); font-family:var(--db-font-primary, sans-serif); --port-color:var(--db-text-tertiary); }\n:host([hidden]), [hidden] { display:none !important; }\n* { box-sizing:border-box; }\n.header, .description, .ports, .footer { -webkit-user-select:none; user-select:none; }\n.frame { position:relative; border:1px solid var(--db-border-base); border-radius:var(--db-radius-l); background:var(--db-surface-base); box-shadow:var(--db-shadow-sm); }\n:host([selected]) .frame { border-color:var(--db-border-focus); box-shadow:0 0 0 1px var(--db-border-focus), var(--db-shadow-sm); }\n:host([disabled]) { opacity:.55; }\n.header { display:flex; align-items:center; gap:6px; padding:8px 10px; min-block-size:40px; }\n.heading { appearance:none; border:0; padding:0; min-inline-size:0; flex:1; display:flex; align-items:center; gap:9px; text-align:start; background:none; color:inherit; font:inherit; cursor:pointer; border-radius:var(--db-radius-s); }\n:host([movable]) .heading { cursor:grab; touch-action:none; user-select:none; }:host([movable]) .heading:active { cursor:grabbing; }\n.icon { flex-shrink:0; inline-size:16px; block-size:16px; display:grid; place-items:center; color:var(--db-text-secondary); }\n.title { font-size:var(--db-text-s); font-weight:var(--db-weight-semibold); line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.actions { display:flex; align-items:center; gap:2px; }.action { display:grid; place-items:center; flex-shrink:0; inline-size:26px; block-size:26px; border:0; border-radius:var(--db-radius-s); background:transparent; color:var(--db-text-secondary); cursor:pointer; padding:0; }.action:hover:not(:disabled) { background:var(--db-surface-layer-1); color:var(--db-text-primary); }\nbutton:focus-visible { outline:2px solid var(--db-border-focus); outline-offset:3px; }button:disabled { cursor:default; opacity:.45; }\n.description { margin:0; padding:0 10px 8px; font-size:var(--db-text-xs); line-height:1.6; color:var(--db-text-secondary); }\n.body { padding:8px 10px; border-block-start:1px solid var(--db-border-muted); font-size:var(--db-text-s); }.footer { padding:6px 10px; border-block-start:1px solid var(--db-border-muted); color:var(--db-text-secondary); font-size:var(--db-text-xs); }\nslot { display:block; }slot[name='actions'] { display:contents; }::slotted(*) { max-inline-size:100%; }\n::slotted(input), ::slotted(textarea), ::slotted([contenteditable='true']), ::slotted(db-input), ::slotted(db-textarea), ::slotted(db-markdown-editor) { -webkit-user-select:text; user-select:text; }\n.ports { border-block-start:1px solid var(--db-border-muted); padding:2px 10px; }.port-row { position:relative; display:flex; align-items:center; gap:8px; min-block-size:28px; }\n.port-label { font-size:var(--db-text-xs); line-height:1.5; min-inline-size:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.port-type { margin-inline-start:auto; color:var(--db-text-tertiary); font-size:10px; flex-shrink:0; }\n.port { position:absolute; inline-size:24px; block-size:24px; border:0; padding:0; background:none; cursor:crosshair; touch-action:none; display:grid; place-items:center; border-radius:50%; z-index:2; }\n.ports--input .port { left:-23px; }.ports--output .port { right:-23px; }.ports--output .port-row { justify-content:flex-end; }.ports--output .port-type { order:-1; margin-inline-start:0; margin-inline-end:auto; }\n.port-dot { inline-size:9px; block-size:9px; border:1.5px solid var(--port-color); border-radius:50%; background:var(--db-surface-base); box-shadow:0 0 0 3px var(--db-surface-base); transition:transform .12s; }\n.port:hover:not(:disabled) .port-dot { transform:scale(1.3); }.port[data-connected='true'] .port-dot { background:var(--port-color); }\n[data-type='text'] { --port-color:var(--db-brand-primary); }[data-type='image'] { --port-color:var(--db-feedback-success-fg); }[data-type='number'] { --port-color:var(--db-feedback-warning-fg); }[data-type='boolean'] { --port-color:var(--db-feedback-error-fg); }\n.status { display:flex; flex-shrink:0; align-items:center; white-space:nowrap; }\n/* db-badge lives inside this shadow root; its global stylesheet cannot cross the boundary. */\n.status db-badge { display:inline-flex; align-items:center; justify-content:center; padding:var(--db-padding-xxs) var(--db-padding-xs); border:1px solid currentColor; border-radius:var(--db-radius-action-pill); font-size:10px; font-weight:var(--db-weight-medium); line-height:1; background:transparent; }\n.status db-badge[variant='info'] { color:var(--db-feedback-info-fg); }\n.status db-badge[variant='success'] { color:var(--db-feedback-success-fg); }\n.status db-badge[variant='danger'] { color:var(--db-feedback-error-fg); }\n.action--run { color:var(--db-text-primary); }\n:host([data-status='error']) .frame { border-color:var(--db-feedback-error-fg); }\n:host([data-variant='compact']) .header { padding:6px 8px; min-block-size:36px; }:host([data-variant='compact']) .description { padding:0 8px 6px; }:host([data-variant='compact']) .body { padding:6px 8px; }\n:host([collapsed]) .ports { border-block-start:0; padding-block:0; }:host([collapsed]) .port-type { display:none; }:host([collapsed]) .port-row { min-block-size:26px; }\n:host([detail='overview']) .description, :host([detail='overview']) .body, :host([detail='overview']) .footer, :host([detail='overview']) .port-type, :host([detail='overview']) .actions { display:none; }\n:host([detail='overview']) .header { padding:6px 10px; }\n:host([detail='overview']) .ports { padding-block:0; }\n@media(prefers-reduced-motion:reduce) { *, *::before { animation:none !important; transition:none !important; } }\n";export{e as nodeStyle};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DbElement } from '../core/base-element.js';
|
|
2
|
+
import './db-button.js';
|
|
3
|
+
|
|
4
|
+
interface DbPaperField {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
interface DbPaperAction {
|
|
9
|
+
reference: string;
|
|
10
|
+
}
|
|
11
|
+
/** Own only the view; framework-owned children (including slot="actions") stay mounted. */
|
|
12
|
+
declare abstract class DbPaperCard extends DbElement {
|
|
13
|
+
protected view: HTMLDivElement;
|
|
14
|
+
private ready;
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
protected upgradeNames(): string[];
|
|
17
|
+
attributeChangedCallback(): void;
|
|
18
|
+
protected abstract render(): void;
|
|
19
|
+
protected attr(name: string): string;
|
|
20
|
+
protected action(reference: string): HTMLElement | null;
|
|
21
|
+
protected replace(...nodes: Node[]): void;
|
|
22
|
+
protected code(reference: string): HTMLElement;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { DbPaperCard };
|
|
26
|
+
export type { DbPaperAction, DbPaperField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DbElement as e}from"../core/base-element.js";import"./db-button.js";function paperNode(e,t,r=""){const a=document.createElement(e);return a.className=t,a.textContent=r,a}function paperFields(e){return Array.isArray(e)?e.filter(e=>!!e&&"object"==typeof e&&"string"==typeof e.label&&"string"==typeof e.value).map(({label:e,value:t})=>({label:e,value:t})):[]}function paperJson(e){try{return null==e?[]:JSON.parse(e)}catch{return[]}}function paperImageSrc(e){if(!e?.trim())return null;try{const t=new URL(e,document.baseURI);return["http:","https:","blob:"].includes(t.protocol)||"data:"===t.protocol&&/^data:image\/(png|jpeg|webp|gif|svg\+xml)[;,]/i.test(e)?e:null}catch{return null}}function paperDetails(e){const t=paperNode("dl","db-paper__fields");for(const{label:r,value:a}of e){const e=paperNode("div","db-paper__field");e.append(paperNode("dt","",r),paperNode("dd","",a)),t.append(e)}return t}class DbPaperCard extends e{constructor(){super(...arguments),this.view=paperNode("div","db-paper__view"),this.ready=!1}connectedCallback(){this.view.parentNode||this.prepend(this.view),this.classList.add("db-paper"),this.upgradeProperties(this.upgradeNames()),this.ready=!0,this.render()}upgradeNames(){return[]}attributeChangedCallback(){this.ready&&this.render()}attr(e){return this.getAttribute(e)||""}action(e){const t=this.attr("action-label");if(!t)return null;const r=document.createElement("db-button");return r.textContent=t,r.setAttribute("variant","secondary"),r.setAttribute("size","m"),r.dataset.paperAction="",r.toggleAttribute("disabled",this.hasAttribute("disabled")),r.addEventListener("db-click",()=>{this.hasAttribute("disabled")||this.dbEmit("action",{reference:e})}),r}replace(...e){const t=this.view.contains(document.activeElement)&&document.activeElement?.hasAttribute("data-paper-action");this.view.replaceChildren(...e),t&&this.view.querySelector("[data-paper-action]:not([disabled])")?.focus()}code(e){const t=paperNode("div","db-paper__code"),r=paperImageSrc(this.attr("code-image-src"));if(r){const a=paperNode("img","db-paper__code-image");a.src=r,a.alt=this.attr("code-alt")||e||"코드 이미지",a.addEventListener("error",()=>{a.hidden=!0}),t.append(a)}return e&&t.append(paperNode("span","db-paper__reference",e)),t}}export{DbPaperCard,paperDetails,paperFields,paperImageSrc,paperJson,paperNode};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { DbElement } from './base-element.js';
|
|
2
|
+
import { DbIconName } from '../components/db-icons.js';
|
|
3
|
+
import '../components/db-button.js';
|
|
4
|
+
import '../components/db-badge.js';
|
|
5
|
+
import '../components/db-spinner.js';
|
|
6
|
+
import '../components/db-code-block.js';
|
|
7
|
+
|
|
8
|
+
type DbAiStatus = 'pending' | 'running' | 'complete' | 'error' | 'cancelled' | 'approval';
|
|
9
|
+
interface DbAiItem {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
status?: DbAiStatus;
|
|
14
|
+
code?: string;
|
|
15
|
+
language?: string;
|
|
16
|
+
href?: string;
|
|
17
|
+
meta?: string;
|
|
18
|
+
children?: DbAiItem[];
|
|
19
|
+
open?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface DbAiAction {
|
|
22
|
+
id: string;
|
|
23
|
+
action: string;
|
|
24
|
+
}
|
|
25
|
+
/** Shared presentation only. The app supplies execution state and handles every action. */
|
|
26
|
+
declare abstract class DbAiDataElement extends DbElement {
|
|
27
|
+
private data;
|
|
28
|
+
private disclosureState;
|
|
29
|
+
get items(): DbAiItem[];
|
|
30
|
+
set items(value: DbAiItem[]);
|
|
31
|
+
protected get rows(): readonly DbAiItem[];
|
|
32
|
+
connectedCallback(): void;
|
|
33
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
34
|
+
private readAttributeItems;
|
|
35
|
+
protected attr(name: string, key?: string): string;
|
|
36
|
+
protected get state(): DbAiStatus;
|
|
37
|
+
protected action(action: string, id: string): void;
|
|
38
|
+
protected button(action: string, label: string, icon?: DbIconName, id?: string): HTMLElement;
|
|
39
|
+
protected closeDisclosure(details: HTMLDetailsElement, restoreFocus?: boolean): void;
|
|
40
|
+
protected disclosure(id: string, label: string, status: DbAiStatus, body: Node[], defaultOpen?: boolean, icon?: DbIconName): HTMLDetailsElement;
|
|
41
|
+
protected itemLine(item: DbAiItem): HTMLElement;
|
|
42
|
+
protected update(resetRoot?: boolean): void;
|
|
43
|
+
protected abstract view(): Node[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { DbAiDataElement };
|
|
47
|
+
export type { DbAiAction, DbAiItem, DbAiStatus };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DbElement as t}from"./base-element.js";import{textNode as e,replaceView as s}from"./credit-ui.js";import{sanitizeHref as i}from"./safe-url.js";import{t as a}from"./i18n.js";import{createDbIcon as n}from"../components/db-icons.js";import"../components/db-button.js";import"../components/db-badge.js";import"../components/db-spinner.js";import"../components/db-code-block.js";const r=["pending","running","complete","error","cancelled","approval"],o=e;function aiIcon(t){return n(t,18)}function aiState(t){return r.includes(t)?t:"pending"}function aiStatus(t,e){const s=o("span","designbase-wc-ai__icon","");if(s.dataset.status=t,s.setAttribute("aria-label",a(`aiElement.${t}`)),"running"===t){const t=document.createElement("db-spinner");t.setAttribute("size","s"),t.setAttribute("color","var(--db-text-secondary)"),t.setAttribute("aria-hidden","true"),s.append(t)}else s.append(aiIcon("error"===t?"error-filled":e||("complete"===t?"circle-checked":"clock")));return s}function aiCode(t,e="text"){const s=document.createElement("db-code-block");return s.setAttribute("code",t),s.setAttribute("language",e),s.setAttribute("show-line-numbers","false"),s.setAttribute("show-language","false"),s}function aiLink(t){const e=i(t.href,""),s=o(e?"a":"span","designbase-wc-ai__source",""),a=o("db-badge","",t.label);return a.setAttribute("variant","secondary"),a.setAttribute("size","s"),s.append(a),s instanceof HTMLAnchorElement&&(s.href=e,s.target="_blank",s.rel="noopener noreferrer"),s}function readItems(t,e=0){if(!Array.isArray(t)||e>8)return[];const s=new Set;return t.slice(0,500).flatMap(t=>{if(!t||"object"!=typeof t||!("id"in t)||!("label"in t)||"string"!=typeof t.id||!t.id||s.has(t.id)||"string"!=typeof t.label)return[];s.add(t.id);const i={id:t.id,label:t.label};for(const e of["description","code","language","href","meta"]){const s=Reflect.get(t,e);"string"==typeof s&&(i[e]=s)}return"status"in t&&"string"==typeof t.status&&(i.status=aiState(t.status)),"open"in t&&"boolean"==typeof t.open&&(i.open=t.open),"children"in t&&(i.children=readItems(t.children,e+1)),[i]})}class DbAiDataElement extends t{constructor(){super(...arguments),this.data=[],this.disclosureState=new Map}get items(){return structuredClone(this.data)}set items(t){this.data=readItems(t),delete this.dataset.invalidItems,this.update()}get rows(){return this.data}connectedCallback(){this.upgradeProperties(["items"]),this.hasAttribute("items")&&this.readAttributeItems(),this.cleanups.listen(this,"db-click",t=>{const e=t.target;if(!(e instanceof HTMLElement)||e.closest(this.localName)!==this||this.hasAttribute("disabled"))return;const s=e.dataset.aiAction;s&&(t.stopPropagation(),this.action(s,e.dataset.id||""))}),this.cleanups.listen(this,"click",t=>{const e=t.target?.closest("summary[data-ai-disclosure]");if(!e||e.closest(this.localName)!==this)return;const s=e.parentElement;this.disclosureState.set(e.dataset.aiDisclosure||"",!s.open),this.dbEmit("open-change",{id:e.dataset.aiDisclosure,open:!s.open})}),this.update()}attributeChangedCallback(t,e,s){e!==s&&("items"===t&&this.readAttributeItems(),this.update("open"===t))}readAttributeItems(){delete this.dataset.invalidItems;try{this.data=readItems(JSON.parse(this.getAttribute("items")||"[]"))}catch{this.data=[],this.dataset.invalidItems="true"}}attr(t,e){return this.getAttribute(t)||(e?a(`aiElement.${e}`):"")}get state(){return aiState(this.getAttribute("status"))}action(t,e){this.dbEmit(t,{id:e||this.attr("item-id"),action:t})}button(t,e,s,i=""){const a=document.createElement("db-button");return a.dataset.aiAction=t,a.dataset.id=i,a.dataset.action=`${t}:${i}`,a.setAttribute("variant","ghost"),a.setAttribute("size","s"),a.toggleAttribute("disabled",this.hasAttribute("disabled")),s&&a.setAttribute("start-icon",s),a.textContent=e,a}closeDisclosure(t,e=!1){if(!t.open)return;t.open=!1;const s=t.dataset.key||"root";this.disclosureState.set(s,!1),this.dbEmit("open-change",{id:s,open:!1}),e&&Array.from(this.querySelectorAll("details[data-key]")).find(t=>t.dataset.key===s)?.querySelector("summary")?.focus()}disclosure(t,e,s,i,a=!1,n){const r=document.createElement("details");r.className="designbase-wc-ai__disclosure",r.dataset.key=t,r.open=this.disclosureState.get(t)??a;const d=o("summary","designbase-wc-ai__line","");d.dataset.aiDisclosure=t,d.dataset.action=`disclosure:${t}`,d.tabIndex=0,d.append(aiStatus(s,n),o("span","designbase-wc-ai__label",e),aiIcon("chevron-right"));const c=o("div","designbase-wc-ai__detail","");return c.append(...i),r.append(d,c),r}itemLine(t){const e=[];if(t.description&&e.push(o("p","designbase-wc-ai__description",t.description)),t.code&&e.push(aiCode(t.code,t.language)),t.children?.length){const s=o("div","designbase-wc-ai__sources","");s.append(...t.children.map(aiLink)),e.push(s)}if(e.length){const s=this.disclosure(`item:${t.id}`,t.label,t.status||"pending",e,t.open??"running"===t.status);return t.meta&&s.querySelector("summary")?.insertBefore(o("span","designbase-wc-ai__meta",t.meta),s.querySelector("summary").lastElementChild),s}const s=o("div","designbase-wc-ai__line","");return s.append(aiStatus(t.status||"pending"),o("span","designbase-wc-ai__label",t.label)),t.meta&&s.append(o("span","designbase-wc-ai__meta",t.meta)),s}update(t=!1){if(this.isConnected){for(const t of this.querySelectorAll("details[data-key]"))t.closest(this.localName)===this&&this.disclosureState.set(t.dataset.key||"",t.open);t&&this.disclosureState.delete("root"),this.classList.add("designbase-wc-ai",`designbase-wc-${this.localName.slice(3)}`),this.dataset.status=this.state,s(this,...this.view())}}}export{DbAiDataElement,aiCode,aiIcon,aiLink,o as aiNode,aiState,aiStatus};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function creditNumber(t){if(null===t||""===t.trim())return null;const e=Number(t);return Number.isSafeInteger(e)&&e>=0?e:null}function creditText(t){return null===t?"—":t.toLocaleString()}function textNode(t,e,n){const r=document.createElement(t);return r.className=e,r.textContent=n,r}function replaceView(t,...e){const n=document.activeElement,r=n instanceof HTMLElement&&t.contains(n)?n.closest("[data-action]")?.dataset.action:void 0;if(t.replaceChildren(...e),r){const e=Array.from(t.querySelectorAll("[data-action]")).find(t=>t.dataset.action===r),n=e?.matches("button, input, [tabindex]")?e:e?.querySelector("button, input");n&&!n.hasAttribute("disabled")&&"true"!==n.getAttribute("aria-disabled")&&n.focus()}}function creditAction(t,e,n){const r=document.createElement("db-button");return r.dataset.action=t,r.setAttribute("variant","secondary"),r.setAttribute("size","s"),r.toggleAttribute("disabled",n),r.textContent=e,r}export{creditAction,creditNumber,creditText,replaceView,textNode};
|
package/dist/esm/core/i18n.d.ts
CHANGED
|
@@ -11,6 +11,150 @@
|
|
|
11
11
|
*/
|
|
12
12
|
/** 컴포넌트가 쓰는 문자열 키 → 기본(한국어) 값 */
|
|
13
13
|
declare const DEFAULT_STRINGS: {
|
|
14
|
+
readonly 'aiElement.emptyFolder': "빈 폴더";
|
|
15
|
+
readonly 'aiElement.noFiles': "표시할 파일이 없습니다.";
|
|
16
|
+
readonly 'attachment.title': "첨부 파일";
|
|
17
|
+
readonly 'attachment.empty': "아직 첨부한 파일이 없습니다.";
|
|
18
|
+
readonly 'attachment.queued': "대기 중";
|
|
19
|
+
readonly 'attachment.uploading': "업로드 중";
|
|
20
|
+
readonly 'attachment.processing': "서버 처리 중";
|
|
21
|
+
readonly 'attachment.ready': "완료";
|
|
22
|
+
readonly 'attachment.error': "실패";
|
|
23
|
+
readonly 'attachment.cancelled': "취소됨";
|
|
24
|
+
readonly 'attachment.unknown': "진행률을 확인하고 있어요.";
|
|
25
|
+
readonly 'attachment.cancel': "취소";
|
|
26
|
+
readonly 'attachment.retry': "재시도";
|
|
27
|
+
readonly 'attachment.remove': "목록에서 제거";
|
|
28
|
+
readonly 'attachment.open': "상세 보기";
|
|
29
|
+
readonly 'attachment.reload': "다시 불러오기";
|
|
30
|
+
readonly 'workspace.members': "워크스페이스 멤버";
|
|
31
|
+
readonly 'workspace.invite': "멤버 초대";
|
|
32
|
+
readonly 'workspace.email': "이메일";
|
|
33
|
+
readonly 'workspace.role': "초대 역할";
|
|
34
|
+
readonly 'workspace.chooseRole': "역할을 선택하세요";
|
|
35
|
+
readonly 'workspace.description': "함께 작업할 사람의 이메일과 역할을 확인하세요.";
|
|
36
|
+
readonly 'workspace.submit': "초대 요청";
|
|
37
|
+
readonly 'workspace.emailError': "254자 이내의 올바른 이메일 주소를 입력해 주세요.";
|
|
38
|
+
readonly 'workspace.roleError': "초대할 역할을 선택해 주세요.";
|
|
39
|
+
readonly 'workspace.retry': "다시 불러오기";
|
|
40
|
+
readonly 'workspace.reinvite': "다시 초대";
|
|
41
|
+
readonly 'workspace.active': "이용 중";
|
|
42
|
+
readonly 'workspace.invited': "초대 대기";
|
|
43
|
+
readonly 'workspace.expired': "초대 만료";
|
|
44
|
+
readonly 'workspace.empty': "아직 표시할 멤버가 없습니다.";
|
|
45
|
+
readonly 'aiElement.pending': "대기 중";
|
|
46
|
+
readonly 'aiElement.running': "진행 중";
|
|
47
|
+
readonly 'aiElement.complete': "완료";
|
|
48
|
+
readonly 'aiElement.error': "실패";
|
|
49
|
+
readonly 'aiElement.cancelled': "취소됨";
|
|
50
|
+
readonly 'aiElement.approval': "승인 대기";
|
|
51
|
+
readonly 'aiElement.researching': "자료를 확인하고 있어요";
|
|
52
|
+
readonly 'aiElement.researched': "작업 과정 살펴보기";
|
|
53
|
+
readonly 'aiElement.thinking': "생각 정리 중";
|
|
54
|
+
readonly 'aiElement.reasoning': "응답 요약";
|
|
55
|
+
readonly 'aiElement.plan': "작업 계획";
|
|
56
|
+
readonly 'aiElement.queue': "대기 중인 요청";
|
|
57
|
+
readonly 'aiElement.remove': "제거";
|
|
58
|
+
readonly 'aiElement.queueEmpty': "대기 중인 요청이 없습니다.";
|
|
59
|
+
readonly 'aiElement.sources': "참고한 출처";
|
|
60
|
+
readonly 'aiElement.citation': "출처";
|
|
61
|
+
readonly 'aiElement.checkpoint': "체크포인트 저장됨";
|
|
62
|
+
readonly 'aiElement.restore': "여기부터 복원";
|
|
63
|
+
readonly 'aiElement.confirmation': "이 작업을 진행할까요?";
|
|
64
|
+
readonly 'aiElement.allow': "허용";
|
|
65
|
+
readonly 'aiElement.reject': "거절";
|
|
66
|
+
readonly 'aiElement.accepted': "작업을 허용했습니다.";
|
|
67
|
+
readonly 'aiElement.rejected': "작업을 거절했습니다.";
|
|
68
|
+
readonly 'aiElement.context': "컨텍스트";
|
|
69
|
+
readonly 'aiElement.tokens': "토큰";
|
|
70
|
+
readonly 'aiElement.unknown': "사용량을 아직 확인할 수 없습니다.";
|
|
71
|
+
readonly 'aiElement.files': "작업 파일";
|
|
72
|
+
readonly 'aiElement.task': "작업 진행";
|
|
73
|
+
readonly 'aiElement.subagent': "보조 에이전트";
|
|
74
|
+
readonly 'aiElement.tool': "도구 실행";
|
|
75
|
+
readonly 'aiElement.terminal': "터미널";
|
|
76
|
+
readonly 'aiElement.stackTrace': "오류 상세";
|
|
77
|
+
readonly 'aiElement.tests': "테스트 결과";
|
|
78
|
+
readonly 'aiElement.passed': "통과";
|
|
79
|
+
readonly 'aiElement.failed': "실패";
|
|
80
|
+
readonly 'aiElement.input': "입력";
|
|
81
|
+
readonly 'aiElement.output': "출력";
|
|
82
|
+
readonly 'aiElement.user': "사용자";
|
|
83
|
+
readonly 'aiElement.assistant': "AI 응답";
|
|
84
|
+
readonly 'aiElement.copy': "복사";
|
|
85
|
+
readonly 'aiElement.regenerate': "다시 생성";
|
|
86
|
+
readonly 'aiElement.like': "좋아요";
|
|
87
|
+
readonly 'aiElement.dislike': "싫어요";
|
|
88
|
+
readonly 'aiElement.latest': "최신 응답으로";
|
|
89
|
+
readonly 'aiElement.conversation': "AI와의 대화";
|
|
90
|
+
readonly 'notification.title': "알림";
|
|
91
|
+
readonly 'notification.filters': "알림 필터";
|
|
92
|
+
readonly 'notification.all': "전체";
|
|
93
|
+
readonly 'notification.unread': "안 읽음";
|
|
94
|
+
readonly 'notification.readAll': "표시된 알림 모두 읽음";
|
|
95
|
+
readonly 'notification.markRead': "읽음으로 표시";
|
|
96
|
+
readonly 'notification.retry': "다시 불러오기";
|
|
97
|
+
readonly 'notification.empty': "아직 도착한 알림이 없습니다.";
|
|
98
|
+
readonly 'notification.caughtUp': "모든 알림을 확인했어요.";
|
|
99
|
+
readonly 'notification.countUnknown': "확인 필요";
|
|
100
|
+
readonly 'aiModel.label': "사용 모델";
|
|
101
|
+
readonly 'aiModel.choose': "모델을 선택하세요";
|
|
102
|
+
readonly 'aiModel.empty': "현재 사용할 수 있는 모델이 없습니다.";
|
|
103
|
+
readonly 'aiModel.capabilities': "지원 작업";
|
|
104
|
+
readonly 'aiModel.usage': "사용량 단위";
|
|
105
|
+
readonly 'aiQuote.expires': "견적 유효 시간";
|
|
106
|
+
readonly 'aiQuote.title': "실행 전 견적";
|
|
107
|
+
readonly 'aiQuote.reserved': "예약할 최대 크레딧";
|
|
108
|
+
readonly 'aiQuote.providerCost': "예상 제공사 비용";
|
|
109
|
+
readonly 'aiQuote.pricingVersion': "가격표 버전";
|
|
110
|
+
readonly 'aiQuote.unknown': "미확정";
|
|
111
|
+
readonly 'aiQuote.idle': "모델과 요청 내용을 정한 뒤 견적을 확인하세요.";
|
|
112
|
+
readonly 'aiQuote.loading': "견적을 확인하고 있습니다.";
|
|
113
|
+
readonly 'aiQuote.executing': "요청을 처리하고 있습니다. 중복 실행하지 마세요.";
|
|
114
|
+
readonly 'aiQuote.stale': "모델 또는 입력이 변경됐습니다. 견적을 다시 확인하세요.";
|
|
115
|
+
readonly 'aiQuote.expired': "견적이 만료됐습니다. 견적을 다시 확인하세요.";
|
|
116
|
+
readonly 'aiQuote.balanceUnknown': "잔액을 확인할 수 없습니다. 새로 확인해 주세요.";
|
|
117
|
+
readonly 'aiQuote.insufficient': "추가로 필요한 크레딧:";
|
|
118
|
+
readonly 'aiQuote.ready': "실행 시 최대 크레딧을 예약하고, 결과 확인 후 실제 사용량으로 정산합니다.";
|
|
119
|
+
readonly 'aiQuote.refresh': "견적 다시 확인";
|
|
120
|
+
readonly 'aiQuote.request': "견적 확인";
|
|
121
|
+
readonly 'aiQuote.execute': "실행하기";
|
|
122
|
+
readonly 'plan.current': "현재 플랜";
|
|
123
|
+
readonly 'plan.usage': "이번 기간 사용";
|
|
124
|
+
readonly 'plan.allowed': "이용 가능";
|
|
125
|
+
readonly 'plan.locked': "미포함";
|
|
126
|
+
readonly 'plan.manage': "플랜 관리";
|
|
127
|
+
readonly 'plan.retry': "다시 불러오기";
|
|
128
|
+
readonly 'history.title': "크레딧 사용 내역";
|
|
129
|
+
readonly 'history.empty': "아직 표시할 내역이 없습니다.";
|
|
130
|
+
readonly 'history.unresolved': "확인 중";
|
|
131
|
+
readonly 'history.grant': "지급";
|
|
132
|
+
readonly 'history.charge': "사용";
|
|
133
|
+
readonly 'history.hold': "예약 · 정산 전";
|
|
134
|
+
readonly 'history.release': "예약 해제";
|
|
135
|
+
readonly 'credits.choosePlan': "충전할 크레딧";
|
|
136
|
+
readonly 'credits.rechargeDescription': "필요한 만큼 선택하고, 금액과 제공 조건을 확인하세요.";
|
|
137
|
+
readonly 'credits.paymentAmount': "결제 금액";
|
|
138
|
+
readonly 'credits.paymentPending': "결제 상태 확인 중";
|
|
139
|
+
readonly 'credits.remaining': "현재 남은 크레딧";
|
|
140
|
+
readonly 'credits.available': "사용 가능 크레딧";
|
|
141
|
+
readonly 'credits.unit': "크레딧";
|
|
142
|
+
readonly 'credits.held': "예약 중";
|
|
143
|
+
readonly 'credits.spent': "누적 사용";
|
|
144
|
+
readonly 'credits.charged': "차감";
|
|
145
|
+
readonly 'credits.low': "남은 크레딧이 적습니다.";
|
|
146
|
+
readonly 'credits.recharge': "크레딧 충전";
|
|
147
|
+
readonly 'credits.checkout': "결제 진행";
|
|
148
|
+
readonly 'credits.noPlans': "현재 충전 가능한 상품이 없습니다.";
|
|
149
|
+
readonly 'aiTask.title': "AI 작업";
|
|
150
|
+
readonly 'aiTask.idle': "작업 전";
|
|
151
|
+
readonly 'aiTask.queued': "실행 대기";
|
|
152
|
+
readonly 'aiTask.running': "실행 중";
|
|
153
|
+
readonly 'aiTask.succeeded': "완료";
|
|
154
|
+
readonly 'aiTask.failed': "실패";
|
|
155
|
+
readonly 'aiTask.cancelled': "취소됨";
|
|
156
|
+
readonly 'aiTask.needs_attention': "결과 확인 필요";
|
|
157
|
+
readonly 'aiTask.attentionDescription': "결과와 사용량을 확인하고 있습니다. 확인이 끝날 때까지 예약 크레딧이 유지됩니다.";
|
|
14
158
|
readonly close: "닫기";
|
|
15
159
|
readonly 'modal.close': "모달 닫기";
|
|
16
160
|
readonly 'drawer.close': "드로어 닫기";
|
|
@@ -53,6 +197,15 @@ declare const DEFAULT_STRINGS: {
|
|
|
53
197
|
readonly 'input.clearSearch': "검색어 지우기";
|
|
54
198
|
readonly 'verify.done': "인증 완료";
|
|
55
199
|
readonly 'verify.phoneDone': "휴대폰 번호 인증이 완료되었습니다.";
|
|
200
|
+
readonly 'bentoCard.cta': "자세히 보기";
|
|
201
|
+
readonly 'tweetCard.loading': "트윗을 불러오는 중입니다...";
|
|
202
|
+
readonly 'tweetCard.error': "트윗을 불러올 수 없습니다.";
|
|
203
|
+
readonly 'tweetCard.viewOnTwitter': "X에서 보기";
|
|
204
|
+
readonly 'tweetCard.like': "좋아요";
|
|
205
|
+
readonly 'tweetCard.retweet': "리포스트";
|
|
206
|
+
readonly 'tweetCard.reply': "답글";
|
|
207
|
+
readonly 'tweetCard.verified': "인증된 계정";
|
|
208
|
+
readonly 'tweetCard.retry': "다시 시도";
|
|
56
209
|
};
|
|
57
210
|
type DbStringKey = keyof typeof DEFAULT_STRINGS;
|
|
58
211
|
type DbStrings = Partial<Record<DbStringKey, string>> & Record<string, string>;
|
package/dist/esm/core/i18n.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={close:"닫기","modal.close":"모달 닫기","drawer.close":"드로어 닫기","dialog.close":"대화상자 닫기","toast.close":"알림 닫기",clear:"지우기",clearAll:"모든 값 지우기",loading:"로딩 중",required:"필수",optional:"선택",error:"오류",success:"성공",warning:"경고",info:"안내",previous:"이전",next:"다음","select.placeholder":"선택하세요","select.noResults":"결과 없음","navigationRail.label":"주요 내비게이션","navigationRail.newNotification":"새 알림","navigationRail.notifications":"알림","tabs.label":"탭 목록","pagination.label":"페이지 번호","search.label":"검색","media.play":"재생","media.pause":"일시정지","media.mute":"음소거","media.unmute":"음소거 해제","media.settings":"설정","media.shuffle":"셔플","media.repeat":"반복","media.previous":"이전 트랙","media.next":"다음 트랙","media.fullscreen":"전체화면","carousel.previous":"이전 슬라이드","carousel.next":"다음 슬라이드","breadcrumbs.expand":"생략된 경로 펼치기","input.showPassword":"비밀번호 보기","input.hidePassword":"비밀번호 숨기기","input.clearSearch":"검색어 지우기","verify.done":"인증 완료","verify.phoneDone":"휴대폰 번호 인증이 완료되었습니다."};let a={};function dbSetLocale(e){a={...a,...e}}function dbResetLocale(){a={}}function t(i,
|
|
1
|
+
const e={"aiElement.emptyFolder":"빈 폴더","aiElement.noFiles":"표시할 파일이 없습니다.","attachment.title":"첨부 파일","attachment.empty":"아직 첨부한 파일이 없습니다.","attachment.queued":"대기 중","attachment.uploading":"업로드 중","attachment.processing":"서버 처리 중","attachment.ready":"완료","attachment.error":"실패","attachment.cancelled":"취소됨","attachment.unknown":"진행률을 확인하고 있어요.","attachment.cancel":"취소","attachment.retry":"재시도","attachment.remove":"목록에서 제거","attachment.open":"상세 보기","attachment.reload":"다시 불러오기","workspace.members":"워크스페이스 멤버","workspace.invite":"멤버 초대","workspace.email":"이메일","workspace.role":"초대 역할","workspace.chooseRole":"역할을 선택하세요","workspace.description":"함께 작업할 사람의 이메일과 역할을 확인하세요.","workspace.submit":"초대 요청","workspace.emailError":"254자 이내의 올바른 이메일 주소를 입력해 주세요.","workspace.roleError":"초대할 역할을 선택해 주세요.","workspace.retry":"다시 불러오기","workspace.reinvite":"다시 초대","workspace.active":"이용 중","workspace.invited":"초대 대기","workspace.expired":"초대 만료","workspace.empty":"아직 표시할 멤버가 없습니다.","aiElement.pending":"대기 중","aiElement.running":"진행 중","aiElement.complete":"완료","aiElement.error":"실패","aiElement.cancelled":"취소됨","aiElement.approval":"승인 대기","aiElement.researching":"자료를 확인하고 있어요","aiElement.researched":"작업 과정 살펴보기","aiElement.thinking":"생각 정리 중","aiElement.reasoning":"응답 요약","aiElement.plan":"작업 계획","aiElement.queue":"대기 중인 요청","aiElement.remove":"제거","aiElement.queueEmpty":"대기 중인 요청이 없습니다.","aiElement.sources":"참고한 출처","aiElement.citation":"출처","aiElement.checkpoint":"체크포인트 저장됨","aiElement.restore":"여기부터 복원","aiElement.confirmation":"이 작업을 진행할까요?","aiElement.allow":"허용","aiElement.reject":"거절","aiElement.accepted":"작업을 허용했습니다.","aiElement.rejected":"작업을 거절했습니다.","aiElement.context":"컨텍스트","aiElement.tokens":"토큰","aiElement.unknown":"사용량을 아직 확인할 수 없습니다.","aiElement.files":"작업 파일","aiElement.task":"작업 진행","aiElement.subagent":"보조 에이전트","aiElement.tool":"도구 실행","aiElement.terminal":"터미널","aiElement.stackTrace":"오류 상세","aiElement.tests":"테스트 결과","aiElement.passed":"통과","aiElement.failed":"실패","aiElement.input":"입력","aiElement.output":"출력","aiElement.user":"사용자","aiElement.assistant":"AI 응답","aiElement.copy":"복사","aiElement.regenerate":"다시 생성","aiElement.like":"좋아요","aiElement.dislike":"싫어요","aiElement.latest":"최신 응답으로","aiElement.conversation":"AI와의 대화","notification.title":"알림","notification.filters":"알림 필터","notification.all":"전체","notification.unread":"안 읽음","notification.readAll":"표시된 알림 모두 읽음","notification.markRead":"읽음으로 표시","notification.retry":"다시 불러오기","notification.empty":"아직 도착한 알림이 없습니다.","notification.caughtUp":"모든 알림을 확인했어요.","notification.countUnknown":"확인 필요","aiModel.label":"사용 모델","aiModel.choose":"모델을 선택하세요","aiModel.empty":"현재 사용할 수 있는 모델이 없습니다.","aiModel.capabilities":"지원 작업","aiModel.usage":"사용량 단위","aiQuote.expires":"견적 유효 시간","aiQuote.title":"실행 전 견적","aiQuote.reserved":"예약할 최대 크레딧","aiQuote.providerCost":"예상 제공사 비용","aiQuote.pricingVersion":"가격표 버전","aiQuote.unknown":"미확정","aiQuote.idle":"모델과 요청 내용을 정한 뒤 견적을 확인하세요.","aiQuote.loading":"견적을 확인하고 있습니다.","aiQuote.executing":"요청을 처리하고 있습니다. 중복 실행하지 마세요.","aiQuote.stale":"모델 또는 입력이 변경됐습니다. 견적을 다시 확인하세요.","aiQuote.expired":"견적이 만료됐습니다. 견적을 다시 확인하세요.","aiQuote.balanceUnknown":"잔액을 확인할 수 없습니다. 새로 확인해 주세요.","aiQuote.insufficient":"추가로 필요한 크레딧:","aiQuote.ready":"실행 시 최대 크레딧을 예약하고, 결과 확인 후 실제 사용량으로 정산합니다.","aiQuote.refresh":"견적 다시 확인","aiQuote.request":"견적 확인","aiQuote.execute":"실행하기","plan.current":"현재 플랜","plan.usage":"이번 기간 사용","plan.allowed":"이용 가능","plan.locked":"미포함","plan.manage":"플랜 관리","plan.retry":"다시 불러오기","history.title":"크레딧 사용 내역","history.empty":"아직 표시할 내역이 없습니다.","history.unresolved":"확인 중","history.grant":"지급","history.charge":"사용","history.hold":"예약 · 정산 전","history.release":"예약 해제","credits.choosePlan":"충전할 크레딧","credits.rechargeDescription":"필요한 만큼 선택하고, 금액과 제공 조건을 확인하세요.","credits.paymentAmount":"결제 금액","credits.paymentPending":"결제 상태 확인 중","credits.remaining":"현재 남은 크레딧","credits.available":"사용 가능 크레딧","credits.unit":"크레딧","credits.held":"예약 중","credits.spent":"누적 사용","credits.charged":"차감","credits.low":"남은 크레딧이 적습니다.","credits.recharge":"크레딧 충전","credits.checkout":"결제 진행","credits.noPlans":"현재 충전 가능한 상품이 없습니다.","aiTask.title":"AI 작업","aiTask.idle":"작업 전","aiTask.queued":"실행 대기","aiTask.running":"실행 중","aiTask.succeeded":"완료","aiTask.failed":"실패","aiTask.cancelled":"취소됨","aiTask.needs_attention":"결과 확인 필요","aiTask.attentionDescription":"결과와 사용량을 확인하고 있습니다. 확인이 끝날 때까지 예약 크레딧이 유지됩니다.",close:"닫기","modal.close":"모달 닫기","drawer.close":"드로어 닫기","dialog.close":"대화상자 닫기","toast.close":"알림 닫기",clear:"지우기",clearAll:"모든 값 지우기",loading:"로딩 중",required:"필수",optional:"선택",error:"오류",success:"성공",warning:"경고",info:"안내",previous:"이전",next:"다음","select.placeholder":"선택하세요","select.noResults":"결과 없음","navigationRail.label":"주요 내비게이션","navigationRail.newNotification":"새 알림","navigationRail.notifications":"알림","tabs.label":"탭 목록","pagination.label":"페이지 번호","search.label":"검색","media.play":"재생","media.pause":"일시정지","media.mute":"음소거","media.unmute":"음소거 해제","media.settings":"설정","media.shuffle":"셔플","media.repeat":"반복","media.previous":"이전 트랙","media.next":"다음 트랙","media.fullscreen":"전체화면","carousel.previous":"이전 슬라이드","carousel.next":"다음 슬라이드","breadcrumbs.expand":"생략된 경로 펼치기","input.showPassword":"비밀번호 보기","input.hidePassword":"비밀번호 숨기기","input.clearSearch":"검색어 지우기","verify.done":"인증 완료","verify.phoneDone":"휴대폰 번호 인증이 완료되었습니다.","bentoCard.cta":"자세히 보기","tweetCard.loading":"트윗을 불러오는 중입니다...","tweetCard.error":"트윗을 불러올 수 없습니다.","tweetCard.viewOnTwitter":"X에서 보기","tweetCard.like":"좋아요","tweetCard.retweet":"리포스트","tweetCard.reply":"답글","tweetCard.verified":"인증된 계정","tweetCard.retry":"다시 시도"};let a={};function dbSetLocale(e){a={...a,...e}}function dbResetLocale(){a={}}function t(i,n){return i in a?a[i]:i in e?e[i]:n??i}function labelFrom(e,a,i){return e.getAttribute(a)||t(i)}export{dbResetLocale,dbSetLocale,labelFrom,t};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Product-supplied presentation data; no URLs, user ids or delivery policy. */
|
|
2
|
+
interface DbNotificationItem {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
dateLabel: string;
|
|
7
|
+
unread: boolean;
|
|
8
|
+
categoryLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
interface DbNotificationAction {
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
interface DbNotificationReadAll {
|
|
14
|
+
ids: string[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type { DbNotificationAction, DbNotificationItem, DbNotificationReadAll };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function parseNotifications(t){if(!Array.isArray(t))return[];const e=new Set;return t.filter(t=>!(!t||"object"!=typeof t||"string"!=typeof t.id||!t.id||e.has(t.id)||"string"!=typeof t.title||"string"!=typeof t.description||"string"!=typeof t.dateLabel||"boolean"!=typeof t.unread||void 0!==t.categoryLabel&&"string"!=typeof t.categoryLabel)&&(e.add(t.id),!0)).map(t=>({...t}))}export{parseNotifications};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
declare const PAYMENT_BRANDS: readonly [{
|
|
2
|
+
readonly id: "visa";
|
|
3
|
+
readonly label: "Visa";
|
|
4
|
+
readonly src: string;
|
|
5
|
+
readonly cardSrc: string;
|
|
6
|
+
}, {
|
|
7
|
+
readonly id: "mastercard";
|
|
8
|
+
readonly label: "Mastercard";
|
|
9
|
+
readonly src: string;
|
|
10
|
+
readonly cardSrc: string;
|
|
11
|
+
}, {
|
|
12
|
+
readonly id: "american-express";
|
|
13
|
+
readonly label: "American Express";
|
|
14
|
+
readonly src: string;
|
|
15
|
+
}, {
|
|
16
|
+
readonly id: "discover";
|
|
17
|
+
readonly label: "Discover";
|
|
18
|
+
readonly src: string;
|
|
19
|
+
}, {
|
|
20
|
+
readonly id: "jcb";
|
|
21
|
+
readonly label: "JCB";
|
|
22
|
+
readonly src: string;
|
|
23
|
+
}, {
|
|
24
|
+
readonly id: "unionpay";
|
|
25
|
+
readonly label: "UnionPay";
|
|
26
|
+
readonly src: string;
|
|
27
|
+
}];
|
|
28
|
+
declare function getPaymentBrand(network: string): {
|
|
29
|
+
readonly id: "visa";
|
|
30
|
+
readonly label: "Visa";
|
|
31
|
+
readonly src: string;
|
|
32
|
+
readonly cardSrc: string;
|
|
33
|
+
} | {
|
|
34
|
+
readonly id: "mastercard";
|
|
35
|
+
readonly label: "Mastercard";
|
|
36
|
+
readonly src: string;
|
|
37
|
+
readonly cardSrc: string;
|
|
38
|
+
} | {
|
|
39
|
+
readonly id: "american-express";
|
|
40
|
+
readonly label: "American Express";
|
|
41
|
+
readonly src: string;
|
|
42
|
+
} | {
|
|
43
|
+
readonly id: "discover";
|
|
44
|
+
readonly label: "Discover";
|
|
45
|
+
readonly src: string;
|
|
46
|
+
} | {
|
|
47
|
+
readonly id: "jcb";
|
|
48
|
+
readonly label: "JCB";
|
|
49
|
+
readonly src: string;
|
|
50
|
+
} | {
|
|
51
|
+
readonly id: "unionpay";
|
|
52
|
+
readonly label: "UnionPay";
|
|
53
|
+
readonly src: string;
|
|
54
|
+
} | undefined;
|
|
55
|
+
|
|
56
|
+
export { PAYMENT_BRANDS, getPaymentBrand };
|