issue-sticker 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/{externalUserPayload-DWcXyz2U.js → externalUserPayload-CdzgCq4t.js} +10453 -7486
- package/dist/issue-sticker-headless-react.js +68 -12
- package/dist/issue-sticker-headless.js +457 -95
- package/dist/issue-sticker-react.js +1431 -400
- package/dist/{three-B228j4M6.js → three-FamoZZKK.js} +560 -33
- package/dist/{tooltip-CT7e9xbU.js → tooltip-BVA6ikuJ.js} +1 -1
- package/headless.d.ts +35 -4
- package/package.json +1 -1
|
@@ -2,6 +2,32 @@ import * as React from "react";
|
|
|
2
2
|
import { useLayoutEffect, forwardRef, createElement } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
|
+
const MASKING_COPY = {
|
|
6
|
+
maskedLabel: "보안 정책으로 가려짐",
|
|
7
|
+
submitFailedTitle: "이슈 생성 실패",
|
|
8
|
+
screenRulesChanged: "마스킹 정책을 적용하기 위해 스크린샷을 다시 캡처하고 세션 리플레이 녹화를 새로 시작했습니다. 버그를 재현한 뒤 이슈를 다시 생성해주세요.",
|
|
9
|
+
/** 리플레이를 녹화하지 않을 때의 screenRulesChanged. */
|
|
10
|
+
screenRulesChangedNoReplay: "마스킹 정책을 적용하기 위해 스크린샷을 다시 캡처했습니다. 이슈를 다시 생성해주세요.",
|
|
11
|
+
/** 스크린샷 없이 낸 제출(영상 첨부, headless createIssue)의 screenRulesChanged. */
|
|
12
|
+
screenRulesChangedReplayOnly: "마스킹 정책을 적용하기 위해 세션 리플레이 녹화를 새로 시작했습니다. 버그를 재현한 뒤 이슈를 다시 생성해주세요.",
|
|
13
|
+
/** 다시 캡처한 스크린샷도, 새로 시작한 녹화도 없을 때의 screenRulesChanged. */
|
|
14
|
+
screenRulesChangedNoCapture: "마스킹 정책이 바뀌었습니다. 이슈를 다시 생성해주세요.",
|
|
15
|
+
replayMaskFailed: "세션 리플레이에 마스킹 정책을 적용하지 못해 녹화를 새로 시작했습니다. 버그를 다시 재현한 뒤 이슈를 생성해주세요.",
|
|
16
|
+
policyUnavailable: "마스킹 정책을 불러오지 못했습니다. 네트워크 연결을 확인한 뒤 다시 시도해주세요.",
|
|
17
|
+
videoExcluded: "이 프로젝트는 마스킹 정책에 따라 화면 녹화를 첨부하지 않습니다.",
|
|
18
|
+
/** 이슈를 만든 뒤 영상을 올리는 중에 정책이 녹화를 막았다. 이슈는 이미 있다. */
|
|
19
|
+
videoExcludedAfterCreate: "마스킹 정책이 화면 녹화를 막아 영상 없이 이슈가 생성되었습니다.",
|
|
20
|
+
screenshotExcluded: "마스킹 정책을 적용하지 못해 스크린샷을 첨부하지 않았습니다.",
|
|
21
|
+
screenshotPartiallyExcluded: "마스킹 정책을 적용하지 못해 일부 스크린샷을 첨부하지 않았습니다.",
|
|
22
|
+
selectorUnsupported: "마스킹 정책의 화면 요소 규칙을 이 브라우저에서 적용할 수 없습니다. 워크스페이스 관리자에게 문의해주세요."
|
|
23
|
+
};
|
|
24
|
+
class ReplayMaskingError extends Error {
|
|
25
|
+
constructor(detail) {
|
|
26
|
+
super(MASKING_COPY.replayMaskFailed);
|
|
27
|
+
this.name = "ReplayMaskingError";
|
|
28
|
+
this.detail = detail;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
5
31
|
const sources = /* @__PURE__ */ new WeakMap();
|
|
6
32
|
const registrationListeners = /* @__PURE__ */ new Set();
|
|
7
33
|
function onCanvasSourceRegistered(listener) {
|
|
@@ -21703,6 +21729,487 @@ const rrweb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
21703
21729
|
takeFullSnapshot,
|
|
21704
21730
|
utils
|
|
21705
21731
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
21732
|
+
const RRWEB_SOURCE = {
|
|
21733
|
+
Mutation: 0,
|
|
21734
|
+
MouseMove: 1,
|
|
21735
|
+
MouseInteraction: 2,
|
|
21736
|
+
Scroll: 3,
|
|
21737
|
+
ViewportResize: 4,
|
|
21738
|
+
Input: 5,
|
|
21739
|
+
TouchMove: 6,
|
|
21740
|
+
MediaInteraction: 7,
|
|
21741
|
+
StyleSheetRule: 8,
|
|
21742
|
+
CanvasMutation: 9,
|
|
21743
|
+
Font: 10,
|
|
21744
|
+
Log: 11,
|
|
21745
|
+
Drag: 12,
|
|
21746
|
+
StyleDeclaration: 13,
|
|
21747
|
+
Selection: 14,
|
|
21748
|
+
AdoptedStyleSheet: 15,
|
|
21749
|
+
CustomElement: 16
|
|
21750
|
+
};
|
|
21751
|
+
const RRWEB_NODE_TYPE = {
|
|
21752
|
+
Document: 0,
|
|
21753
|
+
DocumentType: 1,
|
|
21754
|
+
Element: 2,
|
|
21755
|
+
Text: 3
|
|
21756
|
+
};
|
|
21757
|
+
function isRecord(value) {
|
|
21758
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21759
|
+
}
|
|
21760
|
+
function isNodeId(value) {
|
|
21761
|
+
return typeof value === "number" && value > 0;
|
|
21762
|
+
}
|
|
21763
|
+
function walkSerializedNode(node2, visit2) {
|
|
21764
|
+
visit2(node2);
|
|
21765
|
+
for (const child of node2.childNodes ?? []) {
|
|
21766
|
+
walkSerializedNode(child, visit2);
|
|
21767
|
+
}
|
|
21768
|
+
}
|
|
21769
|
+
class ReplayDomTree {
|
|
21770
|
+
constructor() {
|
|
21771
|
+
this.parents = /* @__PURE__ */ new Map();
|
|
21772
|
+
}
|
|
21773
|
+
snapshot(root2) {
|
|
21774
|
+
this.parents.clear();
|
|
21775
|
+
this.add(root2, null);
|
|
21776
|
+
}
|
|
21777
|
+
mutate(data) {
|
|
21778
|
+
for (const remove of Array.isArray(data.removes) ? data.removes : []) {
|
|
21779
|
+
if (isRecord(remove) && typeof remove.id === "number") this.parents.delete(remove.id);
|
|
21780
|
+
}
|
|
21781
|
+
for (const add of Array.isArray(data.adds) ? data.adds : []) {
|
|
21782
|
+
if (isRecord(add) && isRecord(add.node) && typeof add.parentId === "number") {
|
|
21783
|
+
this.add(add.node, add.parentId);
|
|
21784
|
+
}
|
|
21785
|
+
}
|
|
21786
|
+
}
|
|
21787
|
+
/** 부모를 따라 올라가 문서 뿌리에 닿는지. 조상이 지워졌으면 닿지 않는다. */
|
|
21788
|
+
has(id) {
|
|
21789
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21790
|
+
let current = typeof id === "number" ? id : void 0;
|
|
21791
|
+
while (typeof current === "number" && !seen.has(current)) {
|
|
21792
|
+
seen.add(current);
|
|
21793
|
+
current = this.parents.get(current);
|
|
21794
|
+
}
|
|
21795
|
+
return current === null;
|
|
21796
|
+
}
|
|
21797
|
+
add(node2, parentId) {
|
|
21798
|
+
if (typeof node2.id !== "number") return;
|
|
21799
|
+
this.parents.set(node2.id, parentId);
|
|
21800
|
+
for (const child of node2.childNodes ?? []) this.add(child, node2.id);
|
|
21801
|
+
}
|
|
21802
|
+
}
|
|
21803
|
+
const REPLAY_MASKED_ATTRIBUTE = "data-issue-sticker-masked";
|
|
21804
|
+
const PLACEHOLDER_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
21805
|
+
"style",
|
|
21806
|
+
REPLAY_MASKED_ATTRIBUTE
|
|
21807
|
+
]);
|
|
21808
|
+
const PLACEHOLDER_MUTABLE_ATTRIBUTES = /* @__PURE__ */ new Set(["style"]);
|
|
21809
|
+
const LAYOUT_PROPERTIES = [
|
|
21810
|
+
"display",
|
|
21811
|
+
"position",
|
|
21812
|
+
"inset",
|
|
21813
|
+
"top",
|
|
21814
|
+
"right",
|
|
21815
|
+
"bottom",
|
|
21816
|
+
"left",
|
|
21817
|
+
"float",
|
|
21818
|
+
"clear",
|
|
21819
|
+
"z-index",
|
|
21820
|
+
"box-sizing",
|
|
21821
|
+
"width",
|
|
21822
|
+
"height",
|
|
21823
|
+
"min-width",
|
|
21824
|
+
"min-height",
|
|
21825
|
+
"max-width",
|
|
21826
|
+
"max-height",
|
|
21827
|
+
"margin",
|
|
21828
|
+
"margin-top",
|
|
21829
|
+
"margin-right",
|
|
21830
|
+
"margin-bottom",
|
|
21831
|
+
"margin-left",
|
|
21832
|
+
"flex",
|
|
21833
|
+
"flex-grow",
|
|
21834
|
+
"flex-shrink",
|
|
21835
|
+
"flex-basis",
|
|
21836
|
+
"align-self",
|
|
21837
|
+
"justify-self",
|
|
21838
|
+
"order",
|
|
21839
|
+
"grid-area",
|
|
21840
|
+
"grid-row",
|
|
21841
|
+
"grid-row-start",
|
|
21842
|
+
"grid-row-end",
|
|
21843
|
+
"grid-column",
|
|
21844
|
+
"grid-column-start",
|
|
21845
|
+
"grid-column-end",
|
|
21846
|
+
"vertical-align",
|
|
21847
|
+
"visibility",
|
|
21848
|
+
"transform",
|
|
21849
|
+
"transform-origin",
|
|
21850
|
+
"translate",
|
|
21851
|
+
"scale",
|
|
21852
|
+
"rotate"
|
|
21853
|
+
];
|
|
21854
|
+
const LAYOUT_PROPERTY_SET = new Set(LAYOUT_PROPERTIES);
|
|
21855
|
+
const SHORTHAND_PARTS = {
|
|
21856
|
+
inset: ["top", "right", "bottom", "left"],
|
|
21857
|
+
margin: ["margin-top", "margin-right", "margin-bottom", "margin-left"],
|
|
21858
|
+
flex: ["flex-grow", "flex-shrink", "flex-basis"],
|
|
21859
|
+
"grid-area": [
|
|
21860
|
+
"grid-row",
|
|
21861
|
+
"grid-row-start",
|
|
21862
|
+
"grid-row-end",
|
|
21863
|
+
"grid-column",
|
|
21864
|
+
"grid-column-start",
|
|
21865
|
+
"grid-column-end"
|
|
21866
|
+
],
|
|
21867
|
+
"grid-row": ["grid-row-start", "grid-row-end"],
|
|
21868
|
+
"grid-column": ["grid-column-start", "grid-column-end"]
|
|
21869
|
+
};
|
|
21870
|
+
const LAYOUT_FUNCTIONS = /* @__PURE__ */ new Set([
|
|
21871
|
+
"calc",
|
|
21872
|
+
"min",
|
|
21873
|
+
"max",
|
|
21874
|
+
"clamp",
|
|
21875
|
+
"translate",
|
|
21876
|
+
"translatex",
|
|
21877
|
+
"translatey",
|
|
21878
|
+
"translatez",
|
|
21879
|
+
"translate3d",
|
|
21880
|
+
"rotate",
|
|
21881
|
+
"rotatex",
|
|
21882
|
+
"rotatey",
|
|
21883
|
+
"rotatez",
|
|
21884
|
+
"rotate3d",
|
|
21885
|
+
"scale",
|
|
21886
|
+
"scalex",
|
|
21887
|
+
"scaley",
|
|
21888
|
+
"scalez",
|
|
21889
|
+
"scale3d",
|
|
21890
|
+
"skew",
|
|
21891
|
+
"skewx",
|
|
21892
|
+
"skewy",
|
|
21893
|
+
"matrix",
|
|
21894
|
+
"matrix3d",
|
|
21895
|
+
"perspective",
|
|
21896
|
+
"fit-content"
|
|
21897
|
+
]);
|
|
21898
|
+
const UNSAFE_LAYOUT_TEXT = /[\\"'[\]]|--|\/\*|[\u0080-\uffff]/;
|
|
21899
|
+
const FUNCTION_NAME = /[^\s(,/*+]*$/;
|
|
21900
|
+
const LAYOUT_KEYWORDS = /* @__PURE__ */ new Set([
|
|
21901
|
+
"auto",
|
|
21902
|
+
"none",
|
|
21903
|
+
"normal",
|
|
21904
|
+
"block",
|
|
21905
|
+
"inline",
|
|
21906
|
+
"inline-block",
|
|
21907
|
+
"flex",
|
|
21908
|
+
"inline-flex",
|
|
21909
|
+
"grid",
|
|
21910
|
+
"inline-grid",
|
|
21911
|
+
"contents",
|
|
21912
|
+
"flow-root",
|
|
21913
|
+
"table",
|
|
21914
|
+
"table-cell",
|
|
21915
|
+
"table-row",
|
|
21916
|
+
"list-item",
|
|
21917
|
+
"-webkit-box",
|
|
21918
|
+
"-webkit-inline-box",
|
|
21919
|
+
"inline-table",
|
|
21920
|
+
"table-row-group",
|
|
21921
|
+
"table-header-group",
|
|
21922
|
+
"table-footer-group",
|
|
21923
|
+
"table-column-group",
|
|
21924
|
+
"table-caption",
|
|
21925
|
+
"table-column",
|
|
21926
|
+
"ruby",
|
|
21927
|
+
"math",
|
|
21928
|
+
"static",
|
|
21929
|
+
"relative",
|
|
21930
|
+
"absolute",
|
|
21931
|
+
"fixed",
|
|
21932
|
+
"sticky",
|
|
21933
|
+
"visible",
|
|
21934
|
+
"hidden",
|
|
21935
|
+
"collapse",
|
|
21936
|
+
"clip",
|
|
21937
|
+
"scroll",
|
|
21938
|
+
"left",
|
|
21939
|
+
"right",
|
|
21940
|
+
"top",
|
|
21941
|
+
"bottom",
|
|
21942
|
+
"center",
|
|
21943
|
+
"middle",
|
|
21944
|
+
"start",
|
|
21945
|
+
"end",
|
|
21946
|
+
"flex-start",
|
|
21947
|
+
"flex-end",
|
|
21948
|
+
"self-start",
|
|
21949
|
+
"self-end",
|
|
21950
|
+
"inline-start",
|
|
21951
|
+
"inline-end",
|
|
21952
|
+
"both",
|
|
21953
|
+
"baseline",
|
|
21954
|
+
"sub",
|
|
21955
|
+
"super",
|
|
21956
|
+
"text-top",
|
|
21957
|
+
"text-bottom",
|
|
21958
|
+
"border-box",
|
|
21959
|
+
"content-box",
|
|
21960
|
+
"span",
|
|
21961
|
+
"row",
|
|
21962
|
+
"column",
|
|
21963
|
+
"nowrap",
|
|
21964
|
+
"wrap",
|
|
21965
|
+
"stretch",
|
|
21966
|
+
"space-between",
|
|
21967
|
+
"space-around",
|
|
21968
|
+
"space-evenly",
|
|
21969
|
+
"min-content",
|
|
21970
|
+
"max-content",
|
|
21971
|
+
"fit-content",
|
|
21972
|
+
"-webkit-fill-available",
|
|
21973
|
+
"content",
|
|
21974
|
+
"first",
|
|
21975
|
+
"last",
|
|
21976
|
+
"safe",
|
|
21977
|
+
"unsafe",
|
|
21978
|
+
"anchor-center",
|
|
21979
|
+
"infinity",
|
|
21980
|
+
"x",
|
|
21981
|
+
"y",
|
|
21982
|
+
"z",
|
|
21983
|
+
"inherit",
|
|
21984
|
+
"initial",
|
|
21985
|
+
"unset"
|
|
21986
|
+
]);
|
|
21987
|
+
const LAYOUT_NUMBER = /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?(?:%|px|em|rem|ex|ch|cap|ic|lh|rlh|rcap|rch|rex|ric|vw|vh|vi|vb|vmin|vmax|svw|svh|svi|svb|svmin|svmax|lvw|lvh|lvi|lvb|lvmin|lvmax|dvw|dvh|dvi|dvb|dvmin|dvmax|cqw|cqh|cqi|cqb|cqmin|cqmax|cm|mm|q|in|pt|pc|deg|rad|grad|turn)?$/i;
|
|
21988
|
+
function isLayoutToken(token) {
|
|
21989
|
+
return token === "+" || token === "-" || LAYOUT_NUMBER.test(token) || LAYOUT_KEYWORDS.has(token.toLowerCase());
|
|
21990
|
+
}
|
|
21991
|
+
const GRID_LINE = /^(?:auto|-?\d+|span\s+\d+)$/i;
|
|
21992
|
+
function isSafeLayoutValue(property, value) {
|
|
21993
|
+
var _a2;
|
|
21994
|
+
if (!value || UNSAFE_LAYOUT_TEXT.test(value)) return false;
|
|
21995
|
+
for (let index2 = value.indexOf("("); index2 !== -1; index2 = value.indexOf("(", index2 + 1)) {
|
|
21996
|
+
const name = ((_a2 = FUNCTION_NAME.exec(value.slice(0, index2))) == null ? void 0 : _a2[0]) ?? "";
|
|
21997
|
+
if (name && !LAYOUT_FUNCTIONS.has(name.toLowerCase())) return false;
|
|
21998
|
+
}
|
|
21999
|
+
const tokens = value.replace(/[^\s(,/*+]*\(/g, " ").split(/[\s,/*()]+/).filter(Boolean);
|
|
22000
|
+
if (!tokens.every(isLayoutToken)) return false;
|
|
22001
|
+
if (!property.startsWith("grid-")) return true;
|
|
22002
|
+
return value.split("/").every((line) => GRID_LINE.test(line.trim()));
|
|
22003
|
+
}
|
|
22004
|
+
function detachedStyle() {
|
|
22005
|
+
if (typeof document === "undefined") {
|
|
22006
|
+
throw new ReplayMaskingError("DOM 이 없어 style 을 읽을 수 없다");
|
|
22007
|
+
}
|
|
22008
|
+
return document.createElement("div").style;
|
|
22009
|
+
}
|
|
22010
|
+
const REPLACED_TAGS = /* @__PURE__ */ new Set([
|
|
22011
|
+
"img",
|
|
22012
|
+
"input",
|
|
22013
|
+
"textarea",
|
|
22014
|
+
"select",
|
|
22015
|
+
"option",
|
|
22016
|
+
"video",
|
|
22017
|
+
"audio",
|
|
22018
|
+
"canvas",
|
|
22019
|
+
"iframe",
|
|
22020
|
+
"object",
|
|
22021
|
+
"embed",
|
|
22022
|
+
"svg",
|
|
22023
|
+
"picture",
|
|
22024
|
+
"br",
|
|
22025
|
+
"hr",
|
|
22026
|
+
"wbr",
|
|
22027
|
+
"meter",
|
|
22028
|
+
"progress"
|
|
22029
|
+
]);
|
|
22030
|
+
const INLINE_TAGS = /* @__PURE__ */ new Set([
|
|
22031
|
+
"a",
|
|
22032
|
+
"abbr",
|
|
22033
|
+
"b",
|
|
22034
|
+
"bdi",
|
|
22035
|
+
"bdo",
|
|
22036
|
+
"button",
|
|
22037
|
+
"cite",
|
|
22038
|
+
"code",
|
|
22039
|
+
"data",
|
|
22040
|
+
"dfn",
|
|
22041
|
+
"em",
|
|
22042
|
+
"i",
|
|
22043
|
+
"kbd",
|
|
22044
|
+
"label",
|
|
22045
|
+
"mark",
|
|
22046
|
+
"output",
|
|
22047
|
+
"q",
|
|
22048
|
+
"s",
|
|
22049
|
+
"samp",
|
|
22050
|
+
"small",
|
|
22051
|
+
"span",
|
|
22052
|
+
"strong",
|
|
22053
|
+
"sub",
|
|
22054
|
+
"sup",
|
|
22055
|
+
"time",
|
|
22056
|
+
"u",
|
|
22057
|
+
"var",
|
|
22058
|
+
"img",
|
|
22059
|
+
"input",
|
|
22060
|
+
"textarea",
|
|
22061
|
+
"select",
|
|
22062
|
+
"video",
|
|
22063
|
+
"audio",
|
|
22064
|
+
"canvas",
|
|
22065
|
+
"iframe",
|
|
22066
|
+
"object",
|
|
22067
|
+
"embed",
|
|
22068
|
+
"svg",
|
|
22069
|
+
"picture",
|
|
22070
|
+
"meter",
|
|
22071
|
+
"progress"
|
|
22072
|
+
]);
|
|
22073
|
+
function readLayoutDeclarations(style, override = "") {
|
|
22074
|
+
const parsed = detachedStyle();
|
|
22075
|
+
parsed.cssText = style;
|
|
22076
|
+
for (const { property, value, important } of override ? readOverride(override) : []) {
|
|
22077
|
+
parsed.setProperty(property, value, important ? "important" : "");
|
|
22078
|
+
}
|
|
22079
|
+
return collectLayoutDeclarations(parsed);
|
|
22080
|
+
}
|
|
22081
|
+
const overrideCache = /* @__PURE__ */ new Map();
|
|
22082
|
+
const OVERRIDE_CACHE_LIMIT = 64;
|
|
22083
|
+
function readOverride(override) {
|
|
22084
|
+
let declarations = overrideCache.get(override);
|
|
22085
|
+
if (!declarations) {
|
|
22086
|
+
declarations = readLayoutDeclarations(override);
|
|
22087
|
+
if (overrideCache.size >= OVERRIDE_CACHE_LIMIT) overrideCache.clear();
|
|
22088
|
+
overrideCache.set(override, declarations);
|
|
22089
|
+
}
|
|
22090
|
+
return declarations;
|
|
22091
|
+
}
|
|
22092
|
+
function collectLayoutDeclarations(parsed) {
|
|
22093
|
+
const covered = /* @__PURE__ */ new Set();
|
|
22094
|
+
const declarations = [];
|
|
22095
|
+
for (const property of LAYOUT_PROPERTIES) {
|
|
22096
|
+
if (covered.has(property)) continue;
|
|
22097
|
+
const value = parsed.getPropertyValue(property).trim();
|
|
22098
|
+
if (!isSafeLayoutValue(property, value)) continue;
|
|
22099
|
+
declarations.push({
|
|
22100
|
+
property,
|
|
22101
|
+
value,
|
|
22102
|
+
important: parsed.getPropertyPriority(property) === "important"
|
|
22103
|
+
});
|
|
22104
|
+
for (const part of SHORTHAND_PARTS[property] ?? []) covered.add(part);
|
|
22105
|
+
}
|
|
22106
|
+
return declarations;
|
|
22107
|
+
}
|
|
22108
|
+
function writeDeclarations(declarations) {
|
|
22109
|
+
return declarations.map(
|
|
22110
|
+
({ property, value, important }) => `${property}: ${value}${important ? " !important" : ""};`
|
|
22111
|
+
).join(" ");
|
|
22112
|
+
}
|
|
22113
|
+
function filterLayoutStyle(style) {
|
|
22114
|
+
return writeDeclarations(readLayoutDeclarations(style));
|
|
22115
|
+
}
|
|
22116
|
+
function computedLayoutStyle(computed) {
|
|
22117
|
+
const parsed = detachedStyle();
|
|
22118
|
+
for (const property of LAYOUT_PROPERTIES) {
|
|
22119
|
+
const value = computed.getPropertyValue(property).trim();
|
|
22120
|
+
if (value) parsed.setProperty(property, value);
|
|
22121
|
+
}
|
|
22122
|
+
return writeDeclarations(collectLayoutDeclarations(parsed));
|
|
22123
|
+
}
|
|
22124
|
+
function filterLayoutStyleDiff(diff2) {
|
|
22125
|
+
const filtered = {};
|
|
22126
|
+
for (const [key, change] of Object.entries(diff2)) {
|
|
22127
|
+
const property = key.toLowerCase();
|
|
22128
|
+
if (!LAYOUT_PROPERTY_SET.has(property)) continue;
|
|
22129
|
+
if (change === false) {
|
|
22130
|
+
filtered[key] = false;
|
|
22131
|
+
continue;
|
|
22132
|
+
}
|
|
22133
|
+
const [value, priority] = Array.isArray(change) ? change : [change, ""];
|
|
22134
|
+
if (typeof value !== "string") continue;
|
|
22135
|
+
const important = priority === "important" ? "important" : "";
|
|
22136
|
+
const parsed = detachedStyle();
|
|
22137
|
+
parsed.setProperty(property, value, important);
|
|
22138
|
+
const readBack = parsed.getPropertyValue(property).trim();
|
|
22139
|
+
if (!isSafeLayoutValue(property, readBack)) continue;
|
|
22140
|
+
filtered[key] = Array.isArray(change) ? [readBack, important] : readBack;
|
|
22141
|
+
}
|
|
22142
|
+
return filtered;
|
|
22143
|
+
}
|
|
22144
|
+
function placeholderStyle(pageStyle, inline, size2, layout) {
|
|
22145
|
+
var _a2;
|
|
22146
|
+
const declarations = readLayoutDeclarations(pageStyle, layout);
|
|
22147
|
+
const display = ((_a2 = declarations.find((declaration2) => declaration2.property === "display")) == null ? void 0 : _a2.value) ?? (inline ? "inline" : "");
|
|
22148
|
+
const boxDisplay = display === "inline" ? "inline-block" : display === "contents" ? "block" : "";
|
|
22149
|
+
const kept = declarations.filter(
|
|
22150
|
+
({ property }) => !(boxDisplay && property === "display") && !(size2 && (property === "width" || property === "height"))
|
|
22151
|
+
);
|
|
22152
|
+
return [
|
|
22153
|
+
writeDeclarations(kept),
|
|
22154
|
+
boxDisplay ? `display: ${boxDisplay};` : "",
|
|
22155
|
+
size2 ? `width: ${size2.width}px; height: ${size2.height}px;` : ""
|
|
22156
|
+
].filter(Boolean).join(" ");
|
|
22157
|
+
}
|
|
22158
|
+
function buildPlaceholderNode(node2, size2, layout) {
|
|
22159
|
+
if (node2.type !== RRWEB_NODE_TYPE.Element) {
|
|
22160
|
+
throw new ReplayMaskingError(`가려짐 상자는 요소에만 만든다: 노드 ${String(node2.id)}`);
|
|
22161
|
+
}
|
|
22162
|
+
const tagName = String(node2.tagName ?? "div").toLowerCase();
|
|
22163
|
+
const attributes = isRecord(node2.attributes) ? node2.attributes : {};
|
|
22164
|
+
const insideSvg = node2.isSVG === true && tagName !== "svg";
|
|
22165
|
+
const inline = !insideSvg && INLINE_TAGS.has(tagName);
|
|
22166
|
+
const style = placeholderStyle(
|
|
22167
|
+
typeof attributes.style === "string" ? attributes.style : "",
|
|
22168
|
+
inline,
|
|
22169
|
+
size2,
|
|
22170
|
+
layout
|
|
22171
|
+
);
|
|
22172
|
+
return {
|
|
22173
|
+
inline,
|
|
22174
|
+
node: {
|
|
22175
|
+
type: RRWEB_NODE_TYPE.Element,
|
|
22176
|
+
id: node2.id,
|
|
22177
|
+
tagName: insideSvg || !REPLACED_TAGS.has(tagName) ? tagName : "div",
|
|
22178
|
+
attributes: {
|
|
22179
|
+
...style ? { style } : {},
|
|
22180
|
+
[REPLAY_MASKED_ATTRIBUTE]: ""
|
|
22181
|
+
},
|
|
22182
|
+
childNodes: [],
|
|
22183
|
+
...insideSvg ? { isSVG: true } : {},
|
|
22184
|
+
...node2.isShadow === true ? { isShadow: true } : {},
|
|
22185
|
+
...typeof node2.rootId === "number" ? { rootId: node2.rootId } : {}
|
|
22186
|
+
}
|
|
22187
|
+
};
|
|
22188
|
+
}
|
|
22189
|
+
const LOCK_ICON = `url("data:image/svg+xml,${encodeURIComponent(
|
|
22190
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>'
|
|
22191
|
+
)}")`;
|
|
22192
|
+
const MASKED = `[${REPLAY_MASKED_ATTRIBUTE}]`;
|
|
22193
|
+
function buildReplayMaskedStyleRules(containerQueries) {
|
|
22194
|
+
const rules2 = [
|
|
22195
|
+
`${MASKED} { background: repeating-linear-gradient(45deg, #E5E5E5 0 6px, #D4D4D4 6px 12px) !important; color: #404040 !important; visibility: inherit !important; opacity: 1 !important; overflow: hidden !important; box-sizing: border-box !important;${containerQueries ? " container-type: size !important;" : ""} }`,
|
|
22196
|
+
`${MASKED}::before { content: none !important; }`,
|
|
22197
|
+
`${MASKED}::after { content: ${LOCK_ICON} " ${MASKING_COPY.maskedLabel}" !important; display: flex !important; position: static !important; align-items: center !important; justify-content: center !important; gap: 4px !important; box-sizing: border-box !important; width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; background: none !important; color: #404040 !important; font: 12px/1.2 system-ui, sans-serif !important; white-space: nowrap !important; visibility: inherit !important; opacity: 1 !important; pointer-events: none !important; }`
|
|
22198
|
+
];
|
|
22199
|
+
if (!containerQueries) return rules2;
|
|
22200
|
+
const iconOnly = `${MASKED}::after { content: ${LOCK_ICON} !important; }`;
|
|
22201
|
+
return [
|
|
22202
|
+
...rules2,
|
|
22203
|
+
`@container (max-width: 139.98px) { ${iconOnly} }`,
|
|
22204
|
+
`@container (max-height: 39.98px) { ${iconOnly} }`
|
|
22205
|
+
];
|
|
22206
|
+
}
|
|
22207
|
+
function supportsContainerQueries() {
|
|
22208
|
+
return typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("container-type", "size");
|
|
22209
|
+
}
|
|
22210
|
+
const REPLAY_MASKED_STYLE_RULES = buildReplayMaskedStyleRules(
|
|
22211
|
+
supportsContainerQueries()
|
|
22212
|
+
);
|
|
21706
22213
|
const threeHandles = /* @__PURE__ */ new WeakMap();
|
|
21707
22214
|
function isThreeNamespace(value) {
|
|
21708
22215
|
const candidate = value;
|
|
@@ -27689,45 +28196,65 @@ function registerThree(handle) {
|
|
|
27689
28196
|
}
|
|
27690
28197
|
installThreeAutoDetect();
|
|
27691
28198
|
export {
|
|
27692
|
-
|
|
27693
|
-
|
|
28199
|
+
Root2 as $,
|
|
28200
|
+
gzip_1 as A,
|
|
28201
|
+
isRecord as B,
|
|
27694
28202
|
CANVAS_INTERACTION_TAG as C,
|
|
27695
28203
|
DismissableLayer as D,
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
|
|
27700
|
-
|
|
27701
|
-
|
|
28204
|
+
RRWEB_SOURCE as E,
|
|
28205
|
+
RRWEB_NODE_TYPE as F,
|
|
28206
|
+
walkSerializedNode as G,
|
|
28207
|
+
computedLayoutStyle as H,
|
|
28208
|
+
ReplayDomTree as I,
|
|
28209
|
+
isNodeId as J,
|
|
28210
|
+
PLACEHOLDER_ATTRIBUTES as K,
|
|
28211
|
+
PLACEHOLDER_MUTABLE_ATTRIBUTES as L,
|
|
28212
|
+
MASKING_COPY as M,
|
|
28213
|
+
LAYOUT_PROPERTY_SET as N,
|
|
27702
28214
|
OVERLAY_LAYER_INDEX as O,
|
|
27703
28215
|
Presence as P,
|
|
27704
|
-
|
|
27705
|
-
|
|
27706
|
-
|
|
27707
|
-
|
|
27708
|
-
|
|
28216
|
+
isSafeLayoutValue as Q,
|
|
28217
|
+
ReplayMaskingError as R,
|
|
28218
|
+
placeholderStyle as S,
|
|
28219
|
+
buildPlaceholderNode as T,
|
|
28220
|
+
filterLayoutStyle as U,
|
|
28221
|
+
filterLayoutStyleDiff as V,
|
|
28222
|
+
detachedStyle as W,
|
|
28223
|
+
record as X,
|
|
28224
|
+
Content as Y,
|
|
28225
|
+
createPopperScope as Z,
|
|
28226
|
+
Anchor as _,
|
|
28227
|
+
REPLAY_MASKED_ATTRIBUTE as a,
|
|
28228
|
+
Arrow as a0,
|
|
28229
|
+
VISUALLY_HIDDEN_STYLES as a1,
|
|
28230
|
+
clsx as a2,
|
|
28231
|
+
Slot as a3,
|
|
28232
|
+
Root as a4,
|
|
28233
|
+
createSlottable as a5,
|
|
28234
|
+
rrweb as a6,
|
|
28235
|
+
REPLAY_EVENT_TYPE as b,
|
|
27709
28236
|
createLucideIcon as c,
|
|
27710
|
-
|
|
27711
|
-
|
|
27712
|
-
|
|
27713
|
-
|
|
27714
|
-
|
|
27715
|
-
|
|
27716
|
-
|
|
27717
|
-
|
|
27718
|
-
|
|
27719
|
-
|
|
27720
|
-
|
|
27721
|
-
|
|
27722
|
-
|
|
27723
|
-
|
|
28237
|
+
REPLAY_MASKED_STYLE_RULES as d,
|
|
28238
|
+
cn as e,
|
|
28239
|
+
Replayer as f,
|
|
28240
|
+
MousePointer2 as g,
|
|
28241
|
+
usePortalContainer as h,
|
|
28242
|
+
OVERLAY_LAYER as i,
|
|
28243
|
+
useControllableState as j,
|
|
28244
|
+
useId as k,
|
|
28245
|
+
Primitive as l,
|
|
28246
|
+
composeEventHandlers as m,
|
|
28247
|
+
useDismissableLayerSurface as n,
|
|
28248
|
+
useComposedRefs as o,
|
|
28249
|
+
Portal as p,
|
|
28250
|
+
createContextScope as q,
|
|
27724
28251
|
registerThree as r,
|
|
27725
28252
|
stopEscapePropagation as s,
|
|
27726
|
-
|
|
28253
|
+
createSlot as t,
|
|
27727
28254
|
ungzip_1 as u,
|
|
27728
|
-
|
|
27729
|
-
|
|
27730
|
-
|
|
27731
|
-
|
|
27732
|
-
|
|
28255
|
+
useLayoutEffect2 as v,
|
|
28256
|
+
useCallbackRef as w,
|
|
28257
|
+
PortalContainerProvider as x,
|
|
28258
|
+
getCanvasSource as y,
|
|
28259
|
+
onCanvasSourceRegistered as z
|
|
27733
28260
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { P as Presence,
|
|
3
|
+
import { P as Presence, p as Portal$1, a0 as Arrow, D as DismissableLayer, Y as Content, a4 as Root, o as useComposedRefs, Z as createPopperScope, q as createContextScope, a5 as createSlottable, k as useId, j as useControllableState, $ as Root2, _ as Anchor, l as Primitive, m as composeEventHandlers, h as usePortalContainer, e as cn, i as OVERLAY_LAYER, s as stopEscapePropagation } from "./three-FamoZZKK.js";
|
|
4
4
|
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
5
5
|
createPopperScope
|
|
6
6
|
]);
|