pubuilder 0.5.0 → 0.6.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 +73 -0
- package/dist/api.d.ts +1 -0
- package/dist/cli.js +113 -105
- package/dist/index.js +726 -555
- package/dist/index.js.map +1 -1
- package/dist/server/prompt.d.ts +2 -0
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { normalizeIA as
|
|
6
|
-
import { defineIA as
|
|
7
|
-
import { create as
|
|
8
|
-
import { Handle as
|
|
9
|
-
const
|
|
10
|
-
class
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
2
|
+
import { jsxs as a, jsx as e, Fragment as ne } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as se, memo as de, useRef as H, useState as v, useEffect as A, useMemo as K, useContext as le, useLayoutEffect as ue } from "react";
|
|
4
|
+
import { createPortal as pe } from "react-dom";
|
|
5
|
+
import { normalizeIA as be } from "./config.js";
|
|
6
|
+
import { defineIA as et } from "./config.js";
|
|
7
|
+
import { create as fe } from "zustand";
|
|
8
|
+
import { Handle as Q, Position as V, ReactFlow as he } from "@xyflow/react";
|
|
9
|
+
const ge = "http://localhost:4816";
|
|
10
|
+
class J extends Error {
|
|
11
|
+
constructor(o, n) {
|
|
12
|
+
super(o), this.code = n, this.name = "ApiError";
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
class
|
|
16
|
-
constructor(
|
|
17
|
-
this.baseUrl =
|
|
15
|
+
class ae {
|
|
16
|
+
constructor(o = ge) {
|
|
17
|
+
this.baseUrl = o;
|
|
18
18
|
}
|
|
19
|
-
async request(
|
|
20
|
-
const
|
|
21
|
-
...
|
|
22
|
-
headers: { "content-type": "application/json", ...
|
|
19
|
+
async request(o, n) {
|
|
20
|
+
const r = await fetch(`${this.baseUrl}${o}`, {
|
|
21
|
+
...n,
|
|
22
|
+
headers: { "content-type": "application/json", ...n?.headers }
|
|
23
23
|
});
|
|
24
|
-
if (!
|
|
25
|
-
const l = await
|
|
26
|
-
throw new
|
|
24
|
+
if (!r.ok) {
|
|
25
|
+
const l = await r.json().catch(() => ({}));
|
|
26
|
+
throw new J(l.message ?? `요청 실패 (${r.status})`, l.code);
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return r.status === 204 ? void 0 : await r.json();
|
|
29
29
|
}
|
|
30
30
|
async isAlive() {
|
|
31
31
|
try {
|
|
@@ -37,47 +37,47 @@ class re {
|
|
|
37
37
|
listSkills() {
|
|
38
38
|
return this.request("/api/skills");
|
|
39
39
|
}
|
|
40
|
-
toggleSkill(
|
|
41
|
-
return this.request(`/api/skills/${encodeURIComponent(
|
|
40
|
+
toggleSkill(o, n) {
|
|
41
|
+
return this.request(`/api/skills/${encodeURIComponent(o)}`, { method: "PATCH", body: JSON.stringify({ enabled: n }) });
|
|
42
42
|
}
|
|
43
|
-
uploadSkill(
|
|
44
|
-
return this.request("/api/skills", { method: "POST", body: JSON.stringify({ filename:
|
|
43
|
+
uploadSkill(o, n) {
|
|
44
|
+
return this.request("/api/skills", { method: "POST", body: JSON.stringify({ filename: o, content: n }) });
|
|
45
45
|
}
|
|
46
|
-
removeSkill(
|
|
47
|
-
return this.request(`/api/skills/${encodeURIComponent(
|
|
46
|
+
removeSkill(o) {
|
|
47
|
+
return this.request(`/api/skills/${encodeURIComponent(o)}`, { method: "DELETE" });
|
|
48
48
|
}
|
|
49
49
|
tokenStatus() {
|
|
50
50
|
return this.request("/api/settings/figma-token");
|
|
51
51
|
}
|
|
52
|
-
saveToken(
|
|
53
|
-
return this.request("/api/settings/figma-token", { method: "PUT", body: JSON.stringify({ token:
|
|
52
|
+
saveToken(o) {
|
|
53
|
+
return this.request("/api/settings/figma-token", { method: "PUT", body: JSON.stringify({ token: o }) });
|
|
54
54
|
}
|
|
55
55
|
deleteToken() {
|
|
56
56
|
return this.request("/api/settings/figma-token", { method: "DELETE" });
|
|
57
57
|
}
|
|
58
|
-
startPublish(
|
|
59
|
-
return this.request("/api/publish", { method: "POST", body: JSON.stringify(
|
|
58
|
+
startPublish(o) {
|
|
59
|
+
return this.request("/api/publish", { method: "POST", body: JSON.stringify(o) });
|
|
60
60
|
}
|
|
61
|
-
cancelPublish(
|
|
62
|
-
return this.request(`/api/publish/${
|
|
61
|
+
cancelPublish(o) {
|
|
62
|
+
return this.request(`/api/publish/${o}`, { method: "DELETE" });
|
|
63
63
|
}
|
|
64
64
|
/** SSE 구독 — 반환값 호출로 해제 */
|
|
65
|
-
subscribePublish(
|
|
66
|
-
const
|
|
65
|
+
subscribePublish(o, n) {
|
|
66
|
+
const r = new EventSource(`${this.baseUrl}/api/publish/${o}/events`);
|
|
67
67
|
let l = !1;
|
|
68
|
-
return
|
|
69
|
-
const
|
|
70
|
-
(
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
}, () =>
|
|
68
|
+
return r.onmessage = (s) => {
|
|
69
|
+
const c = JSON.parse(s.data);
|
|
70
|
+
(c.type === "done" || c.type === "error") && (l = !0), n(c);
|
|
71
|
+
}, r.onerror = () => {
|
|
72
|
+
r.close(), l || (l = !0, n({ type: "error", text: "서버 연결이 끊겼어요. pubuilder serve 상태를 확인해주세요" }));
|
|
73
|
+
}, () => r.close();
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
function
|
|
76
|
+
const Z = se(new ae());
|
|
77
|
+
function xe() {
|
|
78
78
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const k = fe((t) => ({
|
|
81
81
|
isMapOpen: !1,
|
|
82
82
|
viewerPath: null,
|
|
83
83
|
granularity: "section",
|
|
@@ -85,15 +85,15 @@ const y = ue((e) => ({
|
|
|
85
85
|
selection: null,
|
|
86
86
|
selectedOuterHTML: null,
|
|
87
87
|
skillDrawerOpen: !1,
|
|
88
|
-
openMap: () =>
|
|
89
|
-
closeMap: () =>
|
|
90
|
-
openViewer: (
|
|
91
|
-
closeViewer: () =>
|
|
92
|
-
setGranularity: (
|
|
93
|
-
setInspectEnabled: (
|
|
94
|
-
setSelectionWithHTML: (
|
|
95
|
-
toggleSkillDrawer: () =>
|
|
96
|
-
})), ge = ".react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #555;--xy-background-pattern-lines-color-default: #333;--xy-background-pattern-cross-color-default: #333;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}", he = "pubuilder-styles", me = "pubuilder-xyflow-styles", xe = (
|
|
88
|
+
openMap: () => t({ isMapOpen: !0 }),
|
|
89
|
+
closeMap: () => t({ isMapOpen: !1, viewerPath: null, selection: null, selectedOuterHTML: null }),
|
|
90
|
+
openViewer: (o) => t({ viewerPath: o, selection: null, selectedOuterHTML: null }),
|
|
91
|
+
closeViewer: () => t({ viewerPath: null, selection: null, selectedOuterHTML: null }),
|
|
92
|
+
setGranularity: (o) => t({ granularity: o }),
|
|
93
|
+
setInspectEnabled: (o) => t({ inspectEnabled: o }),
|
|
94
|
+
setSelectionWithHTML: (o, n) => t({ selection: o, selectedOuterHTML: n }),
|
|
95
|
+
toggleSkillDrawer: () => t((o) => ({ skillDrawerOpen: !o.skillDrawerOpen }))
|
|
96
|
+
})), me = ".react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #555;--xy-background-pattern-lines-color-default: #333;--xy-background-pattern-cross-color-default: #333;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}", we = "pubuilder-styles", ye = "pubuilder-xyflow-styles", ve = (
|
|
97
97
|
/* css */
|
|
98
98
|
`
|
|
99
99
|
.pbu-fab {
|
|
@@ -341,7 +341,14 @@ const y = ue((e) => ({
|
|
|
341
341
|
flex-direction: column;
|
|
342
342
|
gap: 8px;
|
|
343
343
|
}
|
|
344
|
-
.pbu-publish
|
|
344
|
+
.pbu-publish-heading {
|
|
345
|
+
display: flex;
|
|
346
|
+
align-items: center;
|
|
347
|
+
justify-content: space-between;
|
|
348
|
+
gap: 8px;
|
|
349
|
+
}
|
|
350
|
+
.pbu-publish-heading > label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #8c8c8c; }
|
|
351
|
+
.pbu-skill-entry { white-space: nowrap; }
|
|
345
352
|
.pbu-publish input {
|
|
346
353
|
background: #1e1e1e;
|
|
347
354
|
border: 1px solid #3c3c3c;
|
|
@@ -368,6 +375,43 @@ const y = ue((e) => ({
|
|
|
368
375
|
.pbu-log-tool { color: #8c8c8c; }
|
|
369
376
|
.pbu-log-error { color: #f2b3b3; }
|
|
370
377
|
.pbu-log-done { color: #89d185; font-weight: 600; }
|
|
378
|
+
.pbu-publish-reply {
|
|
379
|
+
padding-top: 8px;
|
|
380
|
+
border-top: 1px solid #3c3c3c;
|
|
381
|
+
display: flex;
|
|
382
|
+
flex-direction: column;
|
|
383
|
+
gap: 6px;
|
|
384
|
+
}
|
|
385
|
+
.pbu-publish-reply > label {
|
|
386
|
+
color: #cccccc;
|
|
387
|
+
font-size: 11px;
|
|
388
|
+
font-weight: 600;
|
|
389
|
+
}
|
|
390
|
+
.pbu-publish-reply textarea {
|
|
391
|
+
width: 100%;
|
|
392
|
+
min-height: 62px;
|
|
393
|
+
resize: vertical;
|
|
394
|
+
box-sizing: border-box;
|
|
395
|
+
background: #1e1e1e;
|
|
396
|
+
border: 1px solid #4b4b4b;
|
|
397
|
+
border-radius: 2px;
|
|
398
|
+
color: #e6e6e6;
|
|
399
|
+
font: 11px/1.5 ui-monospace, Menlo, monospace;
|
|
400
|
+
padding: 7px 8px;
|
|
401
|
+
outline: none;
|
|
402
|
+
}
|
|
403
|
+
.pbu-publish-reply textarea:focus {
|
|
404
|
+
border-color: #3794ff;
|
|
405
|
+
box-shadow: 0 0 0 1px #3794ff;
|
|
406
|
+
}
|
|
407
|
+
.pbu-publish-reply textarea::placeholder { color: #6f6f6f; }
|
|
408
|
+
.pbu-publish-reply-actions {
|
|
409
|
+
display: flex;
|
|
410
|
+
align-items: center;
|
|
411
|
+
justify-content: space-between;
|
|
412
|
+
gap: 8px;
|
|
413
|
+
}
|
|
414
|
+
.pbu-publish-reply-actions > span { color: #777; font-size: 9px; }
|
|
371
415
|
|
|
372
416
|
.pbu-drawer {
|
|
373
417
|
position: fixed;
|
|
@@ -394,6 +438,50 @@ const y = ue((e) => ({
|
|
|
394
438
|
padding-bottom: 8px;
|
|
395
439
|
border-bottom: 1px solid #3c3c3c;
|
|
396
440
|
}
|
|
441
|
+
.pbu-drawer-header > div { display: flex; flex-direction: column; gap: 2px; }
|
|
442
|
+
.pbu-drawer-kicker { color: #858585; font-size: 9px; letter-spacing: 0.04em; }
|
|
443
|
+
.pbu-drawer-guide {
|
|
444
|
+
background: #1e1e1e;
|
|
445
|
+
border: 1px solid #3c3c3c;
|
|
446
|
+
border-left: 2px solid #3794ff;
|
|
447
|
+
padding: 10px;
|
|
448
|
+
display: flex;
|
|
449
|
+
flex-direction: column;
|
|
450
|
+
gap: 5px;
|
|
451
|
+
line-height: 1.45;
|
|
452
|
+
}
|
|
453
|
+
.pbu-drawer-guide strong { color: #e5e5e5; font-size: 11px; }
|
|
454
|
+
.pbu-drawer-guide > span { color: #9d9d9d; font-size: 10px; }
|
|
455
|
+
.pbu-guide-status { color: #cccccc; font-size: 10px; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
|
|
456
|
+
.pbu-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #777; }
|
|
457
|
+
.pbu-status-dot-on { background: #73c991; box-shadow: 0 0 0 2px rgba(115, 201, 145, 0.12); }
|
|
458
|
+
.pbu-drawer-section-head {
|
|
459
|
+
margin-top: 4px;
|
|
460
|
+
padding-bottom: 7px;
|
|
461
|
+
border-bottom: 1px solid #3c3c3c;
|
|
462
|
+
display: flex;
|
|
463
|
+
align-items: flex-start;
|
|
464
|
+
justify-content: space-between;
|
|
465
|
+
gap: 8px;
|
|
466
|
+
}
|
|
467
|
+
.pbu-drawer-section-head > div { display: flex; flex-direction: column; gap: 2px; }
|
|
468
|
+
.pbu-drawer-section-head strong { color: #e5e5e5; font-size: 11px; }
|
|
469
|
+
.pbu-drawer-section-head div > span { color: #858585; font-size: 9px; line-height: 1.4; }
|
|
470
|
+
.pbu-drawer-section-head-skills { margin-top: 10px; }
|
|
471
|
+
.pbu-status-badge, .pbu-skill-state {
|
|
472
|
+
flex: none;
|
|
473
|
+
border: 1px solid #4a4a4a;
|
|
474
|
+
border-radius: 999px;
|
|
475
|
+
padding: 1px 6px;
|
|
476
|
+
color: #8c8c8c;
|
|
477
|
+
font-size: 9px;
|
|
478
|
+
line-height: 1.5;
|
|
479
|
+
}
|
|
480
|
+
.pbu-status-on, .pbu-skill-state-on { border-color: #3e7651; background: #23362a; color: #89d185; }
|
|
481
|
+
.pbu-status-off { border-color: #765f3e; background: #382f22; color: #cca96a; }
|
|
482
|
+
.pbu-skill-source { margin: 8px 0 4px; display: flex; flex-direction: column; gap: 1px; }
|
|
483
|
+
.pbu-skill-source strong { color: #cccccc; font-size: 10px; }
|
|
484
|
+
.pbu-skill-source span { color: #777; font-size: 9px; line-height: 1.35; }
|
|
397
485
|
.pbu-drawer-group {
|
|
398
486
|
display: flex;
|
|
399
487
|
align-items: center;
|
|
@@ -458,119 +546,118 @@ const y = ue((e) => ({
|
|
|
458
546
|
}
|
|
459
547
|
`
|
|
460
548
|
);
|
|
461
|
-
function
|
|
462
|
-
if (document.getElementById(
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
}
|
|
466
|
-
function
|
|
467
|
-
typeof document > "u" || (
|
|
468
|
-
}
|
|
469
|
-
function
|
|
470
|
-
const
|
|
471
|
-
for (const
|
|
472
|
-
const
|
|
473
|
-
|
|
549
|
+
function ee(t, o) {
|
|
550
|
+
if (document.getElementById(t)) return;
|
|
551
|
+
const n = document.createElement("style");
|
|
552
|
+
n.id = t, n.textContent = o, document.head.appendChild(n);
|
|
553
|
+
}
|
|
554
|
+
function ke() {
|
|
555
|
+
typeof document > "u" || (ee(ye, me), ee(we, ve));
|
|
556
|
+
}
|
|
557
|
+
function _e(t, o, n, r = 140, l = 48) {
|
|
558
|
+
const s = /* @__PURE__ */ new Map();
|
|
559
|
+
for (const g of t) {
|
|
560
|
+
const p = s.get(g.parentId) ?? [];
|
|
561
|
+
p.push(g), s.set(g.parentId, p);
|
|
474
562
|
}
|
|
475
|
-
const
|
|
476
|
-
let
|
|
477
|
-
const
|
|
478
|
-
const
|
|
479
|
-
let
|
|
480
|
-
if (
|
|
481
|
-
|
|
563
|
+
const c = /* @__PURE__ */ new Map();
|
|
564
|
+
let i = 0;
|
|
565
|
+
const f = (g) => {
|
|
566
|
+
const p = s.get(g.id) ?? [], m = g.depth * (o + r);
|
|
567
|
+
let _;
|
|
568
|
+
if (p.length === 0)
|
|
569
|
+
_ = i, i += n + l;
|
|
482
570
|
else {
|
|
483
|
-
const
|
|
484
|
-
|
|
571
|
+
const d = p.map(f);
|
|
572
|
+
_ = (Math.min(...d) + Math.max(...d)) / 2;
|
|
485
573
|
}
|
|
486
|
-
return
|
|
574
|
+
return c.set(g.id, { x: m, y: _ }), _;
|
|
487
575
|
};
|
|
488
|
-
for (const
|
|
489
|
-
return
|
|
490
|
-
}
|
|
491
|
-
const
|
|
492
|
-
const { page:
|
|
493
|
-
|
|
494
|
-
const
|
|
495
|
-
if (!
|
|
496
|
-
const
|
|
497
|
-
|
|
576
|
+
for (const g of s.get(null) ?? []) f(g);
|
|
577
|
+
return t.map((g) => ({ ...g, ...c.get(g.id) }));
|
|
578
|
+
}
|
|
579
|
+
const Ne = de(function(o) {
|
|
580
|
+
const { page: n, viewport: r, thumbWidth: l, bodyHeight: s } = o.data, c = k((_) => _.openViewer), i = H(null), [f, g] = v(!1);
|
|
581
|
+
A(() => {
|
|
582
|
+
const _ = i.current;
|
|
583
|
+
if (!_ || n.external) return;
|
|
584
|
+
const d = new IntersectionObserver(([C]) => {
|
|
585
|
+
C.isIntersecting && (g(!0), d.disconnect());
|
|
498
586
|
});
|
|
499
|
-
return
|
|
500
|
-
}, [
|
|
501
|
-
const
|
|
502
|
-
return /* @__PURE__ */
|
|
503
|
-
|
|
587
|
+
return d.observe(_), () => d.disconnect();
|
|
588
|
+
}, [n.external]);
|
|
589
|
+
const p = l / r.width;
|
|
590
|
+
return /* @__PURE__ */ a("div", { ref: i, className: "pbu-node", style: { width: l }, onClick: () => {
|
|
591
|
+
n.external ? window.open(n.path, "_blank", "noopener") : c(n.path);
|
|
504
592
|
}, children: [
|
|
505
|
-
/* @__PURE__ */
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ e(Q, { type: "target", position: V.Left, className: "pbu-handle", isConnectable: !1 }),
|
|
594
|
+
/* @__PURE__ */ a("div", { className: "pbu-node-header", children: [
|
|
595
|
+
/* @__PURE__ */ e("span", { className: "pbu-node-title", children: n.title }),
|
|
596
|
+
/* @__PURE__ */ e("span", { className: "pbu-node-path", children: n.external ? "외부 ↗" : n.path })
|
|
509
597
|
] }),
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
|
|
598
|
+
/* @__PURE__ */ a("div", { className: "pbu-node-body", style: { height: s }, children: [
|
|
599
|
+
n.external ? /* @__PURE__ */ e("div", { className: "pbu-node-placeholder", children: "↗ 외부 링크" }) : f ? /* @__PURE__ */ e(
|
|
512
600
|
"iframe",
|
|
513
601
|
{
|
|
514
602
|
className: "pbu-node-iframe",
|
|
515
|
-
src:
|
|
516
|
-
title: `${
|
|
603
|
+
src: n.path,
|
|
604
|
+
title: `${n.title} 미리보기`,
|
|
517
605
|
loading: "lazy",
|
|
518
606
|
tabIndex: -1,
|
|
519
607
|
style: {
|
|
520
|
-
width:
|
|
521
|
-
height:
|
|
522
|
-
transform: `scale(${
|
|
608
|
+
width: r.width,
|
|
609
|
+
height: r.height,
|
|
610
|
+
transform: `scale(${p})`
|
|
523
611
|
}
|
|
524
612
|
}
|
|
525
|
-
) : /* @__PURE__ */
|
|
526
|
-
/* @__PURE__ */
|
|
613
|
+
) : /* @__PURE__ */ e("div", { className: "pbu-node-placeholder", children: "…" }),
|
|
614
|
+
/* @__PURE__ */ e("div", { className: "pbu-node-shield" })
|
|
527
615
|
] }),
|
|
528
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ e(Q, { type: "source", position: V.Right, className: "pbu-handle", isConnectable: !1 })
|
|
529
617
|
] });
|
|
530
|
-
}),
|
|
531
|
-
function
|
|
532
|
-
const
|
|
533
|
-
const
|
|
534
|
-
id:
|
|
618
|
+
}), ze = { page: Ne }, Y = 260, Ce = 30;
|
|
619
|
+
function Ee({ ia: t }) {
|
|
620
|
+
const o = k((l) => l.closeMap), { nodes: n, edges: r } = K(() => {
|
|
621
|
+
const l = Y / t.viewport.width, s = Math.round(t.viewport.height * l), c = s + Ce, i = _e(t.nodes, Y, c), f = i.map((p) => ({
|
|
622
|
+
id: p.id,
|
|
535
623
|
type: "page",
|
|
536
|
-
position: { x:
|
|
624
|
+
position: { x: p.x, y: p.y },
|
|
537
625
|
data: {
|
|
538
|
-
page:
|
|
539
|
-
viewport:
|
|
540
|
-
thumbWidth:
|
|
541
|
-
bodyHeight:
|
|
626
|
+
page: p,
|
|
627
|
+
viewport: t.viewport,
|
|
628
|
+
thumbWidth: Y,
|
|
629
|
+
bodyHeight: s
|
|
542
630
|
},
|
|
543
|
-
sourcePosition:
|
|
544
|
-
targetPosition:
|
|
545
|
-
})),
|
|
546
|
-
id: `${
|
|
547
|
-
source:
|
|
548
|
-
target:
|
|
631
|
+
sourcePosition: V.Right,
|
|
632
|
+
targetPosition: V.Left
|
|
633
|
+
})), g = i.filter((p) => p.parentId).map((p) => ({
|
|
634
|
+
id: `${p.parentId}->${p.id}`,
|
|
635
|
+
source: p.parentId,
|
|
636
|
+
target: p.id,
|
|
549
637
|
type: "smoothstep"
|
|
550
638
|
}));
|
|
551
|
-
return { nodes:
|
|
552
|
-
}, [
|
|
553
|
-
return
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
556
|
-
const c =
|
|
557
|
-
c.viewerPath || c.skillDrawerOpen ||
|
|
639
|
+
return { nodes: f, edges: g };
|
|
640
|
+
}, [t]);
|
|
641
|
+
return A(() => {
|
|
642
|
+
const l = (s) => {
|
|
643
|
+
if (s.key !== "Escape") return;
|
|
644
|
+
const c = k.getState();
|
|
645
|
+
c.viewerPath || c.skillDrawerOpen || o();
|
|
558
646
|
};
|
|
559
|
-
return window.addEventListener("keydown",
|
|
560
|
-
}, [
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
/* @__PURE__ */ n("button", { type: "button", className: "pbu-icon-btn", onClick: t, "aria-label": "닫기", children: "✕" })
|
|
647
|
+
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
648
|
+
}, [o]), /* @__PURE__ */ a("div", { className: "pbu-overlay", children: [
|
|
649
|
+
/* @__PURE__ */ a("div", { className: "pbu-bar", children: [
|
|
650
|
+
/* @__PURE__ */ e("span", { className: "pbu-logo", children: "pubuilder" }),
|
|
651
|
+
/* @__PURE__ */ e("span", { className: "pbu-hint", children: "노드 클릭 → 페이지 확대 · 스크롤 줌 · 드래그 팬 · Esc 닫기" }),
|
|
652
|
+
/* @__PURE__ */ e("span", { className: "pbu-spacer" }),
|
|
653
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-icon-btn", onClick: o, "aria-label": "닫기", children: "✕" })
|
|
567
654
|
] }),
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
|
|
655
|
+
/* @__PURE__ */ e("div", { className: "pbu-canvas", children: /* @__PURE__ */ e(
|
|
656
|
+
he,
|
|
570
657
|
{
|
|
571
|
-
nodes:
|
|
572
|
-
edges:
|
|
573
|
-
nodeTypes:
|
|
658
|
+
nodes: n,
|
|
659
|
+
edges: r,
|
|
660
|
+
nodeTypes: ze,
|
|
574
661
|
fitView: !0,
|
|
575
662
|
fitViewOptions: { padding: 0.15, maxZoom: 1 },
|
|
576
663
|
minZoom: 0.05,
|
|
@@ -582,25 +669,25 @@ function Ne({ ia: e }) {
|
|
|
582
669
|
) })
|
|
583
670
|
] });
|
|
584
671
|
}
|
|
585
|
-
function
|
|
586
|
-
const
|
|
587
|
-
return /* @__PURE__ */
|
|
672
|
+
function Se() {
|
|
673
|
+
const t = k((r) => r.isMapOpen), o = k((r) => r.openMap), n = k((r) => r.closeMap);
|
|
674
|
+
return /* @__PURE__ */ e(
|
|
588
675
|
"button",
|
|
589
676
|
{
|
|
590
677
|
type: "button",
|
|
591
678
|
className: "pbu-fab",
|
|
592
679
|
title: "Page Map (pubuilder)",
|
|
593
680
|
"aria-label": "페이지 맵 열기",
|
|
594
|
-
onClick: () =>
|
|
595
|
-
children: /* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
/* @__PURE__ */
|
|
681
|
+
onClick: () => t ? n() : o(),
|
|
682
|
+
children: /* @__PURE__ */ a("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
683
|
+
/* @__PURE__ */ e("polygon", { points: "3 6 9 3 15 6 21 3 21 18 15 21 9 18 3 21" }),
|
|
684
|
+
/* @__PURE__ */ e("line", { x1: "9", y1: "3", x2: "9", y2: "18" }),
|
|
685
|
+
/* @__PURE__ */ e("line", { x1: "15", y1: "6", x2: "15", y2: "21" })
|
|
599
686
|
] })
|
|
600
687
|
}
|
|
601
688
|
);
|
|
602
689
|
}
|
|
603
|
-
const
|
|
690
|
+
const Te = /* @__PURE__ */ new Set([
|
|
604
691
|
"section",
|
|
605
692
|
"header",
|
|
606
693
|
"footer",
|
|
@@ -609,7 +696,7 @@ const Ce = /* @__PURE__ */ new Set([
|
|
|
609
696
|
"article",
|
|
610
697
|
"aside",
|
|
611
698
|
"form"
|
|
612
|
-
]),
|
|
699
|
+
]), Me = /* @__PURE__ */ new Set([
|
|
613
700
|
"a",
|
|
614
701
|
"button",
|
|
615
702
|
"input",
|
|
@@ -629,640 +716,724 @@ const Ce = /* @__PURE__ */ new Set([
|
|
|
629
716
|
"p",
|
|
630
717
|
"label"
|
|
631
718
|
]);
|
|
632
|
-
function
|
|
633
|
-
const
|
|
634
|
-
let
|
|
635
|
-
for (;
|
|
636
|
-
|
|
637
|
-
return
|
|
638
|
-
}
|
|
639
|
-
function
|
|
640
|
-
const
|
|
641
|
-
if (
|
|
642
|
-
const
|
|
643
|
-
const
|
|
644
|
-
return
|
|
719
|
+
function ce(t, o) {
|
|
720
|
+
const n = [];
|
|
721
|
+
let r = t;
|
|
722
|
+
for (; r && r !== o.body && r !== o.documentElement; )
|
|
723
|
+
n.push(r), r = r.parentElement;
|
|
724
|
+
return n;
|
|
725
|
+
}
|
|
726
|
+
function Le(t, o) {
|
|
727
|
+
const n = ce(t, o);
|
|
728
|
+
if (n.length === 0) return null;
|
|
729
|
+
const r = n.find((c) => {
|
|
730
|
+
const i = c.tagName.toLowerCase();
|
|
731
|
+
return Te.has(i) && i !== "main";
|
|
645
732
|
});
|
|
646
|
-
if (
|
|
647
|
-
const l =
|
|
733
|
+
if (r) return r;
|
|
734
|
+
const l = n.find((c) => c.tagName.toLowerCase() === "main");
|
|
648
735
|
if (l) return l;
|
|
649
|
-
const
|
|
650
|
-
for (let
|
|
651
|
-
const
|
|
652
|
-
if (
|
|
736
|
+
const s = o.body.scrollHeight || 1;
|
|
737
|
+
for (let c = n.length - 1; c >= 0; c--) {
|
|
738
|
+
const i = n[c].getBoundingClientRect();
|
|
739
|
+
if (i.height > 0 && i.height < s * 0.8) return n[c];
|
|
653
740
|
}
|
|
654
|
-
return
|
|
655
|
-
}
|
|
656
|
-
function
|
|
657
|
-
const
|
|
658
|
-
for (const
|
|
659
|
-
if (
|
|
660
|
-
const l =
|
|
661
|
-
if (l.width >= 40 && l.height >= 24 &&
|
|
741
|
+
return n[n.length - 1];
|
|
742
|
+
}
|
|
743
|
+
function Pe(t, o) {
|
|
744
|
+
const n = ce(t, o);
|
|
745
|
+
for (const r of n) {
|
|
746
|
+
if (Me.has(r.tagName.toLowerCase())) return r;
|
|
747
|
+
const l = r.getBoundingClientRect(), s = r.children.length > 0 || (r.textContent ?? "").trim().length > 0;
|
|
748
|
+
if (l.width >= 40 && l.height >= 24 && s) return r;
|
|
662
749
|
}
|
|
663
|
-
return
|
|
664
|
-
}
|
|
665
|
-
function
|
|
666
|
-
return
|
|
667
|
-
}
|
|
668
|
-
function
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
671
|
-
const
|
|
672
|
-
if (
|
|
673
|
-
const l =
|
|
674
|
-
if (l) return
|
|
675
|
-
const
|
|
676
|
-
return
|
|
677
|
-
}
|
|
678
|
-
function
|
|
679
|
-
return
|
|
680
|
-
}
|
|
681
|
-
function
|
|
682
|
-
if (
|
|
683
|
-
const
|
|
684
|
-
let
|
|
685
|
-
for (;
|
|
686
|
-
if (
|
|
687
|
-
return
|
|
688
|
-
const l =
|
|
689
|
-
let
|
|
690
|
-
if (
|
|
691
|
-
const
|
|
692
|
-
(
|
|
750
|
+
return n[0] ?? null;
|
|
751
|
+
}
|
|
752
|
+
function Oe(t, o, n) {
|
|
753
|
+
return n === "all" ? o.body : n === "section" ? Le(t, o) : Pe(t, o);
|
|
754
|
+
}
|
|
755
|
+
function Ie(t) {
|
|
756
|
+
const n = t.querySelector("h1, h2, h3, h4, h5, h6")?.textContent?.trim();
|
|
757
|
+
if (n) return q(n);
|
|
758
|
+
const r = t.getAttribute("aria-label");
|
|
759
|
+
if (r) return q(r);
|
|
760
|
+
const l = t.getAttribute("alt");
|
|
761
|
+
if (l) return q(l);
|
|
762
|
+
const s = (t.textContent ?? "").trim().replace(/\s+/g, " ");
|
|
763
|
+
return s ? q(s) : `<${t.tagName.toLowerCase()}>`;
|
|
764
|
+
}
|
|
765
|
+
function q(t, o = 30) {
|
|
766
|
+
return t.length > o ? `${t.slice(0, o)}…` : t;
|
|
767
|
+
}
|
|
768
|
+
function Re(t, o) {
|
|
769
|
+
if (t.id) return `#${CSS.escape(t.id)}`;
|
|
770
|
+
const n = [];
|
|
771
|
+
let r = t;
|
|
772
|
+
for (; r && r !== o.body && n.length < 8; ) {
|
|
773
|
+
if (r.id)
|
|
774
|
+
return n.unshift(`#${CSS.escape(r.id)}`), n.join(" > ");
|
|
775
|
+
const l = r.tagName.toLowerCase(), s = r.parentElement;
|
|
776
|
+
let c = l;
|
|
777
|
+
if (s) {
|
|
778
|
+
const i = Array.from(s.children).filter(
|
|
779
|
+
(f) => f.tagName === r.tagName
|
|
693
780
|
);
|
|
694
|
-
|
|
781
|
+
i.length > 1 && (c += `:nth-of-type(${i.indexOf(r) + 1})`);
|
|
695
782
|
}
|
|
696
|
-
|
|
783
|
+
n.unshift(c), r = s;
|
|
697
784
|
}
|
|
698
|
-
return
|
|
785
|
+
return n.join(" > ");
|
|
699
786
|
}
|
|
700
|
-
function
|
|
701
|
-
const
|
|
702
|
-
|
|
787
|
+
function te(t, o, n) {
|
|
788
|
+
const r = t.createElement("div");
|
|
789
|
+
r.setAttribute("data-pubuilder", "highlight"), Object.assign(r.style, {
|
|
703
790
|
position: "fixed",
|
|
704
791
|
top: "0",
|
|
705
792
|
left: "0",
|
|
706
793
|
display: "none",
|
|
707
|
-
border: `1px solid ${
|
|
708
|
-
background:
|
|
794
|
+
border: `1px solid ${o}`,
|
|
795
|
+
background: n,
|
|
709
796
|
borderRadius: "0",
|
|
710
797
|
pointerEvents: "none",
|
|
711
798
|
zIndex: "2147483647",
|
|
712
799
|
boxSizing: "border-box"
|
|
713
800
|
});
|
|
714
|
-
const l =
|
|
801
|
+
const l = t.createElement("div");
|
|
715
802
|
return Object.assign(l.style, {
|
|
716
803
|
position: "absolute",
|
|
717
804
|
left: "-1px",
|
|
718
805
|
top: "-22px",
|
|
719
806
|
padding: "2px 7px",
|
|
720
|
-
background:
|
|
807
|
+
background: o,
|
|
721
808
|
color: "#fff",
|
|
722
809
|
font: "600 10px/16px system-ui, sans-serif",
|
|
723
810
|
borderRadius: "0",
|
|
724
811
|
whiteSpace: "nowrap",
|
|
725
812
|
pointerEvents: "none"
|
|
726
|
-
}),
|
|
813
|
+
}), r.appendChild(l), { root: r, label: l };
|
|
727
814
|
}
|
|
728
|
-
function
|
|
729
|
-
const l =
|
|
730
|
-
if (
|
|
731
|
-
|
|
815
|
+
function oe(t, o, n, r) {
|
|
816
|
+
const l = o.getBoundingClientRect(), s = r ?? -1 / 0, c = Math.max(l.top, s), i = l.bottom - c;
|
|
817
|
+
if (i <= 2) {
|
|
818
|
+
X(t);
|
|
732
819
|
return;
|
|
733
820
|
}
|
|
734
|
-
|
|
821
|
+
t.root.style.display = "block", t.root.style.transform = `translate(${l.x}px, ${c}px)`, t.root.style.width = `${l.width}px`, t.root.style.height = `${i}px`, t.label.textContent = n, t.label.style.top = c < 30 || c - 24 < s ? "2px" : "-24px";
|
|
735
822
|
}
|
|
736
|
-
function
|
|
737
|
-
|
|
823
|
+
function X(t) {
|
|
824
|
+
t.root.style.display = "none";
|
|
738
825
|
}
|
|
739
|
-
function
|
|
740
|
-
const
|
|
741
|
-
return `${
|
|
826
|
+
function re(t) {
|
|
827
|
+
const o = t.getBoundingClientRect();
|
|
828
|
+
return `${t.tagName.toLowerCase()} · ${Math.round(o.width)}×${Math.round(o.height)}`;
|
|
742
829
|
}
|
|
743
|
-
function
|
|
744
|
-
let
|
|
830
|
+
function $e(t, o) {
|
|
831
|
+
let n = null;
|
|
745
832
|
try {
|
|
746
|
-
|
|
833
|
+
n = t.contentDocument;
|
|
747
834
|
} catch {
|
|
748
835
|
return null;
|
|
749
836
|
}
|
|
750
|
-
const
|
|
751
|
-
if (!
|
|
752
|
-
const l =
|
|
753
|
-
let
|
|
754
|
-
const
|
|
755
|
-
l.body.appendChild(
|
|
756
|
-
let
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
for (const
|
|
760
|
-
if (
|
|
761
|
-
const
|
|
762
|
-
if (
|
|
763
|
-
const
|
|
764
|
-
|
|
837
|
+
const r = t.contentWindow;
|
|
838
|
+
if (!n || !n.body || !r) return null;
|
|
839
|
+
const l = n;
|
|
840
|
+
let s = o.granularity, c = o.enabled, i = null, f = null;
|
|
841
|
+
const g = te(l, "rgba(14,99,156,0.95)", "rgba(14,99,156,0.10)"), p = te(l, "rgba(35,134,54,0.95)", "rgba(35,134,54,0.07)");
|
|
842
|
+
l.body.appendChild(g.root), l.body.appendChild(p.root);
|
|
843
|
+
let m = [], _ = 0;
|
|
844
|
+
const d = () => {
|
|
845
|
+
m = [];
|
|
846
|
+
for (const b of Array.from(l.body.querySelectorAll("*"))) {
|
|
847
|
+
if (b === g.root || b === p.root || g.root.contains(b) || p.root.contains(b)) continue;
|
|
848
|
+
const y = r.getComputedStyle(b).position;
|
|
849
|
+
if (y !== "fixed" && y !== "sticky") continue;
|
|
850
|
+
const w = b.getBoundingClientRect();
|
|
851
|
+
w.width === 0 || w.height === 0 || w.top <= 1 && w.height < r.innerHeight * 0.5 && m.push({ el: b, rect: w });
|
|
765
852
|
}
|
|
766
|
-
},
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
}, E = (
|
|
770
|
-
const
|
|
771
|
-
let
|
|
772
|
-
for (const
|
|
773
|
-
|
|
774
|
-
return
|
|
775
|
-
},
|
|
776
|
-
|
|
777
|
-
},
|
|
778
|
-
if (
|
|
779
|
-
if (
|
|
780
|
-
if (
|
|
781
|
-
let
|
|
782
|
-
for (;
|
|
783
|
-
|
|
784
|
-
return
|
|
853
|
+
}, C = () => {
|
|
854
|
+
const b = Date.now();
|
|
855
|
+
b - _ < 500 || (_ = b, d());
|
|
856
|
+
}, E = (b) => {
|
|
857
|
+
const y = b.getBoundingClientRect();
|
|
858
|
+
let w = null;
|
|
859
|
+
for (const S of m)
|
|
860
|
+
S.el === b || S.el.contains(b) || b.contains(S.el) || !(y.left < S.rect.right && y.right > S.rect.left) || (w === null || S.rect.bottom > w) && (w = S.rect.bottom);
|
|
861
|
+
return w;
|
|
862
|
+
}, P = () => {
|
|
863
|
+
i && c && i.isConnected ? oe(g, i, re(i), E(i)) : X(g), f && f.isConnected ? oe(p, f, `선택됨 · ${re(f)}`, E(f)) : X(p);
|
|
864
|
+
}, T = (b) => {
|
|
865
|
+
if (s === "all") return l.body;
|
|
866
|
+
if (f && f.isConnected && f.contains(b)) {
|
|
867
|
+
if (f === b) return f;
|
|
868
|
+
let y = b;
|
|
869
|
+
for (; y.parentElement && y.parentElement !== f; )
|
|
870
|
+
y = y.parentElement;
|
|
871
|
+
return y;
|
|
785
872
|
}
|
|
786
|
-
return
|
|
787
|
-
},
|
|
788
|
-
if (!
|
|
789
|
-
|
|
790
|
-
const
|
|
791
|
-
if (!
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
},
|
|
795
|
-
if (!
|
|
796
|
-
|
|
797
|
-
const
|
|
798
|
-
if (!
|
|
799
|
-
const
|
|
800
|
-
if (!
|
|
801
|
-
|
|
802
|
-
const
|
|
803
|
-
|
|
873
|
+
return Oe(b, l, s);
|
|
874
|
+
}, j = (b) => {
|
|
875
|
+
if (!c) return;
|
|
876
|
+
C();
|
|
877
|
+
const y = b.target;
|
|
878
|
+
if (!y || !l.body.contains(y)) return;
|
|
879
|
+
const w = T(y);
|
|
880
|
+
w !== i && (i = w, P());
|
|
881
|
+
}, O = (b) => {
|
|
882
|
+
if (!c) return;
|
|
883
|
+
b.preventDefault(), b.stopPropagation(), d(), _ = Date.now();
|
|
884
|
+
const y = b.target;
|
|
885
|
+
if (!y) return;
|
|
886
|
+
const w = T(y);
|
|
887
|
+
if (!w) return;
|
|
888
|
+
f = w, P();
|
|
889
|
+
const S = w.getBoundingClientRect();
|
|
890
|
+
o.onSelect(
|
|
804
891
|
{
|
|
805
|
-
pagePath:
|
|
806
|
-
selector:
|
|
807
|
-
tag:
|
|
808
|
-
label:
|
|
892
|
+
pagePath: o.pagePath,
|
|
893
|
+
selector: Re(w, l),
|
|
894
|
+
tag: w.tagName.toLowerCase(),
|
|
895
|
+
label: Ie(w),
|
|
809
896
|
rect: {
|
|
810
|
-
x:
|
|
811
|
-
y:
|
|
812
|
-
width:
|
|
813
|
-
height:
|
|
897
|
+
x: S.x + r.scrollX,
|
|
898
|
+
y: S.y + r.scrollY,
|
|
899
|
+
width: S.width,
|
|
900
|
+
height: S.height
|
|
814
901
|
},
|
|
815
|
-
granularity:
|
|
902
|
+
granularity: s
|
|
816
903
|
},
|
|
817
|
-
|
|
904
|
+
w
|
|
818
905
|
);
|
|
819
|
-
},
|
|
820
|
-
|
|
821
|
-
},
|
|
822
|
-
|
|
906
|
+
}, M = () => {
|
|
907
|
+
i = null, P();
|
|
908
|
+
}, $ = () => P(), I = () => {
|
|
909
|
+
d(), P();
|
|
823
910
|
};
|
|
824
|
-
return
|
|
911
|
+
return d(), l.addEventListener("mousemove", j, !0), l.addEventListener("click", O, !0), l.documentElement.addEventListener("mouseleave", M), r.addEventListener("scroll", $, !0), r.addEventListener("resize", I), {
|
|
825
912
|
destroy() {
|
|
826
913
|
try {
|
|
827
|
-
l.removeEventListener("mousemove",
|
|
914
|
+
l.removeEventListener("mousemove", j, !0), l.removeEventListener("click", O, !0), l.documentElement.removeEventListener("mouseleave", M), r.removeEventListener("scroll", $, !0), r.removeEventListener("resize", I), g.root.remove(), p.root.remove();
|
|
828
915
|
} catch {
|
|
829
916
|
}
|
|
830
917
|
},
|
|
831
|
-
setGranularity(
|
|
832
|
-
|
|
918
|
+
setGranularity(b) {
|
|
919
|
+
s = b, i = null, P();
|
|
833
920
|
},
|
|
834
|
-
setEnabled(
|
|
835
|
-
|
|
921
|
+
setEnabled(b) {
|
|
922
|
+
c = b, b || (i = null), P();
|
|
836
923
|
}
|
|
837
924
|
};
|
|
838
925
|
}
|
|
839
|
-
const
|
|
926
|
+
const De = {
|
|
840
927
|
log: "💬",
|
|
841
928
|
tool: "🔧",
|
|
842
929
|
error: "⛔",
|
|
843
930
|
done: "✅"
|
|
844
931
|
};
|
|
845
|
-
function
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
}, [
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
-
}, [
|
|
853
|
-
|
|
932
|
+
function Ae() {
|
|
933
|
+
const t = le(Z), o = k((u) => u.selection), n = k((u) => u.selectedOuterHTML), r = k((u) => u.toggleSkillDrawer), [l, s] = v(""), [c, i] = v("idle"), [f, g] = v(null), [p, m] = v([]), [_, d] = v(!1), [C, E] = v(!1), [P, T] = v(null), [j, O] = v(null), [M, $] = v(!1), [I, b] = v(!1), [y, w] = v(""), S = H(null), R = H(null), D = H(0);
|
|
934
|
+
A(() => {
|
|
935
|
+
D.current++, R.current?.(), R.current = null, i("idle"), g(null), m([]), d(!1), E(!1), $(!1), T(null), O(null), s(""), w("");
|
|
936
|
+
}, [o?.selector]), A(() => {
|
|
937
|
+
const u = S.current;
|
|
938
|
+
u && (u.scrollTop = u.scrollHeight);
|
|
939
|
+
}, [p]), A(() => () => {
|
|
940
|
+
D.current++, R.current?.(), R.current = null;
|
|
854
941
|
}, []);
|
|
855
|
-
const
|
|
856
|
-
|
|
857
|
-
|
|
942
|
+
const F = (u) => {
|
|
943
|
+
R.current = t.subscribePublish(u, (z) => {
|
|
944
|
+
m((L) => [...L, z]), z.type === "done" ? (i("done"), g(null), $(!1), R.current?.(), R.current = null) : z.type === "error" && (i("error"), T(z.text), g(null), $(!1), R.current?.(), R.current = null);
|
|
858
945
|
});
|
|
859
|
-
},
|
|
860
|
-
if (!
|
|
861
|
-
const
|
|
862
|
-
|
|
946
|
+
}, W = async () => {
|
|
947
|
+
if (!o || c === "running" || C) return;
|
|
948
|
+
const u = D.current;
|
|
949
|
+
d(!1), T(null), O(null), E(!0);
|
|
863
950
|
try {
|
|
864
|
-
const
|
|
865
|
-
if (
|
|
866
|
-
if (!
|
|
867
|
-
|
|
951
|
+
const z = await t.isAlive();
|
|
952
|
+
if (u !== D.current) return;
|
|
953
|
+
if (!z) {
|
|
954
|
+
d(!0);
|
|
868
955
|
return;
|
|
869
956
|
}
|
|
870
|
-
const { jobId:
|
|
871
|
-
selection:
|
|
872
|
-
outerHTML:
|
|
957
|
+
const { jobId: L } = await t.startPublish({
|
|
958
|
+
selection: o,
|
|
959
|
+
outerHTML: n ?? "",
|
|
873
960
|
figmaUrl: l
|
|
874
961
|
});
|
|
875
|
-
if (
|
|
876
|
-
|
|
962
|
+
if (u !== D.current) {
|
|
963
|
+
t.cancelPublish(L).catch(() => {
|
|
877
964
|
});
|
|
878
965
|
return;
|
|
879
966
|
}
|
|
880
|
-
|
|
881
|
-
} catch (
|
|
882
|
-
if (
|
|
883
|
-
|
|
967
|
+
g(L), m([]), i("running"), F(L);
|
|
968
|
+
} catch (z) {
|
|
969
|
+
if (u !== D.current) return;
|
|
970
|
+
i("error"), T(z instanceof Error ? z.message : String(z)), O(z instanceof J ? z.code ?? null : null);
|
|
884
971
|
} finally {
|
|
885
972
|
E(!1);
|
|
886
973
|
}
|
|
887
974
|
}, U = async () => {
|
|
888
|
-
if (!(!
|
|
889
|
-
|
|
975
|
+
if (!(!f || M)) {
|
|
976
|
+
$(!0);
|
|
890
977
|
try {
|
|
891
|
-
await
|
|
892
|
-
} catch (
|
|
893
|
-
|
|
978
|
+
await t.cancelPublish(f);
|
|
979
|
+
} catch (u) {
|
|
980
|
+
T(u instanceof Error ? u.message : String(u)), $(!1);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}, G = async () => {
|
|
984
|
+
const u = y.trim();
|
|
985
|
+
if (!o || !u || C || N) return;
|
|
986
|
+
const z = D.current;
|
|
987
|
+
E(!0), T(null);
|
|
988
|
+
try {
|
|
989
|
+
const { jobId: L } = await t.startPublish({
|
|
990
|
+
selection: o,
|
|
991
|
+
outerHTML: n ?? "",
|
|
992
|
+
figmaUrl: l,
|
|
993
|
+
instruction: u
|
|
994
|
+
});
|
|
995
|
+
if (z !== D.current) {
|
|
996
|
+
t.cancelPublish(L).catch(() => {
|
|
997
|
+
});
|
|
998
|
+
return;
|
|
894
999
|
}
|
|
1000
|
+
m((ie) => [...ie, { type: "log", text: `내 답변: ${u}` }]), w(""), g(L), i("running"), F(L);
|
|
1001
|
+
} catch (L) {
|
|
1002
|
+
if (z !== D.current) return;
|
|
1003
|
+
i("error"), T(L instanceof Error ? L.message : String(L)), O(L instanceof J ? L.code ?? null : null);
|
|
1004
|
+
} finally {
|
|
1005
|
+
E(!1);
|
|
895
1006
|
}
|
|
896
|
-
},
|
|
897
|
-
await navigator.clipboard.writeText("npx pubuilder serve"),
|
|
898
|
-
},
|
|
1007
|
+
}, h = async () => {
|
|
1008
|
+
await navigator.clipboard.writeText("npx pubuilder serve"), b(!0), setTimeout(() => b(!1), 1200);
|
|
1009
|
+
}, x = async () => {
|
|
899
1010
|
E(!0);
|
|
900
1011
|
try {
|
|
901
|
-
const
|
|
902
|
-
|
|
1012
|
+
const u = await t.isAlive();
|
|
1013
|
+
d(!u);
|
|
903
1014
|
} finally {
|
|
904
1015
|
E(!1);
|
|
905
1016
|
}
|
|
906
|
-
},
|
|
907
|
-
return /* @__PURE__ */
|
|
908
|
-
/* @__PURE__ */
|
|
909
|
-
|
|
1017
|
+
}, N = c === "running";
|
|
1018
|
+
return /* @__PURE__ */ a("div", { className: "pbu-publish", children: [
|
|
1019
|
+
/* @__PURE__ */ a("div", { className: "pbu-publish-heading", children: [
|
|
1020
|
+
/* @__PURE__ */ e("label", { htmlFor: "pbu-figma-url", children: "Figma 노드 링크" }),
|
|
1021
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn pbu-skill-entry", onClick: r, children: "🧰 스킬함 · 설정" })
|
|
1022
|
+
] }),
|
|
1023
|
+
/* @__PURE__ */ e(
|
|
910
1024
|
"input",
|
|
911
1025
|
{
|
|
1026
|
+
id: "pbu-figma-url",
|
|
912
1027
|
value: l,
|
|
913
|
-
onChange: (
|
|
914
|
-
disabled:
|
|
1028
|
+
onChange: (u) => s(u.target.value),
|
|
1029
|
+
disabled: N,
|
|
915
1030
|
placeholder: "https://www.figma.com/design/..."
|
|
916
1031
|
}
|
|
917
1032
|
),
|
|
918
|
-
|
|
1033
|
+
_ && /* @__PURE__ */ a("div", { className: "pbu-panel-empty", children: [
|
|
919
1034
|
"컴패니언 서버가 꺼져 있어요",
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
1035
|
+
/* @__PURE__ */ a("div", { className: "pbu-drawer-code", children: [
|
|
1036
|
+
/* @__PURE__ */ e("code", { children: "npx pubuilder serve" }),
|
|
1037
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", onClick: h, children: I ? "복사됨 ✓" : "복사" })
|
|
923
1038
|
] }),
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ e("div", { className: "pbu-hint", children: 'package.json의 dev 스크립트를 "pubuilder dev -- <기존 명령>"으로 감싸면 자동 실행돼요' }),
|
|
1040
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", disabled: C, onClick: x, children: "다시 확인" })
|
|
926
1041
|
] }),
|
|
927
|
-
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
(
|
|
1042
|
+
P && !_ && /* @__PURE__ */ a("div", { className: "pbu-drawer-error", children: [
|
|
1043
|
+
/* @__PURE__ */ e("span", { children: P }),
|
|
1044
|
+
(j === "NO_FIGMA_TOKEN" || j === "FIGMA_API_ERROR") && /* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", onClick: r, children: "스킬함 열기" })
|
|
930
1045
|
] }),
|
|
931
|
-
|
|
1046
|
+
N ? /* @__PURE__ */ e("button", { type: "button", className: "pbu-btn pbu-btn-primary", disabled: M, onClick: U, children: M ? "중단 중..." : "중단" }) : /* @__PURE__ */ e(
|
|
932
1047
|
"button",
|
|
933
1048
|
{
|
|
934
1049
|
type: "button",
|
|
935
1050
|
className: "pbu-btn pbu-btn-primary",
|
|
936
|
-
disabled:
|
|
937
|
-
onClick:
|
|
1051
|
+
disabled: C || !o,
|
|
1052
|
+
onClick: W,
|
|
938
1053
|
children: "이 블록 퍼블리싱"
|
|
939
1054
|
}
|
|
940
1055
|
),
|
|
941
|
-
(
|
|
942
|
-
|
|
943
|
-
|
|
1056
|
+
(p.length > 0 || N) && /* @__PURE__ */ a("div", { className: "pbu-publish-log", ref: S, children: [
|
|
1057
|
+
N && p.length === 0 && /* @__PURE__ */ e("div", { className: "pbu-log-line pbu-log-tool", children: "실행 중..." }),
|
|
1058
|
+
p.map((u, z) => /* @__PURE__ */ a(
|
|
944
1059
|
"div",
|
|
945
1060
|
{
|
|
946
|
-
className:
|
|
1061
|
+
className: u.type === "error" ? "pbu-log-line pbu-log-error" : u.type === "done" ? "pbu-log-line pbu-log-done" : u.type === "tool" ? "pbu-log-line pbu-log-tool" : "pbu-log-line",
|
|
947
1062
|
children: [
|
|
948
|
-
/* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ e("span", { children: De[u.type] }),
|
|
949
1064
|
" ",
|
|
950
|
-
/* @__PURE__ */
|
|
1065
|
+
/* @__PURE__ */ e("span", { children: u.text })
|
|
951
1066
|
]
|
|
952
1067
|
},
|
|
953
|
-
|
|
1068
|
+
z
|
|
954
1069
|
))
|
|
1070
|
+
] }),
|
|
1071
|
+
c === "done" && /* @__PURE__ */ a("div", { className: "pbu-publish-reply", children: [
|
|
1072
|
+
/* @__PURE__ */ e("label", { htmlFor: "pbu-publish-reply", children: "AI에게 이어서 답하기" }),
|
|
1073
|
+
/* @__PURE__ */ e(
|
|
1074
|
+
"textarea",
|
|
1075
|
+
{
|
|
1076
|
+
id: "pbu-publish-reply",
|
|
1077
|
+
value: y,
|
|
1078
|
+
onChange: (u) => w(u.target.value),
|
|
1079
|
+
onKeyDown: (u) => {
|
|
1080
|
+
(u.metaKey || u.ctrlKey) && u.key === "Enter" && G();
|
|
1081
|
+
},
|
|
1082
|
+
placeholder: "예: B 방향으로 진행해줘. 공지와 알림은 유지해.",
|
|
1083
|
+
rows: 3
|
|
1084
|
+
}
|
|
1085
|
+
),
|
|
1086
|
+
/* @__PURE__ */ a("div", { className: "pbu-publish-reply-actions", children: [
|
|
1087
|
+
/* @__PURE__ */ e("span", { children: "⌘/Ctrl + Enter" }),
|
|
1088
|
+
/* @__PURE__ */ e(
|
|
1089
|
+
"button",
|
|
1090
|
+
{
|
|
1091
|
+
type: "button",
|
|
1092
|
+
className: "pbu-btn pbu-btn-primary",
|
|
1093
|
+
disabled: C || !y.trim(),
|
|
1094
|
+
onClick: G,
|
|
1095
|
+
children: C ? "전송 중..." : "답변 전송"
|
|
1096
|
+
}
|
|
1097
|
+
)
|
|
1098
|
+
] })
|
|
955
1099
|
] })
|
|
956
1100
|
] });
|
|
957
1101
|
}
|
|
958
|
-
function
|
|
959
|
-
const
|
|
960
|
-
|
|
1102
|
+
function je() {
|
|
1103
|
+
const t = k((l) => l.selection), [o, n] = v(!1), r = async () => {
|
|
1104
|
+
t && (await navigator.clipboard.writeText(t.selector), n(!0), setTimeout(() => n(!1), 1200));
|
|
961
1105
|
};
|
|
962
|
-
return /* @__PURE__ */
|
|
963
|
-
/* @__PURE__ */
|
|
964
|
-
|
|
965
|
-
/* @__PURE__ */
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ a("aside", { className: "pbu-panel", children: [
|
|
1107
|
+
/* @__PURE__ */ e("div", { className: "pbu-panel-title", children: "선택된 블록" }),
|
|
1108
|
+
t ? /* @__PURE__ */ a(ne, { children: [
|
|
1109
|
+
/* @__PURE__ */ a("div", { className: "pbu-field", children: [
|
|
1110
|
+
/* @__PURE__ */ e("label", { children: "페이지" }),
|
|
1111
|
+
/* @__PURE__ */ e("code", { children: t.pagePath })
|
|
968
1112
|
] }),
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
/* @__PURE__ */
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
973
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ a("div", { className: "pbu-field", children: [
|
|
1114
|
+
/* @__PURE__ */ e("label", { children: "블록" }),
|
|
1115
|
+
/* @__PURE__ */ a("div", { children: [
|
|
1116
|
+
/* @__PURE__ */ e("span", { className: "pbu-chip", children: t.tag }),
|
|
1117
|
+
/* @__PURE__ */ e("span", { children: t.label })
|
|
974
1118
|
] })
|
|
975
1119
|
] }),
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ a("div", { className: "pbu-field", children: [
|
|
1121
|
+
/* @__PURE__ */ e("label", { children: "Selector" }),
|
|
1122
|
+
/* @__PURE__ */ e("code", { className: "pbu-selector", children: t.selector }),
|
|
1123
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", onClick: r, children: o ? "복사됨 ✓" : "Selector 복사" })
|
|
980
1124
|
] }),
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */
|
|
983
|
-
/* @__PURE__ */
|
|
984
|
-
Math.round(
|
|
1125
|
+
/* @__PURE__ */ a("div", { className: "pbu-field", children: [
|
|
1126
|
+
/* @__PURE__ */ e("label", { children: "크기" }),
|
|
1127
|
+
/* @__PURE__ */ a("span", { children: [
|
|
1128
|
+
Math.round(t.rect.width),
|
|
985
1129
|
" × ",
|
|
986
|
-
Math.round(
|
|
1130
|
+
Math.round(t.rect.height),
|
|
987
1131
|
"px"
|
|
988
1132
|
] })
|
|
989
1133
|
] }),
|
|
990
|
-
/* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
1134
|
+
/* @__PURE__ */ a("div", { className: "pbu-field", children: [
|
|
1135
|
+
/* @__PURE__ */ e("label", { children: "단위" }),
|
|
1136
|
+
/* @__PURE__ */ e("span", { children: t.granularity === "all" ? "전체" : t.granularity === "section" ? "섹션" : "유닛" })
|
|
993
1137
|
] }),
|
|
994
|
-
/* @__PURE__ */
|
|
995
|
-
] }) : /* @__PURE__ */
|
|
1138
|
+
/* @__PURE__ */ e(Ae, {})
|
|
1139
|
+
] }) : /* @__PURE__ */ a("div", { className: "pbu-panel-empty", children: [
|
|
996
1140
|
"화면에서 블록에 마우스를 올리고 클릭해 선택하세요.",
|
|
997
|
-
/* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ e("br", {}),
|
|
998
1142
|
"상단 토글로 ",
|
|
999
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ e("b", { children: "전체 / 섹션 / 유닛" }),
|
|
1000
1144
|
" 단위를 바꿀 수 있어요."
|
|
1001
1145
|
] })
|
|
1002
1146
|
] });
|
|
1003
1147
|
}
|
|
1004
|
-
function
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1007
|
-
const
|
|
1008
|
-
if (!
|
|
1009
|
-
const
|
|
1010
|
-
pagePath:
|
|
1011
|
-
granularity:
|
|
1012
|
-
enabled:
|
|
1013
|
-
onSelect: (
|
|
1148
|
+
function He({ ia: t }) {
|
|
1149
|
+
const o = k((d) => d.viewerPath), n = k((d) => d.closeViewer), r = k((d) => d.granularity), l = k((d) => d.setGranularity), s = k((d) => d.inspectEnabled), c = k((d) => d.setInspectEnabled), i = H(null), f = H(null), [g, p] = v(!1), m = t.nodes.find((d) => d.path === o), _ = () => {
|
|
1150
|
+
f.current?.destroy(), f.current = null;
|
|
1151
|
+
const d = i.current;
|
|
1152
|
+
if (!d || !o) return;
|
|
1153
|
+
const C = k.getState(), E = $e(d, {
|
|
1154
|
+
pagePath: o,
|
|
1155
|
+
granularity: C.granularity,
|
|
1156
|
+
enabled: C.inspectEnabled,
|
|
1157
|
+
onSelect: (P, T) => (
|
|
1014
1158
|
// 20K 상한 — 프롬프트 비대화 방지
|
|
1015
|
-
|
|
1159
|
+
k.getState().setSelectionWithHTML(P, T.outerHTML.slice(0, 2e4))
|
|
1016
1160
|
)
|
|
1017
1161
|
});
|
|
1018
|
-
if (!
|
|
1019
|
-
|
|
1162
|
+
if (!E) {
|
|
1163
|
+
p(!0);
|
|
1020
1164
|
return;
|
|
1021
1165
|
}
|
|
1022
|
-
|
|
1166
|
+
p(!1), f.current = E;
|
|
1023
1167
|
};
|
|
1024
|
-
return
|
|
1025
|
-
|
|
1026
|
-
}, [
|
|
1027
|
-
|
|
1028
|
-
}, [
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1168
|
+
return A(() => () => f.current?.destroy(), []), A(() => {
|
|
1169
|
+
f.current?.setGranularity(r);
|
|
1170
|
+
}, [r]), A(() => {
|
|
1171
|
+
f.current?.setEnabled(s);
|
|
1172
|
+
}, [s]), A(() => {
|
|
1173
|
+
const d = (C) => {
|
|
1174
|
+
C.key === "Escape" && (k.getState().skillDrawerOpen || n());
|
|
1031
1175
|
};
|
|
1032
|
-
return window.addEventListener("keydown",
|
|
1033
|
-
}, [
|
|
1034
|
-
/* @__PURE__ */
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
|
|
1038
|
-
/* @__PURE__ */
|
|
1176
|
+
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1177
|
+
}, [n]), m ? /* @__PURE__ */ a("div", { className: "pbu-viewer", children: [
|
|
1178
|
+
/* @__PURE__ */ a("div", { className: "pbu-bar", children: [
|
|
1179
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", onClick: n, children: "← 맵으로" }),
|
|
1180
|
+
/* @__PURE__ */ a("span", { className: "pbu-viewer-title", children: [
|
|
1181
|
+
m.title,
|
|
1182
|
+
/* @__PURE__ */ e("code", { children: m.path })
|
|
1039
1183
|
] }),
|
|
1040
|
-
/* @__PURE__ */
|
|
1041
|
-
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ e("span", { className: "pbu-spacer" }),
|
|
1185
|
+
g && /* @__PURE__ */ e("span", { className: "pbu-hint", children: "⚠ 이 페이지는 검사할 수 없어요" }),
|
|
1186
|
+
/* @__PURE__ */ a("div", { className: "pbu-seg", role: "group", "aria-label": "블록 단위", children: [
|
|
1187
|
+
/* @__PURE__ */ e(
|
|
1044
1188
|
"button",
|
|
1045
1189
|
{
|
|
1046
1190
|
type: "button",
|
|
1047
|
-
className:
|
|
1191
|
+
className: r === "all" ? "pbu-on" : "",
|
|
1048
1192
|
onClick: () => l("all"),
|
|
1049
1193
|
children: "전체"
|
|
1050
1194
|
}
|
|
1051
1195
|
),
|
|
1052
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ e(
|
|
1053
1197
|
"button",
|
|
1054
1198
|
{
|
|
1055
1199
|
type: "button",
|
|
1056
|
-
className:
|
|
1200
|
+
className: r === "section" ? "pbu-on" : "",
|
|
1057
1201
|
onClick: () => l("section"),
|
|
1058
1202
|
children: "섹션"
|
|
1059
1203
|
}
|
|
1060
1204
|
),
|
|
1061
|
-
/* @__PURE__ */
|
|
1205
|
+
/* @__PURE__ */ e(
|
|
1062
1206
|
"button",
|
|
1063
1207
|
{
|
|
1064
1208
|
type: "button",
|
|
1065
|
-
className:
|
|
1209
|
+
className: r === "unit" ? "pbu-on" : "",
|
|
1066
1210
|
onClick: () => l("unit"),
|
|
1067
1211
|
children: "유닛"
|
|
1068
1212
|
}
|
|
1069
1213
|
)
|
|
1070
1214
|
] }),
|
|
1071
|
-
/* @__PURE__ */
|
|
1072
|
-
/* @__PURE__ */
|
|
1215
|
+
/* @__PURE__ */ a("label", { className: "pbu-toggle", children: [
|
|
1216
|
+
/* @__PURE__ */ e(
|
|
1073
1217
|
"input",
|
|
1074
1218
|
{
|
|
1075
1219
|
type: "checkbox",
|
|
1076
|
-
checked:
|
|
1077
|
-
onChange: (
|
|
1220
|
+
checked: s,
|
|
1221
|
+
onChange: (d) => c(d.target.checked)
|
|
1078
1222
|
}
|
|
1079
1223
|
),
|
|
1080
1224
|
"검사 모드"
|
|
1081
1225
|
] }),
|
|
1082
|
-
/* @__PURE__ */
|
|
1083
|
-
/* @__PURE__ */ n("button", { type: "button", className: "pbu-icon-btn", onClick: r, "aria-label": "닫기", children: "✕" })
|
|
1226
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-icon-btn", onClick: n, "aria-label": "닫기", children: "✕" })
|
|
1084
1227
|
] }),
|
|
1085
|
-
/* @__PURE__ */
|
|
1086
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ a("div", { className: "pbu-viewer-body", children: [
|
|
1229
|
+
/* @__PURE__ */ e("div", { className: "pbu-viewer-frame-wrap", children: /* @__PURE__ */ e(
|
|
1087
1230
|
"iframe",
|
|
1088
1231
|
{
|
|
1089
|
-
ref:
|
|
1232
|
+
ref: i,
|
|
1090
1233
|
className: "pbu-viewer-iframe",
|
|
1091
|
-
src:
|
|
1092
|
-
title:
|
|
1093
|
-
onLoad:
|
|
1234
|
+
src: m.path,
|
|
1235
|
+
title: m.title,
|
|
1236
|
+
onLoad: _
|
|
1094
1237
|
}
|
|
1095
1238
|
) }),
|
|
1096
|
-
/* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ e(je, {})
|
|
1097
1240
|
] })
|
|
1098
1241
|
] }) : null;
|
|
1099
1242
|
}
|
|
1100
|
-
const
|
|
1243
|
+
const Be = {
|
|
1101
1244
|
project: "프로젝트",
|
|
1102
1245
|
global: "글로벌",
|
|
1103
1246
|
uploaded: "업로드"
|
|
1104
|
-
},
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1247
|
+
}, Fe = {
|
|
1248
|
+
project: "현재 프로젝트에서 발견한 스킬 · 여기서는 삭제할 수 없어요",
|
|
1249
|
+
global: "내 전역 환경에 설치된 공용 스킬 · 여기서는 삭제할 수 없어요",
|
|
1250
|
+
uploaded: "이 스킬함에 직접 올린 Markdown 스킬 · 삭제할 수 있어요"
|
|
1251
|
+
}, Ue = ["project", "global", "uploaded"];
|
|
1252
|
+
function Ge() {
|
|
1253
|
+
const t = k((h) => h.toggleSkillDrawer), o = le(Z), [n, r] = v(!0), [l, s] = v(!1), [c, i] = v([]), [f, g] = v(null), [p, m] = v(""), [_, d] = v(!1), [C, E] = v(null), [P, T] = v(!1), j = H(null), O = H(0), [M, $] = v(null), I = async () => {
|
|
1254
|
+
const h = ++O.current;
|
|
1255
|
+
r(!0), E(null);
|
|
1109
1256
|
try {
|
|
1110
|
-
const x = await
|
|
1111
|
-
if (
|
|
1112
|
-
const [
|
|
1113
|
-
if (
|
|
1114
|
-
|
|
1257
|
+
const x = await o.isAlive();
|
|
1258
|
+
if (h !== O.current || (s(x), !x)) return;
|
|
1259
|
+
const [N, B] = await Promise.all([o.listSkills(), o.tokenStatus()]);
|
|
1260
|
+
if (h !== O.current) return;
|
|
1261
|
+
i(N), g(B), d(!B.configured);
|
|
1115
1262
|
} catch (x) {
|
|
1116
|
-
if (
|
|
1263
|
+
if (h !== O.current) return;
|
|
1117
1264
|
E(x instanceof Error ? x.message : String(x));
|
|
1118
1265
|
} finally {
|
|
1119
|
-
|
|
1266
|
+
h === O.current && r(!1);
|
|
1120
1267
|
}
|
|
1121
1268
|
};
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
}, []),
|
|
1125
|
-
const
|
|
1126
|
-
x.key === "Escape" &&
|
|
1269
|
+
A(() => {
|
|
1270
|
+
I();
|
|
1271
|
+
}, []), A(() => {
|
|
1272
|
+
const h = (x) => {
|
|
1273
|
+
x.key === "Escape" && t();
|
|
1127
1274
|
};
|
|
1128
|
-
return window.addEventListener("keydown",
|
|
1129
|
-
}, [
|
|
1130
|
-
const
|
|
1131
|
-
if (!
|
|
1132
|
-
|
|
1275
|
+
return window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h);
|
|
1276
|
+
}, [t]);
|
|
1277
|
+
const b = async (h, x) => {
|
|
1278
|
+
if (!M) {
|
|
1279
|
+
$(h);
|
|
1133
1280
|
try {
|
|
1134
1281
|
await x();
|
|
1135
|
-
} catch (
|
|
1136
|
-
E(
|
|
1282
|
+
} catch (N) {
|
|
1283
|
+
E(N instanceof Error ? N.message : String(N));
|
|
1137
1284
|
} finally {
|
|
1138
|
-
|
|
1285
|
+
$(null);
|
|
1139
1286
|
}
|
|
1140
1287
|
}
|
|
1141
|
-
},
|
|
1142
|
-
await
|
|
1143
|
-
}),
|
|
1144
|
-
window.confirm(`"${x}" 스킬을 삭제할까요?`) &&
|
|
1145
|
-
await
|
|
1288
|
+
}, y = (h, x) => b(`toggle:${h}`, async () => {
|
|
1289
|
+
await o.toggleSkill(h, x), await I();
|
|
1290
|
+
}), w = (h, x) => {
|
|
1291
|
+
window.confirm(`"${x}" 스킬을 삭제할까요?`) && b(`remove:${h}`, async () => {
|
|
1292
|
+
await o.removeSkill(h), await I();
|
|
1146
1293
|
});
|
|
1147
|
-
},
|
|
1148
|
-
const x =
|
|
1149
|
-
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1294
|
+
}, S = () => j.current?.click(), R = (h) => {
|
|
1295
|
+
const x = h.target.files?.[0];
|
|
1296
|
+
h.target.value = "", x && b("upload", async () => {
|
|
1297
|
+
const N = new FileReader(), B = await new Promise((u, z) => {
|
|
1298
|
+
N.onload = () => u(String(N.result ?? "")), N.onerror = () => z(N.error ?? new Error("파일을 읽을 수 없어요")), N.readAsText(x);
|
|
1152
1299
|
});
|
|
1153
|
-
await
|
|
1300
|
+
await o.uploadSkill(x.name, B), await I();
|
|
1154
1301
|
});
|
|
1155
|
-
},
|
|
1156
|
-
|
|
1157
|
-
}),
|
|
1158
|
-
await
|
|
1159
|
-
}),
|
|
1160
|
-
await navigator.clipboard.writeText("npx pubuilder serve"),
|
|
1161
|
-
},
|
|
1162
|
-
source:
|
|
1163
|
-
label:
|
|
1164
|
-
items:
|
|
1165
|
-
})).filter((
|
|
1166
|
-
return /* @__PURE__ */
|
|
1167
|
-
/* @__PURE__ */
|
|
1168
|
-
/* @__PURE__ */
|
|
1169
|
-
|
|
1302
|
+
}, D = () => b("token:save", async () => {
|
|
1303
|
+
p.trim() && (await o.saveToken(p.trim()), m(""), await I());
|
|
1304
|
+
}), F = () => b("token:delete", async () => {
|
|
1305
|
+
await o.deleteToken(), m(""), await I();
|
|
1306
|
+
}), W = async () => {
|
|
1307
|
+
await navigator.clipboard.writeText("npx pubuilder serve"), T(!0), setTimeout(() => T(!1), 1200);
|
|
1308
|
+
}, U = Ue.map((h) => ({
|
|
1309
|
+
source: h,
|
|
1310
|
+
label: Be[h],
|
|
1311
|
+
items: c.filter((x) => x.source === h)
|
|
1312
|
+
})).filter((h) => h.items.length > 0), G = c.filter((h) => h.enabled).length;
|
|
1313
|
+
return /* @__PURE__ */ a("aside", { className: "pbu-drawer", children: [
|
|
1314
|
+
/* @__PURE__ */ a("div", { className: "pbu-drawer-header", children: [
|
|
1315
|
+
/* @__PURE__ */ a("div", { children: [
|
|
1316
|
+
/* @__PURE__ */ e("span", { className: "pbu-panel-title", children: "스킬함" }),
|
|
1317
|
+
/* @__PURE__ */ e("span", { className: "pbu-drawer-kicker", children: "퍼블리싱 실행 설정" })
|
|
1318
|
+
] }),
|
|
1319
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-icon-btn", onClick: t, "aria-label": "닫기", children: "✕" })
|
|
1320
|
+
] }),
|
|
1321
|
+
/* @__PURE__ */ a("div", { className: "pbu-drawer-guide", children: [
|
|
1322
|
+
/* @__PURE__ */ e("strong", { children: "다음 퍼블리싱에 적용할 규칙을 고르세요." }),
|
|
1323
|
+
/* @__PURE__ */ e("span", { children: "체크된 스킬의 지침만 AI에게 전달됩니다. 변경 사항은 다음 실행부터 적용돼요." }),
|
|
1324
|
+
!n && l && /* @__PURE__ */ a("div", { className: "pbu-guide-status", children: [
|
|
1325
|
+
/* @__PURE__ */ e("span", { className: "pbu-status-dot pbu-status-dot-on" }),
|
|
1326
|
+
c.length > 0 ? `${G}/${c.length}개 스킬 사용 중` : "사용 가능한 스킬 없음"
|
|
1327
|
+
] })
|
|
1170
1328
|
] }),
|
|
1171
|
-
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
/* @__PURE__ */
|
|
1329
|
+
C && /* @__PURE__ */ a("div", { className: "pbu-drawer-error", children: [
|
|
1330
|
+
/* @__PURE__ */ e("span", { children: C }),
|
|
1331
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-icon-btn", onClick: () => E(null), "aria-label": "닫기", children: "✕" })
|
|
1174
1332
|
] }),
|
|
1175
|
-
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1333
|
+
n ? /* @__PURE__ */ e("div", { className: "pbu-panel-empty", children: "불러오는 중..." }) : l ? /* @__PURE__ */ a(ne, { children: [
|
|
1334
|
+
/* @__PURE__ */ a("div", { className: "pbu-drawer-section-head", children: [
|
|
1335
|
+
/* @__PURE__ */ a("div", { children: [
|
|
1336
|
+
/* @__PURE__ */ e("strong", { children: "Figma 연결" }),
|
|
1337
|
+
/* @__PURE__ */ e("span", { children: "노드 링크에서 시안 이미지와 구조 정보를 읽을 때 사용해요." })
|
|
1338
|
+
] }),
|
|
1339
|
+
/* @__PURE__ */ e("span", { className: `pbu-status-badge ${f?.configured ? "pbu-status-on" : "pbu-status-off"}`, children: f?.configured ? "연결됨" : "연결 필요" })
|
|
1340
|
+
] }),
|
|
1341
|
+
f?.configured && !_ ? /* @__PURE__ */ a("div", { className: "pbu-field", children: [
|
|
1342
|
+
/* @__PURE__ */ e("span", { className: "pbu-token-masked", children: f.masked }),
|
|
1343
|
+
/* @__PURE__ */ a("div", { children: [
|
|
1344
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", disabled: M !== null, onClick: () => d(!0), children: "재입력" }),
|
|
1345
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", disabled: M !== null, onClick: F, children: "삭제" })
|
|
1182
1346
|
] })
|
|
1183
|
-
] }) : /* @__PURE__ */
|
|
1184
|
-
/* @__PURE__ */
|
|
1347
|
+
] }) : /* @__PURE__ */ a("div", { className: "pbu-field", children: [
|
|
1348
|
+
/* @__PURE__ */ e(
|
|
1185
1349
|
"input",
|
|
1186
1350
|
{
|
|
1187
1351
|
type: "password",
|
|
1188
|
-
value:
|
|
1189
|
-
onChange: (
|
|
1352
|
+
value: p,
|
|
1353
|
+
onChange: (h) => m(h.target.value),
|
|
1190
1354
|
placeholder: "Figma 토큰"
|
|
1191
1355
|
}
|
|
1192
1356
|
),
|
|
1193
|
-
/* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn pbu-btn-primary", disabled: M !== null, onClick: D, children: "저장" })
|
|
1194
1358
|
] }),
|
|
1195
|
-
/* @__PURE__ */
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1359
|
+
/* @__PURE__ */ a("div", { className: "pbu-drawer-section-head pbu-drawer-section-head-skills", children: [
|
|
1360
|
+
/* @__PURE__ */ a("div", { children: [
|
|
1361
|
+
/* @__PURE__ */ e("strong", { children: "AI 작업 스킬" }),
|
|
1362
|
+
/* @__PURE__ */ e("span", { children: "스킬은 AI에게 전달되는 작업 규칙이 담긴 Markdown 파일이에요." })
|
|
1363
|
+
] }),
|
|
1364
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", disabled: M !== null, onClick: S, children: "업로드" }),
|
|
1365
|
+
/* @__PURE__ */ e(
|
|
1199
1366
|
"input",
|
|
1200
1367
|
{
|
|
1201
|
-
ref:
|
|
1368
|
+
ref: j,
|
|
1202
1369
|
type: "file",
|
|
1203
1370
|
accept: ".md",
|
|
1204
1371
|
style: { display: "none" },
|
|
1205
|
-
onChange:
|
|
1372
|
+
onChange: R
|
|
1206
1373
|
}
|
|
1207
1374
|
)
|
|
1208
1375
|
] }),
|
|
1209
|
-
|
|
1210
|
-
/* @__PURE__ */
|
|
1211
|
-
|
|
1212
|
-
/* @__PURE__ */
|
|
1213
|
-
|
|
1376
|
+
U.length === 0 ? /* @__PURE__ */ e("div", { className: "pbu-panel-empty", children: "등록된 스킬이 없어요." }) : U.map((h) => /* @__PURE__ */ a("div", { children: [
|
|
1377
|
+
/* @__PURE__ */ a("div", { className: "pbu-skill-source", children: [
|
|
1378
|
+
/* @__PURE__ */ e("strong", { children: h.label }),
|
|
1379
|
+
/* @__PURE__ */ e("span", { children: Fe[h.source] })
|
|
1380
|
+
] }),
|
|
1381
|
+
h.items.map((x) => /* @__PURE__ */ a("div", { className: "pbu-skill-row", children: [
|
|
1382
|
+
/* @__PURE__ */ a("label", { className: "pbu-toggle", children: [
|
|
1383
|
+
/* @__PURE__ */ e(
|
|
1214
1384
|
"input",
|
|
1215
1385
|
{
|
|
1216
1386
|
type: "checkbox",
|
|
1217
1387
|
checked: x.enabled,
|
|
1218
|
-
disabled:
|
|
1219
|
-
onChange: (
|
|
1388
|
+
disabled: M !== null,
|
|
1389
|
+
onChange: (N) => y(x.id, N.target.checked)
|
|
1220
1390
|
}
|
|
1221
1391
|
),
|
|
1222
1392
|
x.name
|
|
1223
1393
|
] }),
|
|
1224
|
-
/* @__PURE__ */
|
|
1225
|
-
x.
|
|
1394
|
+
/* @__PURE__ */ e("span", { className: "pbu-hint", title: x.description, children: x.description }),
|
|
1395
|
+
/* @__PURE__ */ e("span", { className: `pbu-skill-state ${x.enabled ? "pbu-skill-state-on" : ""}`, children: M === `toggle:${x.id}` ? "변경 중" : x.enabled ? "사용 중" : "제외됨" }),
|
|
1396
|
+
x.source === "uploaded" && /* @__PURE__ */ e(
|
|
1226
1397
|
"button",
|
|
1227
1398
|
{
|
|
1228
1399
|
type: "button",
|
|
1229
1400
|
className: "pbu-icon-btn",
|
|
1230
|
-
disabled:
|
|
1231
|
-
onClick: () =>
|
|
1401
|
+
disabled: M !== null,
|
|
1402
|
+
onClick: () => w(x.id, x.name),
|
|
1232
1403
|
"aria-label": "삭제",
|
|
1233
1404
|
children: "🗑"
|
|
1234
1405
|
}
|
|
1235
1406
|
)
|
|
1236
1407
|
] }, x.id))
|
|
1237
|
-
] },
|
|
1238
|
-
] }) : /* @__PURE__ */
|
|
1408
|
+
] }, h.source))
|
|
1409
|
+
] }) : /* @__PURE__ */ a("div", { className: "pbu-panel-empty", children: [
|
|
1239
1410
|
"컴패니언 서버가 꺼져 있어요",
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
/* @__PURE__ */
|
|
1242
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ a("div", { className: "pbu-drawer-code", children: [
|
|
1412
|
+
/* @__PURE__ */ e("code", { children: "npx pubuilder serve" }),
|
|
1413
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", onClick: W, children: P ? "복사됨 ✓" : "복사" })
|
|
1243
1414
|
] }),
|
|
1244
|
-
/* @__PURE__ */
|
|
1245
|
-
/* @__PURE__ */
|
|
1415
|
+
/* @__PURE__ */ e("div", { className: "pbu-hint", children: 'package.json의 dev 스크립트를 "pubuilder dev -- <기존 명령>"으로 감싸면 자동 실행돼요' }),
|
|
1416
|
+
/* @__PURE__ */ e("button", { type: "button", className: "pbu-btn", onClick: I, children: "다시 확인" })
|
|
1246
1417
|
] })
|
|
1247
1418
|
] });
|
|
1248
1419
|
}
|
|
1249
|
-
function
|
|
1250
|
-
const
|
|
1251
|
-
return
|
|
1252
|
-
|
|
1253
|
-
}, [
|
|
1254
|
-
/* @__PURE__ */
|
|
1255
|
-
/* @__PURE__ */
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1420
|
+
function Xe({ config: t, enabled: o = !0, serverUrl: n }) {
|
|
1421
|
+
const r = o && !xe(), [l, s] = v(!1), c = k((m) => m.isMapOpen), i = k((m) => m.viewerPath), f = k((m) => m.skillDrawerOpen), g = K(() => be(t), [t]), p = K(() => new ae(n), [n]);
|
|
1422
|
+
return ue(() => {
|
|
1423
|
+
r && window.self === window.top && (ke(), s(!0));
|
|
1424
|
+
}, [r]), !l || !r ? null : pe(
|
|
1425
|
+
/* @__PURE__ */ a(Z.Provider, { value: p, children: [
|
|
1426
|
+
/* @__PURE__ */ e(Se, {}),
|
|
1427
|
+
c && /* @__PURE__ */ e(Ee, { ia: g }),
|
|
1428
|
+
i && /* @__PURE__ */ e(He, { ia: g }),
|
|
1429
|
+
f && /* @__PURE__ */ e(Ge, {})
|
|
1259
1430
|
] }),
|
|
1260
1431
|
document.body
|
|
1261
1432
|
);
|
|
1262
1433
|
}
|
|
1263
1434
|
export {
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1435
|
+
Xe as PageMap,
|
|
1436
|
+
et as defineIA,
|
|
1437
|
+
be as normalizeIA
|
|
1267
1438
|
};
|
|
1268
1439
|
//# sourceMappingURL=index.js.map
|