@adhese/sdk-devtools 0.6.2 → 0.6.3

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,6 +1,5 @@
1
1
  import require$$0, { forwardRef, useState, useEffect, useMemo, Fragment, useCallback, useId, useRef } from "react";
2
2
  import require$$0$1, { createPortal } from "react-dom";
3
- import { upperFirst } from "lodash-es";
4
3
  import { clsx } from "clsx";
5
4
  import { twMerge } from "tailwind-merge";
6
5
  import { cva } from "class-variance-authority";
@@ -10,6 +9,10 @@ import { Cross2Icon } from "@radix-ui/react-icons";
10
9
  import * as TabsPrimitive from "@radix-ui/react-tabs";
11
10
  import * as SwitchPrimitives from "@radix-ui/react-switch";
12
11
  import * as LabelPrimitive from "@radix-ui/react-label";
12
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
13
+ function getDefaultExportFromCjs(x) {
14
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
15
+ }
13
16
  var jsxRuntime = { exports: {} };
14
17
  var reactJsxRuntime_production_min = {};
15
18
  /**
@@ -459,7 +462,7 @@ function requireReactJsxRuntime_development() {
459
462
  }
460
463
  return "";
461
464
  }
462
- var hasOwnProperty = Object.prototype.hasOwnProperty;
465
+ var hasOwnProperty2 = Object.prototype.hasOwnProperty;
463
466
  var loggedTypeFailures = {};
464
467
  var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
465
468
  function setCurrentlyValidatingElement(element) {
@@ -475,7 +478,7 @@ function requireReactJsxRuntime_development() {
475
478
  }
476
479
  function checkPropTypes(typeSpecs, values, location, componentName, element) {
477
480
  {
478
- var has = Function.call.bind(hasOwnProperty);
481
+ var has = Function.call.bind(hasOwnProperty2);
479
482
  for (var typeSpecName in typeSpecs) {
480
483
  if (has(typeSpecs, typeSpecName)) {
481
484
  var error$1 = void 0;
@@ -505,7 +508,7 @@ function requireReactJsxRuntime_development() {
505
508
  }
506
509
  }
507
510
  var isArrayImpl = Array.isArray;
508
- function isArray(a) {
511
+ function isArray2(a) {
509
512
  return isArrayImpl(a);
510
513
  }
511
514
  function typeName(value) {
@@ -551,7 +554,7 @@ function requireReactJsxRuntime_development() {
551
554
  }
552
555
  function hasValidRef(config) {
553
556
  {
554
- if (hasOwnProperty.call(config, "ref")) {
557
+ if (hasOwnProperty2.call(config, "ref")) {
555
558
  var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
556
559
  if (getter && getter.isReactWarning) {
557
560
  return false;
@@ -562,7 +565,7 @@ function requireReactJsxRuntime_development() {
562
565
  }
563
566
  function hasValidKey(config) {
564
567
  {
565
- if (hasOwnProperty.call(config, "key")) {
568
+ if (hasOwnProperty2.call(config, "key")) {
566
569
  var getter = Object.getOwnPropertyDescriptor(config, "key").get;
567
570
  if (getter && getter.isReactWarning) {
568
571
  return false;
@@ -571,9 +574,9 @@ function requireReactJsxRuntime_development() {
571
574
  }
572
575
  return config.key !== void 0;
573
576
  }
574
- function warnIfStringRefCannotBeAutoConverted(config, self) {
577
+ function warnIfStringRefCannotBeAutoConverted(config, self2) {
575
578
  {
576
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
579
+ if (typeof config.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) {
577
580
  var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
578
581
  if (!didWarnAboutStringRefs[componentName]) {
579
582
  error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
@@ -612,7 +615,7 @@ function requireReactJsxRuntime_development() {
612
615
  });
613
616
  }
614
617
  }
615
- var ReactElement = function(type, key, ref, self, source, owner, props) {
618
+ var ReactElement = function(type, key, ref, self2, source, owner, props) {
616
619
  var element = {
617
620
  // This tag allows us to uniquely identify this as a React Element
618
621
  $$typeof: REACT_ELEMENT_TYPE,
@@ -636,7 +639,7 @@ function requireReactJsxRuntime_development() {
636
639
  configurable: false,
637
640
  enumerable: false,
638
641
  writable: false,
639
- value: self
642
+ value: self2
640
643
  });
641
644
  Object.defineProperty(element, "_source", {
642
645
  configurable: false,
@@ -651,7 +654,7 @@ function requireReactJsxRuntime_development() {
651
654
  }
652
655
  return element;
653
656
  };
654
- function jsxDEV(type, config, maybeKey, source, self) {
657
+ function jsxDEV(type, config, maybeKey, source, self2) {
655
658
  {
656
659
  var propName;
657
660
  var props = {};
@@ -671,10 +674,10 @@ function requireReactJsxRuntime_development() {
671
674
  }
672
675
  if (hasValidRef(config)) {
673
676
  ref = config.ref;
674
- warnIfStringRefCannotBeAutoConverted(config, self);
677
+ warnIfStringRefCannotBeAutoConverted(config, self2);
675
678
  }
676
679
  for (propName in config) {
677
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
680
+ if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
678
681
  props[propName] = config[propName];
679
682
  }
680
683
  }
@@ -695,7 +698,7 @@ function requireReactJsxRuntime_development() {
695
698
  defineRefPropWarningGetter(props, displayName);
696
699
  }
697
700
  }
698
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
701
+ return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
699
702
  }
700
703
  }
701
704
  var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
@@ -779,7 +782,7 @@ function requireReactJsxRuntime_development() {
779
782
  if (typeof node !== "object") {
780
783
  return;
781
784
  }
782
- if (isArray(node)) {
785
+ if (isArray2(node)) {
783
786
  for (var i = 0; i < node.length; i++) {
784
787
  var child = node[i];
785
788
  if (isValidElement(child)) {
@@ -854,7 +857,7 @@ function requireReactJsxRuntime_development() {
854
857
  }
855
858
  }
856
859
  }
857
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
860
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self2) {
858
861
  {
859
862
  var validType = isValidElementType(type);
860
863
  if (!validType) {
@@ -871,7 +874,7 @@ function requireReactJsxRuntime_development() {
871
874
  var typeString;
872
875
  if (type === null) {
873
876
  typeString = "null";
874
- } else if (isArray(type)) {
877
+ } else if (isArray2(type)) {
875
878
  typeString = "array";
876
879
  } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
877
880
  typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
@@ -881,7 +884,7 @@ function requireReactJsxRuntime_development() {
881
884
  }
882
885
  error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
883
886
  }
884
- var element = jsxDEV(type, props, key, source, self);
887
+ var element = jsxDEV(type, props, key, source, self2);
885
888
  if (element == null) {
886
889
  return element;
887
890
  }
@@ -889,7 +892,7 @@ function requireReactJsxRuntime_development() {
889
892
  var children = props.children;
890
893
  if (children !== void 0) {
891
894
  if (isStaticChildren) {
892
- if (isArray(children)) {
895
+ if (isArray2(children)) {
893
896
  for (var i = 0; i < children.length; i++) {
894
897
  validateChildKeys(children[i], type);
895
898
  }
@@ -953,6 +956,160 @@ if (process.env.NODE_ENV === "production") {
953
956
  }
954
957
  };
955
958
  }
959
+ function baseSlice$1(array, start, end) {
960
+ var index = -1, length = array.length;
961
+ if (start < 0) {
962
+ start = -start > length ? 0 : length + start;
963
+ }
964
+ end = end > length ? length : end;
965
+ if (end < 0) {
966
+ end += length;
967
+ }
968
+ length = start > end ? 0 : end - start >>> 0;
969
+ start >>>= 0;
970
+ var result = Array(length);
971
+ while (++index < length) {
972
+ result[index] = array[index + start];
973
+ }
974
+ return result;
975
+ }
976
+ var _baseSlice = baseSlice$1;
977
+ var baseSlice = _baseSlice;
978
+ function castSlice$1(array, start, end) {
979
+ var length = array.length;
980
+ end = end === void 0 ? length : end;
981
+ return !start && end >= length ? array : baseSlice(array, start, end);
982
+ }
983
+ var _castSlice = castSlice$1;
984
+ var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
985
+ var rsZWJ$1 = "\\u200d";
986
+ var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
987
+ function hasUnicode$2(string) {
988
+ return reHasUnicode.test(string);
989
+ }
990
+ var _hasUnicode = hasUnicode$2;
991
+ function asciiToArray$1(string) {
992
+ return string.split("");
993
+ }
994
+ var _asciiToArray = asciiToArray$1;
995
+ var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = "\\ufe0e\\ufe0f";
996
+ var rsAstral = "[" + rsAstralRange + "]", rsCombo = "[" + rsComboRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ = "\\u200d";
997
+ var reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
998
+ var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
999
+ function unicodeToArray$1(string) {
1000
+ return string.match(reUnicode) || [];
1001
+ }
1002
+ var _unicodeToArray = unicodeToArray$1;
1003
+ var asciiToArray = _asciiToArray, hasUnicode$1 = _hasUnicode, unicodeToArray = _unicodeToArray;
1004
+ function stringToArray$1(string) {
1005
+ return hasUnicode$1(string) ? unicodeToArray(string) : asciiToArray(string);
1006
+ }
1007
+ var _stringToArray = stringToArray$1;
1008
+ var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
1009
+ var _freeGlobal = freeGlobal$1;
1010
+ var freeGlobal = _freeGlobal;
1011
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
1012
+ var root$1 = freeGlobal || freeSelf || Function("return this")();
1013
+ var _root = root$1;
1014
+ var root = _root;
1015
+ var Symbol$4 = root.Symbol;
1016
+ var _Symbol = Symbol$4;
1017
+ function arrayMap$1(array, iteratee) {
1018
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
1019
+ while (++index < length) {
1020
+ result[index] = iteratee(array[index], index, array);
1021
+ }
1022
+ return result;
1023
+ }
1024
+ var _arrayMap = arrayMap$1;
1025
+ var isArray$1 = Array.isArray;
1026
+ var isArray_1 = isArray$1;
1027
+ var Symbol$3 = _Symbol;
1028
+ var objectProto$1 = Object.prototype;
1029
+ var hasOwnProperty = objectProto$1.hasOwnProperty;
1030
+ var nativeObjectToString$1 = objectProto$1.toString;
1031
+ var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : void 0;
1032
+ function getRawTag$1(value) {
1033
+ var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
1034
+ try {
1035
+ value[symToStringTag$1] = void 0;
1036
+ var unmasked = true;
1037
+ } catch (e) {
1038
+ }
1039
+ var result = nativeObjectToString$1.call(value);
1040
+ if (unmasked) {
1041
+ if (isOwn) {
1042
+ value[symToStringTag$1] = tag;
1043
+ } else {
1044
+ delete value[symToStringTag$1];
1045
+ }
1046
+ }
1047
+ return result;
1048
+ }
1049
+ var _getRawTag = getRawTag$1;
1050
+ var objectProto = Object.prototype;
1051
+ var nativeObjectToString = objectProto.toString;
1052
+ function objectToString$1(value) {
1053
+ return nativeObjectToString.call(value);
1054
+ }
1055
+ var _objectToString = objectToString$1;
1056
+ var Symbol$2 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
1057
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
1058
+ var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
1059
+ function baseGetTag$1(value) {
1060
+ if (value == null) {
1061
+ return value === void 0 ? undefinedTag : nullTag;
1062
+ }
1063
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
1064
+ }
1065
+ var _baseGetTag = baseGetTag$1;
1066
+ function isObjectLike$1(value) {
1067
+ return value != null && typeof value == "object";
1068
+ }
1069
+ var isObjectLike_1 = isObjectLike$1;
1070
+ var baseGetTag = _baseGetTag, isObjectLike = isObjectLike_1;
1071
+ var symbolTag = "[object Symbol]";
1072
+ function isSymbol$1(value) {
1073
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
1074
+ }
1075
+ var isSymbol_1 = isSymbol$1;
1076
+ var Symbol$1 = _Symbol, arrayMap = _arrayMap, isArray = isArray_1, isSymbol = isSymbol_1;
1077
+ var INFINITY = 1 / 0;
1078
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
1079
+ function baseToString$1(value) {
1080
+ if (typeof value == "string") {
1081
+ return value;
1082
+ }
1083
+ if (isArray(value)) {
1084
+ return arrayMap(value, baseToString$1) + "";
1085
+ }
1086
+ if (isSymbol(value)) {
1087
+ return symbolToString ? symbolToString.call(value) : "";
1088
+ }
1089
+ var result = value + "";
1090
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
1091
+ }
1092
+ var _baseToString = baseToString$1;
1093
+ var baseToString = _baseToString;
1094
+ function toString$1(value) {
1095
+ return value == null ? "" : baseToString(value);
1096
+ }
1097
+ var toString_1 = toString$1;
1098
+ var castSlice = _castSlice, hasUnicode = _hasUnicode, stringToArray = _stringToArray, toString = toString_1;
1099
+ function createCaseFirst$1(methodName) {
1100
+ return function(string) {
1101
+ string = toString(string);
1102
+ var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
1103
+ var chr = strSymbols ? strSymbols[0] : string.charAt(0);
1104
+ var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
1105
+ return chr[methodName]() + trailing;
1106
+ };
1107
+ }
1108
+ var _createCaseFirst = createCaseFirst$1;
1109
+ var createCaseFirst = _createCaseFirst;
1110
+ var upperFirst = createCaseFirst("toUpperCase");
1111
+ var upperFirst_1 = upperFirst;
1112
+ const upperFirst$1 = /* @__PURE__ */ getDefaultExportFromCjs(upperFirst_1);
956
1113
  function cn(...inputs) {
957
1114
  return twMerge(clsx(inputs));
958
1115
  }
@@ -1295,7 +1452,7 @@ function SlotsTable({ adheseContext }) {
1295
1452
  /* @__PURE__ */ jsxRuntimeExports.jsx("del", { className: "text-red-300 italic", children: format }),
1296
1453
  /* @__PURE__ */ jsxRuntimeExports.jsx("ins", { className: "no-underline text-green-700", children: ad == null ? void 0 : ad.adFormat })
1297
1454
  ] }) }),
1298
- origins.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { children: (ad == null ? void 0 : ad.origin) && /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { className: cn(slotIndexBadgeClasses[origins.indexOf(ad.origin) % slotIndexBadgeClasses.length], "text-white"), children: upperFirst(ad.origin.toLowerCase()) }) }),
1455
+ origins.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { children: (ad == null ? void 0 : ad.origin) && /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { className: cn(slotIndexBadgeClasses[origins.indexOf(ad.origin) % slotIndexBadgeClasses.length], "text-white"), children: upperFirst$1(ad.origin.toLowerCase()) }) }),
1299
1456
  /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { children: location }),
1300
1457
  /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1301
1458
  Badge,
@@ -1493,7 +1650,7 @@ function LogTable({
1493
1650
  {
1494
1651
  variant: "secondary",
1495
1652
  className: logBadgeClasses[log.level] ?? "",
1496
- children: upperFirst(log.level)
1653
+ children: upperFirst$1(log.level)
1497
1654
  }
1498
1655
  ) }),
1499
1656
  /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { children: log.message }),
@@ -1766,10 +1923,10 @@ const Devtools$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
1766
1923
  Devtools
1767
1924
  }, Symbol.toStringTag, { value: "Module" }));
1768
1925
  function createAdheseDevtools(element, context) {
1769
- const root = createRoot(element);
1770
- root.render(/* @__PURE__ */ jsxRuntimeExports.jsx(Devtools, { adheseContext: context }));
1926
+ const root2 = createRoot(element);
1927
+ root2.render(/* @__PURE__ */ jsxRuntimeExports.jsx(Devtools, { adheseContext: context }));
1771
1928
  return () => {
1772
- root.unmount();
1929
+ root2.unmount();
1773
1930
  };
1774
1931
  }
1775
1932
  const main = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -1780,4 +1937,4 @@ export {
1780
1937
  Devtools$1 as D,
1781
1938
  main as m
1782
1939
  };
1783
- //# sourceMappingURL=devtools-BSERnwWF.js.map
1940
+ //# sourceMappingURL=devtools-B0YPZFCG.js.map