@loafacto/ui 0.8.6 → 0.8.8
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/index.d.ts +1 -0
- package/dist/index.js +72 -2
- package/dist/index.js.map +1 -1
- package/dist/loafacto-ui.css +53 -53
- package/dist/services.d.ts +33 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -54,4 +54,5 @@ export { useConfirm } from './composables/useConfirm';
|
|
|
54
54
|
export { applyTheme, DARK_THEME, LIGHT_THEME, DEFAULT_THEME, type ThemeConfig, } from './theme/applyTheme';
|
|
55
55
|
export { initTheme, useTheme, type ThemeMode } from './theme/useTheme';
|
|
56
56
|
export { deriveSemanticPalette, applySemanticPalette, isLightBackground, colorToRgb, hexToRgb, luminance, contrastRatio, type SemanticPalette, } from './theme/themeColors';
|
|
57
|
+
export { LOAFACTO_SERVICES, serviceIdForPath, isServicePath, } from './services';
|
|
57
58
|
export type { ServiceDescriptor, ShellUser, ShortcutLink, LfOption, LfTableColumn, LfTableSort, } from './types';
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,73 @@ import { readonly, ref, openBlock, createElementBlock, createStaticVNode, create
|
|
|
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";
|
|
5
|
+
const LOAFACTO_SERVICES = [
|
|
6
|
+
{
|
|
7
|
+
/**
|
|
8
|
+
* 매크로 — **여기 한 줄이 이 서비스의 첫인상 전부다.**
|
|
9
|
+
*
|
|
10
|
+
* 「반복 작업 자동화 매크로 편집·실행」이었던 때가 있다. 만드는 사람의 말이라 무엇이
|
|
11
|
+
* 좋아지는지는 안 나오고, 「편집·실행」은 어느 도구에나 붙는 말이다.
|
|
12
|
+
*
|
|
13
|
+
* 그리고 이 서비스에는 다른 서비스에 없는 전제가 있다 — **윈도우 PC 한 대가 켜져
|
|
14
|
+
* 있어야 한다.** 내 PC 에 러너를 깔아야 돌아가기 때문이다. 그걸 모르고 들어가면
|
|
15
|
+
* 로그인까지 마친 뒤에야 알게 되고, 그때는 빈 기기 화면을 보고 떠난다.
|
|
16
|
+
*
|
|
17
|
+
* **requiresAuth 를 걸지 않는다.** 카드를 눌렀을 때 로그인 모달이 먼저 서면 「이게
|
|
18
|
+
* 뭘 해 주는 물건인지」를 모른 채 벽을 만난다 — 그러면 그 자리에서 로그인할 이유가
|
|
19
|
+
* 없다. 에이전트와 같은 이유이고, 이제 macro 도 같은 조건을 갖췄다: /macro 는 로그인
|
|
20
|
+
* 안 한 사람에게 **소개 화면**을 보여준다(진짜 흐름도 한 장, 무엇이 필요한지, 세 걸음).
|
|
21
|
+
* 거기 「로그인하고 시작하기」가 hub 로 보낸다.
|
|
22
|
+
*
|
|
23
|
+
* 콘솔의 내용이 새지는 않는다 — 매크로·기기·실행 기록은 전부 API 가 막고, 로그인
|
|
24
|
+
* 안 한 브라우저에는 소개 화면만 그려진다.
|
|
25
|
+
*/
|
|
26
|
+
id: "macro",
|
|
27
|
+
name: "매크로",
|
|
28
|
+
path: "/macro",
|
|
29
|
+
description: "앱·게임·웹에서 매일 하는 조작을 정한 시각에 대신 눌러 줍니다. 윈도우 PC 한 대가 필요합니다.",
|
|
30
|
+
iconPath: "M13 2 3 14h7l-1 8 10-12h-7l1-8z"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
/**
|
|
34
|
+
* 에이전트 — 다른 서비스와 성격이 다르다. macro 는 loafacto.com 안에서 돌지만,
|
|
35
|
+
* 여기서 만든 에이전트는 **받아 간 서버·PC 에서** 돈다. 이 경로가 맡는 일은
|
|
36
|
+
* 고르고 묶음을 만들어 주는 데까지다. 저장소는 loafacto-agent.
|
|
37
|
+
*
|
|
38
|
+
* 지금 올라가 있는 것은 목업이다. 그래도 **여기에는 표를 달지 않는다** — 상단바의
|
|
39
|
+
* 전환 메뉴는 「어디로 갈 수 있나」를 보는 자리고, 이름 옆의 배지는 그 자리에서
|
|
40
|
+
* 「못 간다」로 읽힌다. 실제로는 눌리고 들어가진다.
|
|
41
|
+
*
|
|
42
|
+
* 완성품이 아니라는 사실은 목적지가 말하는 것이 맞다 — /agent 의 첫 화면이 스스로
|
|
43
|
+
* 목업이라고 밝힌다. 그래야 「눌러도 되나」와 「이게 완성품인가」가 섞이지 않는다.
|
|
44
|
+
* badge 필드는 그대로 둔다. 베타처럼 정말 목록에서 알려야 할 것이 생길 자리다.
|
|
45
|
+
*
|
|
46
|
+
* **requiresAuth 를 걸지 않는다.** 로그인이 필요한 서비스인 것은 맞지만, 카드를
|
|
47
|
+
* 눌렀을 때 로그인 모달이 먼저 서면 「이게 뭘 해 주는 물건인지」를 모른 채 벽을
|
|
48
|
+
* 만난다 — 그러면 로그인할 이유가 없다. 대신 /agent 가 자기 소개 화면을 보여주고
|
|
49
|
+
* 거기서 로그인으로 보낸다(loafacto-agent 의 LoginGate). 카탈로그·내 에이전트는
|
|
50
|
+
* 그 화면이 가리므로 여기서 막지 않아도 새는 것이 없다.
|
|
51
|
+
*
|
|
52
|
+
* macro 도 같아졌다 — 예전에는 첫 화면부터 기기 목록이라 로그인 없이 보여줄 것이
|
|
53
|
+
* 없었지만, 지금은 소개 화면이 그 자리에 선다.
|
|
54
|
+
*/
|
|
55
|
+
id: "agent",
|
|
56
|
+
name: "에이전트",
|
|
57
|
+
path: "/agent",
|
|
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"
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
function isUnder(pathname, servicePath) {
|
|
63
|
+
return pathname === servicePath || pathname.startsWith(`${servicePath}/`);
|
|
64
|
+
}
|
|
65
|
+
function serviceIdForPath(pathname, services = LOAFACTO_SERVICES) {
|
|
66
|
+
var _a;
|
|
67
|
+
return (_a = services.find((s) => isUnder(pathname, s.path))) == null ? void 0 : _a.id;
|
|
68
|
+
}
|
|
69
|
+
function isServicePath(pathname, services = LOAFACTO_SERVICES) {
|
|
70
|
+
return services.some((s) => isUnder(pathname, s.path));
|
|
71
|
+
}
|
|
5
72
|
const STORAGE_KEY = "lf-theme";
|
|
6
73
|
const OS_QUERY = "(prefers-color-scheme: light)";
|
|
7
74
|
function readStored() {
|
|
@@ -199,7 +266,7 @@ const ICON_MOON = "M12.3 3a7 7 0 1 0 8.7 8.7A9 9 0 1 1 12.3 3z";
|
|
|
199
266
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
200
267
|
__name: "AppShell",
|
|
201
268
|
props: {
|
|
202
|
-
services: { default: () =>
|
|
269
|
+
services: { default: () => LOAFACTO_SERVICES },
|
|
203
270
|
currentServiceId: {},
|
|
204
271
|
shortcuts: { default: () => [] },
|
|
205
272
|
themeToggle: { type: Boolean, default: true },
|
|
@@ -454,7 +521,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
454
521
|
};
|
|
455
522
|
}
|
|
456
523
|
});
|
|
457
|
-
const AppShell = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-
|
|
524
|
+
const AppShell = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-513c839a"]]);
|
|
458
525
|
function generateId() {
|
|
459
526
|
return `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
460
527
|
}
|
|
@@ -2674,6 +2741,7 @@ export {
|
|
|
2674
2741
|
b as DEFAULT_THEME,
|
|
2675
2742
|
LF_ICONS,
|
|
2676
2743
|
LIGHT_THEME,
|
|
2744
|
+
LOAFACTO_SERVICES,
|
|
2677
2745
|
LfAlert,
|
|
2678
2746
|
LfAvatar,
|
|
2679
2747
|
LfBadge,
|
|
@@ -2708,7 +2776,9 @@ export {
|
|
|
2708
2776
|
h as hexToRgb,
|
|
2709
2777
|
initTheme,
|
|
2710
2778
|
i as isLightBackground,
|
|
2779
|
+
isServicePath,
|
|
2711
2780
|
l as luminance,
|
|
2781
|
+
serviceIdForPath,
|
|
2712
2782
|
useConfirm,
|
|
2713
2783
|
useConfirmStore,
|
|
2714
2784
|
useLoadingStore,
|