@loafacto/ui 0.8.7 → 0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/LfModal.vue.d.ts +33 -1
- package/dist/index.js +45 -16
- package/dist/index.js.map +1 -1
- package/dist/loafacto-ui.css +53 -53
- package/package.json +1 -1
|
@@ -4,7 +4,37 @@ type __VLS_Props = {
|
|
|
4
4
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
5
5
|
/** 화면 높이를 거의 채운다. 목록·에디터처럼 내용이 긴 모달용. */
|
|
6
6
|
fullHeight?: boolean;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* 바깥(스크림)을 눌러 닫을 수 있게 한다. **기본은 닫지 않는다.**
|
|
9
|
+
*
|
|
10
|
+
* 예전에는 기본이 반대였다. 그러자 입력이 있는 모달마다 하나씩 `persistent` 를
|
|
11
|
+
* 손으로 달게 됐다 — hub 에서만 로그인·비밀번호 찾기·프로필 편집·비밀번호 재설정·
|
|
12
|
+
* 소셜 연동 확인·변경 이력·공지까지 13곳이 그랬다. **매번 켜야 하는 옵션이면
|
|
13
|
+
* 그게 기본값이어야 한다.**
|
|
14
|
+
*
|
|
15
|
+
* 값이 대칭이 아닌 것이 결정적이다. 바깥 클릭은 사고로 가장 쉽게 나오는 동작이고
|
|
16
|
+
* (스크롤하려고, 창에 포커스 주려고, 툴팁 지우려고 누른다) 그 대가는 적던 내용이
|
|
17
|
+
* 말없이 사라지는 것이다. 반대쪽 대가는 X 를 한 번 더 누르는 것뿐이다.
|
|
18
|
+
*
|
|
19
|
+
* 갇히지도 않는다 — `closable` 이 기본으로 켜져 있어 닫기 버튼이 늘 있다.
|
|
20
|
+
* 읽기만 하는 모달(상세 보기·미리 보기)처럼 잃을 것이 없으면 이 값을 켜면 된다.
|
|
21
|
+
*/
|
|
22
|
+
closeOnScrim?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* ESC 로 닫을 수 있게 한다. **기본은 닫는다.**
|
|
25
|
+
*
|
|
26
|
+
* 스크림과 한 덩어리로 다루면 안 된다. ESC 는 사고로 눌리지 않고, 의도적이며,
|
|
27
|
+
* 키보드 사용자에게는 유일한 탈출구다 — WAI-ARIA 의 dialog 패턴이 요구하는
|
|
28
|
+
* 동작이기도 하다. 끄는 것은 대답을 받아야만 넘어가는 모달에서만 뜻이 있다.
|
|
29
|
+
*/
|
|
30
|
+
closeOnEsc?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 바깥 클릭과 ESC 를 **함께** 막는다.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated 기본값이 뒤집히면서 스크림 쪽으로는 할 일이 없어졌다. ESC 까지
|
|
35
|
+
* 막아야 하는 자리면 `:close-on-esc="false"` 를 쓰는 편이 무엇을 끄는지 분명하다.
|
|
36
|
+
* 이미 달려 있는 곳(hub 13곳)이 조용히 뜻을 바꾸지 않도록 남겨 둔다.
|
|
37
|
+
*/
|
|
8
38
|
persistent?: boolean;
|
|
9
39
|
/** 닫기 버튼을 놓을지. */
|
|
10
40
|
closable?: boolean;
|
|
@@ -32,6 +62,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
32
62
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
33
63
|
}>, {
|
|
34
64
|
size: "sm" | "md" | "lg" | "xl";
|
|
65
|
+
closeOnScrim: boolean;
|
|
66
|
+
closeOnEsc: boolean;
|
|
35
67
|
closable: boolean;
|
|
36
68
|
closeLabel: string;
|
|
37
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readonly, ref, openBlock, createElementBlock, createStaticVNode, createElementVNode, defineComponent, computed, watch, onBeforeUnmount, normalizeStyle, createCommentVNode, Fragment, toDisplayString, createVNode, renderList, normalizeClass, renderSlot, unref, onUnmounted, createBlock, Teleport, TransitionGroup, withCtx, withModifiers, Transition, useTemplateRef, nextTick, createTextVNode, withDirectives, withKeys, vModelText, resolveDynamicComponent, useModel, useId, mergeProps, vModelDynamic, mergeModels,
|
|
1
|
+
import { readonly, ref, openBlock, createElementBlock, createStaticVNode, createElementVNode, defineComponent, computed, watch, onBeforeUnmount, normalizeStyle, createCommentVNode, Fragment, toDisplayString, createVNode, renderList, normalizeClass, renderSlot, unref, onUnmounted, createBlock, Teleport, TransitionGroup, withCtx, withModifiers, Transition, useTemplateRef, onMounted, nextTick, createTextVNode, withDirectives, withKeys, vModelText, resolveDynamicComponent, useModel, useId, mergeProps, vModelDynamic, mergeModels, vModelSelect, vModelCheckbox, vModelRadio, useSlots } from "vue";
|
|
2
2
|
import { a as applyTheme, D as DARK_THEME, L as LIGHT_THEME } from "./applyTheme-EBr0eOKY.js";
|
|
3
3
|
import { b, c, d, e, f, h, i, l } from "./applyTheme-EBr0eOKY.js";
|
|
4
4
|
import { defineStore } from "pinia";
|
|
@@ -13,30 +13,50 @@ const LOAFACTO_SERVICES = [
|
|
|
13
13
|
* 그리고 이 서비스에는 다른 서비스에 없는 전제가 있다 — **윈도우 PC 한 대가 켜져
|
|
14
14
|
* 있어야 한다.** 내 PC 에 러너를 깔아야 돌아가기 때문이다. 그걸 모르고 들어가면
|
|
15
15
|
* 로그인까지 마친 뒤에야 알게 되고, 그때는 빈 기기 화면을 보고 떠난다.
|
|
16
|
+
*
|
|
17
|
+
* **requiresAuth 를 걸지 않는다.** 카드를 눌렀을 때 로그인 모달이 먼저 서면 「이게
|
|
18
|
+
* 뭘 해 주는 물건인지」를 모른 채 벽을 만난다 — 그러면 그 자리에서 로그인할 이유가
|
|
19
|
+
* 없다. 에이전트와 같은 이유이고, 이제 macro 도 같은 조건을 갖췄다: /macro 는 로그인
|
|
20
|
+
* 안 한 사람에게 **소개 화면**을 보여준다(진짜 흐름도 한 장, 무엇이 필요한지, 세 걸음).
|
|
21
|
+
* 거기 「로그인하고 시작하기」가 hub 로 보낸다.
|
|
22
|
+
*
|
|
23
|
+
* 콘솔의 내용이 새지는 않는다 — 매크로·기기·실행 기록은 전부 API 가 막고, 로그인
|
|
24
|
+
* 안 한 브라우저에는 소개 화면만 그려진다.
|
|
16
25
|
*/
|
|
17
26
|
id: "macro",
|
|
18
27
|
name: "매크로",
|
|
19
28
|
path: "/macro",
|
|
20
29
|
description: "앱·게임·웹에서 매일 하는 조작을 정한 시각에 대신 눌러 줍니다. 윈도우 PC 한 대가 필요합니다.",
|
|
21
|
-
iconPath: "M13 2 3 14h7l-1 8 10-12h-7l1-8z"
|
|
22
|
-
requiresAuth: true
|
|
30
|
+
iconPath: "M13 2 3 14h7l-1 8 10-12h-7l1-8z"
|
|
23
31
|
},
|
|
24
32
|
{
|
|
25
33
|
/**
|
|
26
|
-
* 에이전트 — 다른 서비스와 성격이 다르다. macro 는 loafacto.com 안에서
|
|
27
|
-
*
|
|
28
|
-
*
|
|
34
|
+
* 에이전트 — 다른 서비스와 성격이 다르다. macro 는 loafacto.com 안에서 돌지만,
|
|
35
|
+
* 여기서 만든 에이전트는 **받아 간 서버·PC 에서** 돈다. 이 경로가 맡는 일은
|
|
36
|
+
* 고르고 묶음을 만들어 주는 데까지다. 저장소는 loafacto-agent.
|
|
37
|
+
*
|
|
38
|
+
* 지금 올라가 있는 것은 목업이다. 그래도 **여기에는 표를 달지 않는다** — 상단바의
|
|
39
|
+
* 전환 메뉴는 「어디로 갈 수 있나」를 보는 자리고, 이름 옆의 배지는 그 자리에서
|
|
40
|
+
* 「못 간다」로 읽힌다. 실제로는 눌리고 들어가진다.
|
|
41
|
+
*
|
|
42
|
+
* 완성품이 아니라는 사실은 목적지가 말하는 것이 맞다 — /agent 의 첫 화면이 스스로
|
|
43
|
+
* 목업이라고 밝힌다. 그래야 「눌러도 되나」와 「이게 완성품인가」가 섞이지 않는다.
|
|
44
|
+
* badge 필드는 그대로 둔다. 베타처럼 정말 목록에서 알려야 할 것이 생길 자리다.
|
|
29
45
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
46
|
+
* **requiresAuth 를 걸지 않는다.** 로그인이 필요한 서비스인 것은 맞지만, 카드를
|
|
47
|
+
* 눌렀을 때 로그인 모달이 먼저 서면 「이게 뭘 해 주는 물건인지」를 모른 채 벽을
|
|
48
|
+
* 만난다 — 그러면 로그인할 이유가 없다. 대신 /agent 가 자기 소개 화면을 보여주고
|
|
49
|
+
* 거기서 로그인으로 보낸다(loafacto-agent 의 LoginGate). 카탈로그·내 에이전트는
|
|
50
|
+
* 그 화면이 가리므로 여기서 막지 않아도 새는 것이 없다.
|
|
51
|
+
*
|
|
52
|
+
* macro 도 같아졌다 — 예전에는 첫 화면부터 기기 목록이라 로그인 없이 보여줄 것이
|
|
53
|
+
* 없었지만, 지금은 소개 화면이 그 자리에 선다.
|
|
32
54
|
*/
|
|
33
55
|
id: "agent",
|
|
34
56
|
name: "에이전트",
|
|
35
57
|
path: "/agent",
|
|
36
|
-
description: "
|
|
37
|
-
|
|
38
|
-
iconPath: "M12 2a2 2 0 0 1 2 2v1h3a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h3V4a2 2 0 0 1 2-2zm-3 9a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm6 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z",
|
|
39
|
-
requiresAuth: true
|
|
58
|
+
description: "필요한 도구·스킬만 골라 에이전트를 만들고, 내 서버나 PC 에서 띄웁니다.",
|
|
59
|
+
iconPath: "M12 2a2 2 0 0 1 2 2v1h3a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h3V4a2 2 0 0 1 2-2zm-3 9a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm6 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"
|
|
40
60
|
}
|
|
41
61
|
];
|
|
42
62
|
function isUnder(pathname, servicePath) {
|
|
@@ -747,6 +767,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
747
767
|
setup(__props) {
|
|
748
768
|
const store = useConfirmStore();
|
|
749
769
|
const requireInput = useTemplateRef("requireInput");
|
|
770
|
+
function onKeydown(e2) {
|
|
771
|
+
if (e2.key !== "Escape" || !store.open) return;
|
|
772
|
+
e2.stopPropagation();
|
|
773
|
+
store.resolve(false);
|
|
774
|
+
}
|
|
775
|
+
onMounted(() => document.addEventListener("keydown", onKeydown));
|
|
776
|
+
onBeforeUnmount(() => document.removeEventListener("keydown", onKeydown));
|
|
750
777
|
watch(
|
|
751
778
|
() => store.open,
|
|
752
779
|
async (open) => {
|
|
@@ -808,7 +835,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
808
835
|
};
|
|
809
836
|
}
|
|
810
837
|
});
|
|
811
|
-
const AppConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
838
|
+
const AppConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-d4c67de1"]]);
|
|
812
839
|
const LF_ICONS = {
|
|
813
840
|
close: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",
|
|
814
841
|
search: "M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19 15.5 14zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z",
|
|
@@ -1546,6 +1573,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1546
1573
|
subtitle: {},
|
|
1547
1574
|
size: { default: "md" },
|
|
1548
1575
|
fullHeight: { type: Boolean },
|
|
1576
|
+
closeOnScrim: { type: Boolean, default: false },
|
|
1577
|
+
closeOnEsc: { type: Boolean, default: true },
|
|
1549
1578
|
persistent: { type: Boolean },
|
|
1550
1579
|
closable: { type: Boolean, default: true },
|
|
1551
1580
|
closeLabel: { default: "닫기" },
|
|
@@ -1573,10 +1602,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1573
1602
|
function onScrimClick() {
|
|
1574
1603
|
if (!downOnScrim) return;
|
|
1575
1604
|
downOnScrim = false;
|
|
1576
|
-
if (!props.persistent) close("scrim");
|
|
1605
|
+
if (props.closeOnScrim && !props.persistent) close("scrim");
|
|
1577
1606
|
}
|
|
1578
1607
|
function onKeydown(e2) {
|
|
1579
|
-
if (e2.key === "Escape" && !props.persistent) {
|
|
1608
|
+
if (e2.key === "Escape" && props.closeOnEsc && !props.persistent) {
|
|
1580
1609
|
e2.stopPropagation();
|
|
1581
1610
|
close("esc");
|
|
1582
1611
|
return;
|
|
@@ -1683,7 +1712,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1683
1712
|
};
|
|
1684
1713
|
}
|
|
1685
1714
|
});
|
|
1686
|
-
const LfModal = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
1715
|
+
const LfModal = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-f5492216"]]);
|
|
1687
1716
|
const _hoisted_1$c = {
|
|
1688
1717
|
key: 0,
|
|
1689
1718
|
class: "lf-card__head"
|