issue-sticker 0.6.0 → 0.8.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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, useRef, useState, useCallback, useEffect } from "react";
3
- import { c as createLucideIcon, u as ungzip_1, a as cn, R as Replayer } from "./createLucideIcon-BzRMP02h.js";
4
- import { T as TooltipProvider, a as Tooltip, b as TooltipTrigger, c as TooltipContent } from "./tooltip-B6UPO-U8.js";
3
+ import { c as createLucideIcon, u as ungzip_1, a as cn, R as Replayer, M as MousePointer2 } from "./mouse-pointer-2-BR00y3ir.js";
4
+ import { T as TooltipProvider, a as Tooltip, b as TooltipTrigger, c as TooltipContent } from "./tooltip-DH02R32-.js";
5
5
  /**
6
6
  * @license lucide-react v0.468.0 - ISC
7
7
  *
@@ -14,21 +14,6 @@ const Maximize2 = createLucideIcon("Maximize2", [
14
14
  ["line", { x1: "21", x2: "14", y1: "3", y2: "10", key: "ota7mn" }],
15
15
  ["line", { x1: "3", x2: "10", y1: "21", y2: "14", key: "1atl0r" }]
16
16
  ]);
17
- /**
18
- * @license lucide-react v0.468.0 - ISC
19
- *
20
- * This source code is licensed under the ISC license.
21
- * See the LICENSE file in the root directory of this source tree.
22
- */
23
- const MousePointer2 = createLucideIcon("MousePointer2", [
24
- [
25
- "path",
26
- {
27
- d: "M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",
28
- key: "edeuup"
29
- }
30
- ]
31
- ]);
32
17
  /**
33
18
  * @license lucide-react v0.468.0 - ISC
34
19
  *
@@ -1,7 +1,7 @@
1
- import { u as uploadScreenshotDataUrls, a as uploadSignedMediaWithApi, d as directUploadToSignedUrl, p as pristineFetch, n as normalizeExposedJiraFields, b as normalizeJiraFieldId, g as getElementPosition, c as captureWithModernScreenshot, e as buildJiraCreateFields, f as buildNotionCreateFields, h as buildGuestOwnerQuery, i as buildIssueIntegrationsPayload, j as devLogger, C as ConsoleCollector, N as NetworkCollector, s as selectNetworkLogsForSubmit, k as filterExcludeServiceRelatedLogs, l as filterExcludeServiceRelatedConsoleLogs, m as compactNetworkLogsForTransport, o as CONSOLE_LOG_SUBMIT_LIMIT, q as buildExternalUserPayload, r as shrinkNetworkLogsToFit, t as measureJsonBytes, v as sanitizeString, w as getCurrentPageUrl, S as ScreenRecordingController, x as SessionReplayCaptureController, y as preloadModernScreenshot, I as ISSUE_STICKER_INTERNAL_LOG_PREFIX, z as isIssueStickerExtensionRuntimeActive } from "./externalUserPayload-B7zThnol.js";
1
+ import { u as uploadScreenshotDataUrls, a as uploadSignedMediaWithApi, d as directUploadToSignedUrl, p as pristineFetch, g as getElementPosition, c as captureWithModernScreenshot, b as buildJiraCreateFields, e as buildNotionCreateFields, f as buildGuestOwnerQuery, h as composeIssueFilterGroups, i as buildIssueIntegrationsPayload, j as devLogger, C as ConsoleCollector, N as NetworkCollector, s as selectNetworkLogsForSubmit, k as filterExcludeServiceRelatedLogs, l as filterExcludeServiceRelatedConsoleLogs, m as compactNetworkLogsForTransport, n as CONSOLE_LOG_SUBMIT_LIMIT, o as buildExternalUserPayload, q as shrinkNetworkLogsToFit, r as measureJsonBytes, t as sanitizeString, v as getCurrentPageUrl, S as ScreenRecordingController, w as SessionReplayCaptureController, x as preloadModernScreenshot, I as ISSUE_STICKER_INTERNAL_LOG_PREFIX } from "./externalUserPayload-k9LSBeMB.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
- import "./createLucideIcon-BzRMP02h.js";
4
+ import "./mouse-pointer-2-BR00y3ir.js";
5
5
  const WINDOW_MS = 6e4;
6
6
  const MAX_PER_WINDOW = 5;
7
7
  class AutoIssueRateLimit {
@@ -452,182 +452,6 @@ class HeadlessAuthBridge {
452
452
  this.options.onToken(result);
453
453
  }
454
454
  }
455
- const JIRA_FILTERABLE_FIELD_IDS = /* @__PURE__ */ new Set([
456
- "status",
457
- "priority",
458
- "assignee",
459
- "reporter",
460
- "fixVersions",
461
- "issuetype",
462
- "project_key",
463
- "sprint_id",
464
- "sprint_name",
465
- "epic_link",
466
- "story_points"
467
- ]);
468
- const NOTION_FILTERABLE_FIELD_TYPES = /* @__PURE__ */ new Set(["select", "multi_select", "status", "checkbox"]);
469
- function getJiraConfig(integration) {
470
- if (integration.service_type !== "JIRA") return null;
471
- return integration.config ?? null;
472
- }
473
- function getNotionConfig(integration) {
474
- if (integration.service_type !== "NOTION") return null;
475
- return integration.config ?? null;
476
- }
477
- function getExposedFields(config) {
478
- if (!(config == null ? void 0 : config.exposed_fields)) return [];
479
- return normalizeExposedJiraFields(
480
- Array.isArray(config.exposed_fields) ? config.exposed_fields : void 0
481
- );
482
- }
483
- function getLastKnownJiraFields(config) {
484
- const fields = config == null ? void 0 : config.last_known_fields;
485
- if (!Array.isArray(fields)) return [];
486
- return fields.filter(
487
- (field) => Boolean(field) && typeof field === "object" && typeof field.id === "string" && typeof field.name === "string"
488
- );
489
- }
490
- function getSelectedNotionFields(config) {
491
- const fields = config == null ? void 0 : config.selected_fields;
492
- if (!Array.isArray(fields)) return [];
493
- return fields.filter((field) => typeof field === "string");
494
- }
495
- function getLastKnownNotionFields(config) {
496
- const fields = config == null ? void 0 : config.last_known_fields;
497
- if (!Array.isArray(fields)) return [];
498
- return fields.filter(
499
- (field) => Boolean(field) && typeof field === "object" && typeof field.id === "string" && typeof field.name === "string" && typeof field.type === "string"
500
- );
501
- }
502
- const OPTION_CUSTOM_FIELD_TYPES = /* @__PURE__ */ new Set(["select", "multi_select"]);
503
- function getSelectableCustomFieldOptions(field) {
504
- var _a;
505
- if (!OPTION_CUSTOM_FIELD_TYPES.has(field.field_type)) return [];
506
- const rawOptions = (_a = field.field_config) == null ? void 0 : _a.options;
507
- if (!Array.isArray(rawOptions)) return [];
508
- return rawOptions.filter((option) => typeof option === "string" && option.trim().length > 0).map((option) => ({ label: option, value: option }));
509
- }
510
- function getJiraOptionValue(option) {
511
- return option.id;
512
- }
513
- function getJiraFieldFilterOptions(field) {
514
- const options = field.options ?? [];
515
- if (!options.length) return [];
516
- return options.map((option) => ({
517
- label: option.name || option.value || option.id,
518
- value: getJiraOptionValue(option)
519
- })).filter((option) => option.value.length > 0);
520
- }
521
- function getNotionFieldFilterOptions(field) {
522
- if (field.type === "checkbox") {
523
- return [
524
- { label: "체크됨", value: "true" },
525
- { label: "체크 안 됨", value: "false" }
526
- ];
527
- }
528
- const options = field.options ?? [];
529
- if (!options.length) return [];
530
- return options.map((option) => ({
531
- label: option.name,
532
- value: option.name
533
- })).filter((option) => option.value.length > 0);
534
- }
535
- function mergeOptions(current, next) {
536
- const byValue = new Map(current.map((option) => [option.value, option]));
537
- for (const option of next) {
538
- if (!byValue.has(option.value)) {
539
- byValue.set(option.value, option);
540
- }
541
- }
542
- return Array.from(byValue.values()).sort((a, b) => a.label.localeCompare(b.label));
543
- }
544
- function upsertFilterGroup(groups, group) {
545
- const existing = groups.get(group.id);
546
- if (!existing) {
547
- groups.set(group.id, {
548
- ...group,
549
- options: mergeOptions([], group.options)
550
- });
551
- return;
552
- }
553
- groups.set(group.id, {
554
- ...existing,
555
- options: mergeOptions(existing.options, group.options)
556
- });
557
- }
558
- function appendCustomFieldFilterGroups(groups, customFields) {
559
- for (const field of customFields) {
560
- const options = getSelectableCustomFieldOptions(field);
561
- if (!options.length) continue;
562
- upsertFilterGroup(groups, {
563
- kind: "custom",
564
- id: `custom:${field.id}`,
565
- fieldDefinitionId: field.id,
566
- label: field.field_name,
567
- options
568
- });
569
- }
570
- }
571
- function appendJiraFieldFilterGroups(groups, exposedFieldIds, fields) {
572
- for (const field of fields) {
573
- const normalizedFieldId = normalizeJiraFieldId(field.id);
574
- if (!exposedFieldIds.has(normalizedFieldId) || !JIRA_FILTERABLE_FIELD_IDS.has(normalizedFieldId)) {
575
- continue;
576
- }
577
- const options = getJiraFieldFilterOptions(field);
578
- if (!options.length) continue;
579
- upsertFilterGroup(groups, {
580
- kind: "jira",
581
- id: `jira:${normalizedFieldId}`,
582
- fieldName: normalizedFieldId,
583
- label: field.name,
584
- options
585
- });
586
- }
587
- }
588
- function appendNotionFieldFilterGroups(groups, selectedFields, fields) {
589
- for (const field of fields) {
590
- if (!selectedFields.has(field.id) && !selectedFields.has(field.name)) continue;
591
- if (!NOTION_FILTERABLE_FIELD_TYPES.has(field.type)) continue;
592
- const options = getNotionFieldFilterOptions(field);
593
- if (!options.length) continue;
594
- upsertFilterGroup(groups, {
595
- kind: "notion",
596
- id: `notion:${field.id}`,
597
- fieldName: field.name,
598
- label: field.name,
599
- options
600
- });
601
- }
602
- }
603
- function composeIssueFilterGroups(integrations, customFields) {
604
- const groups = /* @__PURE__ */ new Map();
605
- const jiraIntegration = integrations.find((integration) => {
606
- const config = getJiraConfig(integration);
607
- return integration.is_active !== false && config;
608
- });
609
- appendCustomFieldFilterGroups(groups, customFields);
610
- const jiraConfig = jiraIntegration ? getJiraConfig(jiraIntegration) : null;
611
- const configExposedFields = getExposedFields(jiraConfig);
612
- if (configExposedFields.length) {
613
- appendJiraFieldFilterGroups(
614
- groups,
615
- new Set(configExposedFields),
616
- getLastKnownJiraFields(jiraConfig)
617
- );
618
- }
619
- for (const integration of integrations) {
620
- if (integration.is_active === false) continue;
621
- const notionConfig = getNotionConfig(integration);
622
- if (!notionConfig) continue;
623
- appendNotionFieldFilterGroups(
624
- groups,
625
- new Set(getSelectedNotionFields(notionConfig)),
626
- getLastKnownNotionFields(notionConfig)
627
- );
628
- }
629
- return Array.from(groups.values()).sort((a, b) => a.label.localeCompare(b.label));
630
- }
631
455
  function buildHeadlessCaptureContext({
632
456
  target,
633
457
  event,
@@ -1131,7 +955,6 @@ function createSessionReplayMeta(snapshot) {
1131
955
  }
1132
956
  function createInitialHeadlessSnapshot() {
1133
957
  return {
1134
- extensionActive: false,
1135
958
  phase: "idle",
1136
959
  auth: {
1137
960
  mode: "public",
@@ -1704,9 +1527,6 @@ class HeadlessClientImpl {
1704
1527
  return this.skipCreateIssue("브라우저 DOM 에서만 이슈를 만들 수 있습니다.");
1705
1528
  }
1706
1529
  await this.ensureInitialized();
1707
- if (this.snapshot.extensionActive) {
1708
- return this.skipCreateIssue("이슈스티커 익스텐션이 이 페이지를 사용 중입니다.");
1709
- }
1710
1530
  if (!this.autoIssueRateLimit.claim()) {
1711
1531
  return this.skipCreateIssue(
1712
1532
  `${this.autoIssueRateLimit.label}까지 호출할 수 있습니다. 호출 조건을 다시 확인해주세요.`
@@ -1807,10 +1627,6 @@ class HeadlessClientImpl {
1807
1627
  this.state.reset();
1808
1628
  }
1809
1629
  async initializeInternal() {
1810
- if (isIssueStickerExtensionRuntimeActive()) {
1811
- this.state.setSnapshot({ extensionActive: true, phase: "idle", error: null });
1812
- return;
1813
- }
1814
1630
  this.state.setSnapshot({ phase: "initializing", error: null });
1815
1631
  try {
1816
1632
  const result = await this.request("/api/sdk/auth/public-init", {