@cccsaurora/clue-ui 1.5.0-dev.485 → 1.6.0-dev.517.1

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.
Files changed (60) hide show
  1. package/{ActionForm-BMIAp7pf.js → ActionForm-Sj0KtEYj.js} +6 -6
  2. package/{AnnotationDetails-Dmk8kpl3.js → AnnotationDetails-B1NQ-B4f.js} +1 -1
  3. package/{AnnotationPreview-CIya3ByE.js → AnnotationPreview-Cw3JUL8k.js} +1 -1
  4. package/{ClueEnrichContext-BqzlMW0c.js → ClueEnrichContext-Dpv_xiDv.js} +3 -3
  5. package/components/AnnotationDetailPopover.js +3 -3
  6. package/components/AnnotationDetails.js +2 -2
  7. package/components/AnnotationPreview.js +1 -1
  8. package/components/EnrichedCard.js +1 -1
  9. package/components/EnrichedChip.js +3 -3
  10. package/components/EnrichedTypography.js +2 -2
  11. package/components/RetryFailedEnrichments.js +1 -1
  12. package/components/SourcePicker.js +1 -1
  13. package/components/actions/ActionForm.js +2 -2
  14. package/components/actions/ExecutePopover.js +1 -1
  15. package/components/actions/ResultModal.js +1 -1
  16. package/components/actions/formats/index.js +1 -1
  17. package/components/display/graph/elements/NodeCard.js +1 -1
  18. package/components/display/graph/index.js +1 -1
  19. package/components/display/graph/visualizations/cloud/index.js +1 -0
  20. package/components/display/graph/visualizations/icons/TargetIcon.js +0 -1
  21. package/components/display/graph/visualizations/tree/BundleLine.js +1 -0
  22. package/components/display/graph/visualizations/tree/index.js +1 -1
  23. package/components/display/json/index.js +1 -1
  24. package/components/enrichment/EnrichPopover.js +1 -1
  25. package/components/fetchers/Fetcher.js +1 -1
  26. package/components/fetchers/FetcherResultView.js +1 -1
  27. package/components/group/GroupControl.js +1 -1
  28. package/components/stats/QueryStatus.js +1 -1
  29. package/database/index.js +2 -2
  30. package/database/replication.js +2 -2
  31. package/hooks/ClueActionContext.js +2 -2
  32. package/hooks/ClueDatabaseContext.d.ts +1 -1
  33. package/hooks/ClueDatabaseContext.js +5 -1
  34. package/hooks/ClueEnrichContext.js +2 -2
  35. package/hooks/ClueFetcherContext.js +1 -1
  36. package/hooks/ClueGroupContext.js +1 -1
  37. package/hooks/CluePopupContext.js +2 -2
  38. package/hooks/ClueProvider.js +3 -3
  39. package/hooks/selectors.js +2 -2
  40. package/hooks/useActionResult.js +1 -1
  41. package/hooks/useAnnotations.js +2 -2
  42. package/hooks/useClue.js +1 -1
  43. package/hooks/useClueActions.js +1 -1
  44. package/hooks/useClueTypeConfig.js +1 -1
  45. package/hooks/useErrors.js +1 -1
  46. package/hooks/useFetcherResult.js +1 -1
  47. package/hooks/useMyHighlights.js +1 -1
  48. package/icons/Action.js +2 -2
  49. package/icons/Assessment.js +1 -1
  50. package/icons/Context.js +3 -3
  51. package/icons/Opinion.js +2 -2
  52. package/{index-Dd7KdsT8.js → index-29cEmZLo.js} +5 -5
  53. package/{index-CgvdVEs-.js → index-BCzfYx7I.js} +1 -1
  54. package/{index-DUEubgWN.js → index-D4JJWbGh.js} +2 -2
  55. package/{index-CdqmWKik.js → index-DieKGFn1.js} +76 -20
  56. package/index.css +2 -11
  57. package/main.js +5 -5
  58. package/package.json +19 -29
  59. package/plugins/json/index.js +1 -1
  60. package/{replication-Ck5s0Yg-.js → replication-DwPGDesg.js} +24 -9
package/icons/Context.js CHANGED
@@ -4,7 +4,7 @@ import { Stack, Divider } from "@mui/material";
4
4
  import AnnotationEntry from "../components/AnnotationEntry.js";
5
5
  import CountBadge from "../components/CountBadge.js";
6
6
  import Iconified from "../components/display/icons/Iconified.js";
7
- import { C as CluePopupContext } from "../AnnotationPreview-CIya3ByE.js";
7
+ import { C as CluePopupContext } from "../AnnotationPreview-Cw3JUL8k.js";
8
8
  import { g as groupBy } from "../groupBy-BVV07EGQ.js";
9
9
  import { memo, useRef, useMemo, useEffect } from "react";
10
10
  import { a as useContextSelector } from "../index-_gpzM2Px.js";
@@ -62,7 +62,7 @@ const ContextIcon = ({
62
62
  {
63
63
  icon,
64
64
  fontSize: otherProps.fontSize ?? "1.25em",
65
- style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))", ...otherProps.style ?? {} },
65
+ style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))", ...otherProps.style },
66
66
  ...otherProps
67
67
  }
68
68
  )
@@ -75,7 +75,7 @@ const ContextIcon = ({
75
75
  const additionalSize = contextAnnotations.length - additionalIcons.length;
76
76
  if (additionalSize > 0 && showExtraIcon) {
77
77
  icons.push(
78
- /* @__PURE__ */ jsx(CountBadge, { disabled: !counters, count: additionalSize, children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-newspaper", style: { zIndex: 2, ...otherProps.style ?? {} } }) }, "extra")
78
+ /* @__PURE__ */ jsx(CountBadge, { disabled: !counters, count: additionalSize, children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-newspaper", style: { zIndex: 2, ...otherProps.style } }) }, "extra")
79
79
  );
80
80
  }
81
81
  return /* @__PURE__ */ jsx(Stack, { direction: "row", spacing: 1, children: icons });
package/icons/Opinion.js CHANGED
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { I as Icon } from "../iconify-CYJTToEF.js";
3
3
  import { useTheme, Stack, Chip, Divider, Grid } from "@mui/material";
4
4
  import CountBadge from "../components/CountBadge.js";
5
- import { C as CluePopupContext } from "../AnnotationPreview-CIya3ByE.js";
5
+ import { C as CluePopupContext } from "../AnnotationPreview-Cw3JUL8k.js";
6
6
  import { g as groupBy } from "../groupBy-BVV07EGQ.js";
7
7
  import { s as sortBy } from "../sortBy-B8JVsLQY.js";
8
8
  import { s as sumBy } from "../sumBy-D-HCzM2i.js";
@@ -110,7 +110,7 @@ const OpinionIcon = ({ annotations, value, counters = true, disableTooltip = fal
110
110
  }[sortedOpinions[0][0]],
111
111
  style: {
112
112
  zIndex: 2,
113
- ...otherProps.style ?? {}
113
+ ...otherProps.style
114
114
  }
115
115
  }
116
116
  ) })
@@ -11,7 +11,7 @@ const get$b = (actionId, taskId, options = { timeout: null }, config) => {
11
11
  searchParams.push(`max_timeout=${options.timeout}`);
12
12
  }
13
13
  return hget(
14
- joinUri(uri$g(), `${actionId.replace(".", "/")}/status/${taskId}`),
14
+ joinUri(uri$g(), `${actionId.replace(".", "/")}/status/${encodeURIComponent(taskId)}`),
15
15
  searchParams.length > 0 ? new URLSearchParams(searchParams.join("&")) : null,
16
16
  config
17
17
  );
@@ -104,7 +104,7 @@ const get$7 = (fetcherId, taskId, options = { timeout: null }, config) => {
104
104
  searchParams.push(`max_timeout=${options.timeout}`);
105
105
  }
106
106
  return hget(
107
- joinUri(uri$g(), `${fetcherId.replace(".", "/")}/status/${taskId}`),
107
+ joinUri(uri$g(), `${fetcherId.replace(".", "/")}/status/${encodeURIComponent(taskId)}`),
108
108
  searchParams.length > 0 ? new URLSearchParams(searchParams.join("&")) : null,
109
109
  config
110
110
  );
@@ -4218,7 +4218,7 @@ class AxiosClient {
4218
4218
  method,
4219
4219
  withCredentials: true,
4220
4220
  data: JSON.stringify(body),
4221
- ...axiosConfig ?? {}
4221
+ ...axiosConfig
4222
4222
  };
4223
4223
  try {
4224
4224
  const response = await this.client(config);
@@ -4349,9 +4349,9 @@ const joinAllUri = (...urlParts) => {
4349
4349
  const hfetch = async (_uri, method = "get", body, searchParams, axiosConfig) => {
4350
4350
  const authToken = getStored(StorageKey.APP_TOKEN);
4351
4351
  const config = {
4352
- ...axiosConfig ?? {},
4352
+ ...axiosConfig,
4353
4353
  headers: {
4354
- ...(axiosConfig == null ? void 0 : axiosConfig.headers) ?? {},
4354
+ ...axiosConfig == null ? void 0 : axiosConfig.headers,
4355
4355
  "Content-Type": "application/json",
4356
4356
  "X-XSRF-TOKEN": getXSRFCookie()
4357
4357
  }
@@ -1,4 +1,4 @@
1
- import { N as NON_PREMIUM_COLLECTION_LIMIT, E as RxDatabaseBase, D as RxCollectionBase, Z as createRxDocumentConstructor, J as basePrototype, aH as newRxError, az as isMaybeReadonlyArray, al as getSchemaByObjectPath, ad as flattenObject, aj as getProperty, a$ as trimDots, G as appendToArray, ai as getPrimaryFieldOfPrimaryKey, aI as newRxTypeError, ah as getPreviousVersions, aw as isFolderPath, aN as prepareQuery, a9 as findUndefinedPath, a1 as deepEqual, a7 as fillPrimaryKey, ao as hasPremiumFlag, R as RXDB_VERSION, ap as hashStringToNumber, a2 as deepFreeze } from "./replication-Ck5s0Yg-.js";
1
+ import { N as NON_PREMIUM_COLLECTION_LIMIT, E as RxDatabaseBase, D as RxCollectionBase, Z as createRxDocumentConstructor, J as basePrototype, aH as newRxError, az as isMaybeReadonlyArray, al as getSchemaByObjectPath, ad as flattenObject, aj as getProperty, a$ as trimDots, G as appendToArray, ai as getPrimaryFieldOfPrimaryKey, aI as newRxTypeError, ah as getPreviousVersions, aw as isFolderPath, aN as prepareQuery, a9 as findUndefinedPath, a1 as deepEqual, a7 as fillPrimaryKey, ao as hasPremiumFlag, R as RXDB_VERSION, ap as hashStringToNumber, a2 as deepFreeze } from "./replication-DwPGDesg.js";
2
2
  var ERROR_MESSAGES = {
3
3
  // util.js / config
4
4
  UT1: "given name is no string or empty",
@@ -180,10 +180,10 @@ class TuiPhraseConsumer {
180
180
  reset() {
181
181
  this._buffer = [];
182
182
  }
183
- init(buffer, lexer) {
183
+ init(buffer, _lexer) {
184
184
  this._buffer = [...buffer];
185
185
  }
186
- append(next, lexer) {
186
+ append(next, _lexer) {
187
187
  this._buffer.push(next);
188
188
  }
189
189
  bufferValue() {
@@ -1,6 +1,6 @@
1
1
  import { d as debounce } from "./sessionStorage-B68y-wnE.js";
2
2
  import { i as isObject } from "./isObject-FTY-5JQX.js";
3
- import { aq as identity, aL as operate, W as createOperatorSubscriber, ax as isFunction, U as computeValue, b0 as truthy, H as assert, a4 as ensureArray, at as isArray, T as compare, V as createExpressionOperator, c as $eq$1, f as $gt$1, h as $gte$1, k as $lt$1, m as $lte$1, p as $ne$1, M as MingoError, ay as isFunction$1, X as createQueryOperator, $ as $all$1, al as getSchemaByObjectPath, aK as objectPathMonad, y as INDEX_MIN, I as INDEX_MAX, a5 as ensureNotFalsy, ag as getFromMapOrCreate, ai as getPrimaryFieldOfPrimaryKey, aS as requestIdleCallbackIfAvailable, B as BehaviorSubject, aG as mergeMap, aa as firstValueFrom, a8 as filter, ab as flatClone$1, a0 as createRxQuery, _ as _getDefaultQuery, aP as queryCollection, aH as newRxError, af as getDefaultRevision, aJ as now, aN as prepareQuery, aM as overwritable, az as isMaybeReadonlyArray, ac as flatCloneDocWithMeta, S as Subject, a_ as toArray, K as categorizeBulkWriteRows, aO as pushAtSortPosition, ak as getQueryMatcher, am as getSortComparator, P as PROMISE_RESOLVE_TRUE, z as PROMISE_RESOLVE_VOID, R as RXDB_VERSION, a6 as ensureRxStorageInstanceParamsAreCorrect, aQ as randomToken, a1 as deepEqual, aT as requestIdlePromiseNoQueue, a as $and$1, b as $elemMatch, d as $eq$2, e as $exists, g as $gt$2, i as $gte$2, j as $in, l as $lt$2, n as $lte$2, o as $mod, q as $ne$2, r as $nin, s as $nor, t as $not$1, u as $or$1, v as $regex, w as $size, x as $type, ar as initOptions, C as Context, Q as Query, b2 as walk, aU as resolve$1, au as isDate, aB as isObject$1, aD as isRegExp, O as cloneDeep, an as has, as as intersection, b1 as unique, aA as isNumber, aC as isOperator, av as isEqual, L as clone$1, aW as runQueryUpdateFunction, ae as getChangedDocumentsSince, aV as runPluginHooks, aX as setProperty, aF as merge, aY as shareReplay, A as RXJS_SHARE_REPLAY_DEFAULTS, aE as map, G as appendToArray, aj as getProperty, aZ as startWith, a3 as distinctUntilChanged, F as addRxPlugin, Y as createRxDatabase, aR as replicateSelectorCollection } from "./replication-Ck5s0Yg-.js";
3
+ import { aq as identity, aL as operate, W as createOperatorSubscriber, ax as isFunction, U as computeValue, b0 as truthy, H as assert, a4 as ensureArray, at as isArray, T as compare, V as createExpressionOperator, c as $eq$1, f as $gt$1, h as $gte$1, k as $lt$1, m as $lte$1, p as $ne$1, M as MingoError, ay as isFunction$1, X as createQueryOperator, $ as $all$1, al as getSchemaByObjectPath, aK as objectPathMonad, y as INDEX_MIN, I as INDEX_MAX, a5 as ensureNotFalsy, ag as getFromMapOrCreate, ai as getPrimaryFieldOfPrimaryKey, aS as requestIdleCallbackIfAvailable, B as BehaviorSubject, aG as mergeMap, aa as firstValueFrom, a8 as filter, ab as flatClone$1, a0 as createRxQuery, _ as _getDefaultQuery, aP as queryCollection, aH as newRxError, af as getDefaultRevision, aJ as now, aN as prepareQuery, aM as overwritable, az as isMaybeReadonlyArray, ac as flatCloneDocWithMeta, S as Subject, a_ as toArray, K as categorizeBulkWriteRows, aO as pushAtSortPosition, ak as getQueryMatcher, am as getSortComparator, P as PROMISE_RESOLVE_TRUE, z as PROMISE_RESOLVE_VOID, R as RXDB_VERSION, a6 as ensureRxStorageInstanceParamsAreCorrect, aQ as randomToken, a1 as deepEqual, aT as requestIdlePromiseNoQueue, a as $and$1, b as $elemMatch, d as $eq$2, e as $exists, g as $gt$2, i as $gte$2, j as $in, l as $lt$2, n as $lte$2, o as $mod, q as $ne$2, r as $nin, s as $nor, t as $not$1, u as $or$1, v as $regex, w as $size, x as $type, ar as initOptions, C as Context, Q as Query, b2 as walk, aU as resolve$1, au as isDate, aB as isObject$1, aD as isRegExp, O as cloneDeep, an as has, as as intersection, b1 as unique, aA as isNumber, aC as isOperator, av as isEqual, L as clone$1, aW as runQueryUpdateFunction, ae as getChangedDocumentsSince, aV as runPluginHooks, aX as setProperty, aF as merge, aY as shareReplay, A as RXJS_SHARE_REPLAY_DEFAULTS, aE as map, G as appendToArray, aj as getProperty, aZ as startWith, a3 as distinctUntilChanged, F as addRxPlugin, Y as createRxDatabase, aR as replicateSelectorCollection } from "./replication-DwPGDesg.js";
4
4
  import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.js";
5
5
  import { REPLICATE } from "./utils/constants.js";
6
6
  import { REPLICATORS } from "./database/globals.js";
@@ -379,6 +379,37 @@ function requireUtils() {
379
379
  }
380
380
  return output.join("");
381
381
  }
382
+ function removeDotSegmentsRelative(path) {
383
+ if (path === "" || path[0] === "/") {
384
+ return removeDotSegments(path);
385
+ }
386
+ const segments = path.split("/");
387
+ const last = segments.length - 1;
388
+ const output = [];
389
+ let trailingDirectory = false;
390
+ for (let i = 0; i <= last; i++) {
391
+ const segment = segments[i];
392
+ if (segment === "." || segment === "..") {
393
+ if (segment === "..") {
394
+ if (output.length !== 0 && output[output.length - 1] !== "..") {
395
+ output.pop();
396
+ } else {
397
+ output.push("..");
398
+ }
399
+ }
400
+ trailingDirectory = i === last;
401
+ } else {
402
+ output.push(segment);
403
+ }
404
+ }
405
+ if (trailingDirectory && output[output.length - 1] !== "..") {
406
+ output.push("");
407
+ }
408
+ if (output.length === 0 || output[0] === "" || output[0].includes(":")) {
409
+ output.unshift(".");
410
+ }
411
+ return output.join("/");
412
+ }
382
413
  const HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
383
414
  const HOST_DELIM_RE = /[@/?#:]/g;
384
415
  const HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
@@ -639,6 +670,7 @@ function requireUtils() {
639
670
  encodeFragment,
640
671
  escapePreservingEscapes,
641
672
  removeDotSegments,
673
+ removeDotSegmentsRelative,
642
674
  isIPv4,
643
675
  isUUID,
644
676
  normalizeIPv6,
@@ -861,16 +893,18 @@ var hasRequiredFastUri;
861
893
  function requireFastUri() {
862
894
  if (hasRequiredFastUri) return fastUri.exports;
863
895
  hasRequiredFastUri = 1;
864
- const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = requireUtils();
896
+ const { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = requireUtils();
865
897
  const { SCHEMES, getSchemeHandler } = requireSchemes();
866
898
  const VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
867
899
  const MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
868
- function decodeValidScheme(scheme) {
869
- const decodedScheme = unescape(String(scheme));
870
- if (!VALID_SCHEME.test(decodedScheme)) {
900
+ const MALFORMED_HOST_ERROR = "URI host is malformed.";
901
+ const FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
902
+ function validateScheme(scheme) {
903
+ const stringScheme = String(scheme);
904
+ if (!VALID_SCHEME.test(stringScheme)) {
871
905
  throw new TypeError(MALFORMED_SCHEME_ERROR);
872
906
  }
873
- return decodedScheme;
907
+ return stringScheme;
874
908
  }
875
909
  function normalize(uri2, options) {
876
910
  if (typeof uri2 === "string") {
@@ -907,6 +941,9 @@ function requireFastUri() {
907
941
  const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
908
942
  const resolvedHost = resolved.host;
909
943
  const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
944
+ if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
945
+ throw new Error(MALFORMED_HOST_ERROR);
946
+ }
910
947
  canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
911
948
  const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
912
949
  if (resolved.error && !encodedASCIIHost) {
@@ -948,14 +985,15 @@ function requireFastUri() {
948
985
  if (relative.path[0] === "/") {
949
986
  target.path = removeDotSegments(relative.path);
950
987
  } else {
951
- if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
988
+ const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
989
+ if (baseHasAuthority && !base.path) {
952
990
  target.path = "/" + relative.path;
953
991
  } else if (!base.path) {
954
992
  target.path = relative.path;
955
993
  } else {
956
994
  target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
957
995
  }
958
- target.path = removeDotSegments(target.path);
996
+ target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
959
997
  }
960
998
  target.query = relative.query;
961
999
  }
@@ -993,12 +1031,13 @@ function requireFastUri() {
993
1031
  const options = Object.assign({}, opts);
994
1032
  const uriTokens = [];
995
1033
  if (component.scheme) {
996
- component.scheme = decodeValidScheme(component.scheme);
1034
+ component.scheme = validateScheme(component.scheme);
997
1035
  }
998
1036
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
999
1037
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
1000
1038
  const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
1001
- const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
1039
+ const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
1040
+ const pathNoScheme = !options.skipEscape && schemelessReference;
1002
1041
  if (component.path !== void 0) {
1003
1042
  if (!options.skipEscape) {
1004
1043
  component.path = serializePathEncoding(component.path, pathNoScheme);
@@ -1007,7 +1046,7 @@ function requireFastUri() {
1007
1046
  }
1008
1047
  }
1009
1048
  if (options.reference !== "suffix" && component.scheme) {
1010
- component.scheme = decodeValidScheme(component.scheme);
1049
+ component.scheme = validateScheme(component.scheme);
1011
1050
  uriTokens.push(component.scheme, ":");
1012
1051
  }
1013
1052
  const authority = recomposeAuthority(component);
@@ -1023,9 +1062,9 @@ function requireFastUri() {
1023
1062
  if (component.path !== void 0) {
1024
1063
  let s = component.path;
1025
1064
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
1026
- s = removeDotSegments(s);
1065
+ s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
1027
1066
  }
1028
- if (pathNoScheme) {
1067
+ if (schemelessReference) {
1029
1068
  s = serializePathEncoding(s, true);
1030
1069
  }
1031
1070
  if (authority === void 0 && s[0] === "/" && s[1] === "/") {
@@ -1072,16 +1111,34 @@ function requireFastUri() {
1072
1111
  return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
1073
1112
  }
1074
1113
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
1114
+ if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
1115
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
1116
+ return true;
1117
+ }
1075
1118
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
1119
+ let url;
1076
1120
  try {
1077
- parsed.host = new URL("http://" + parsed.host).hostname;
1121
+ url = new URL("http://" + parsed.host);
1078
1122
  } catch (e) {
1079
1123
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
1080
1124
  return true;
1081
1125
  }
1126
+ if (!isHostOnlyURL(url)) {
1127
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
1128
+ return true;
1129
+ }
1130
+ parsed.host = url.hostname;
1082
1131
  }
1083
1132
  return false;
1084
1133
  }
1134
+ function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
1135
+ return Boolean(
1136
+ parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
1137
+ );
1138
+ }
1139
+ function isHostOnlyURL(url) {
1140
+ return url.username === "" && url.password === "" && url.port === "" && url.pathname === "/" && url.search === "" && url.hash === "" && url.hostname !== "";
1141
+ }
1085
1142
  function parseWithStatus(uri2, opts) {
1086
1143
  const options = Object.assign({}, opts);
1087
1144
  const parsed = {
@@ -1136,9 +1193,8 @@ function requireFastUri() {
1136
1193
  parsed.query = matches[7];
1137
1194
  parsed.fragment = matches[8];
1138
1195
  if (parsed.scheme !== void 0) {
1139
- const decodedScheme = unescape(parsed.scheme);
1140
- if (VALID_SCHEME.test(decodedScheme)) {
1141
- parsed.scheme = decodedScheme.toLowerCase();
1196
+ if (VALID_SCHEME.test(parsed.scheme)) {
1197
+ parsed.scheme = parsed.scheme.toLowerCase();
1142
1198
  } else {
1143
1199
  parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
1144
1200
  malformedScheme = true;
@@ -1166,7 +1222,7 @@ function requireFastUri() {
1166
1222
  malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
1167
1223
  parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
1168
1224
  if (malformedIPLiteral) {
1169
- parsed.error = parsed.error || "URI host is malformed.";
1225
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
1170
1226
  malformedAuthorityOrPort = true;
1171
1227
  }
1172
1228
  } else {
@@ -1194,7 +1250,7 @@ function requireFastUri() {
1194
1250
  if (!isIP) {
1195
1251
  host = normalizePercentEncoding(host.toLowerCase());
1196
1252
  }
1197
- parsed.host = reescapeHostDelimiters(host, isIP);
1253
+ parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host, isIP) : host;
1198
1254
  }
1199
1255
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
1200
1256
  if (parsed.path) {
@@ -9656,7 +9712,7 @@ const buildDatabase = async (_config = {}) => {
9656
9712
  addRxPlugin(RxDBStatePlugin);
9657
9713
  /* v8 ignore next 10 -- @preserve */
9658
9714
  if (config.devMode) {
9659
- await import("./index-CgvdVEs-.js").then((module) => {
9715
+ await import("./index-BCzfYx7I.js").then((module) => {
9660
9716
  addRxPlugin(module.RxDBDevModePlugin);
9661
9717
  if (config.testing) {
9662
9718
  module.disableWarnings();
package/index.css CHANGED
@@ -1,17 +1,8 @@
1
1
  body {
2
2
  margin: 0;
3
3
  font-family:
4
- 'Roboto',
5
- -apple-system,
6
- BlinkMacSystemFont,
7
- 'Segoe UI',
8
- 'Oxygen',
9
- 'Ubuntu',
10
- 'Cantarell',
11
- 'Fira Sans',
12
- 'Droid Sans',
13
- 'Helvetica Neue',
14
- sans-serif;
4
+ 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',
5
+ 'Helvetica Neue', sans-serif;
15
6
  -webkit-font-smoothing: antialiased;
16
7
  -moz-osx-font-smoothing: grayscale;
17
8
  }
package/main.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A, b, d, f, g } from "./ActionForm-BMIAp7pf.js";
1
+ import { A, b, d, f, g } from "./ActionForm-Sj0KtEYj.js";
2
2
  import { default as default2 } from "./components/AnnotationDetailPopover.js";
3
- import { A as A2 } from "./AnnotationDetails-Dmk8kpl3.js";
3
+ import { A as A2 } from "./AnnotationDetails-B1NQ-B4f.js";
4
4
  import { default as default3 } from "./components/AnnotationEntry.js";
5
- import { A as A3, C } from "./AnnotationPreview-CIya3ByE.js";
5
+ import { A as A3, C } from "./AnnotationPreview-Cw3JUL8k.js";
6
6
  import { default as default4 } from "./components/CountBadge.js";
7
7
  import { default as default5 } from "./components/EnrichedCard.js";
8
8
  import { default as default6 } from "./components/EnrichedChip.js";
@@ -14,12 +14,12 @@ import { default as default11 } from "./components/group/Group.js";
14
14
  import { default as default12 } from "./components/group/GroupControl.js";
15
15
  import { default as default13 } from "./components/SourcePicker.js";
16
16
  import { SNACKBAR_EVENT_ID } from "./data/event.js";
17
- import { b as b2 } from "./index-CdqmWKik.js";
17
+ import { b as b2 } from "./index-DieKGFn1.js";
18
18
  import { ClueReplicationError } from "./database/errors.js";
19
19
  import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
20
20
  import { ClueConfigContext } from "./hooks/ClueConfigProvider.js";
21
21
  import { ClueDatabaseContext } from "./hooks/ClueDatabaseContext.js";
22
- import { C as C2 } from "./ClueEnrichContext-BqzlMW0c.js";
22
+ import { C as C2 } from "./ClueEnrichContext-Dpv_xiDv.js";
23
23
  import { ClueProvider } from "./hooks/ClueProvider.js";
24
24
  import { default as default14 } from "./hooks/useClue.js";
25
25
  import { default as default15 } from "./hooks/useClueConfig.js";
package/package.json CHANGED
@@ -38,21 +38,11 @@
38
38
  "unified": "^11.0.5",
39
39
  "use-context-selector": "^2.0.0"
40
40
  },
41
- "eslintConfig": {
42
- "extends": [
43
- "react-app"
44
- ]
45
- },
46
41
  "jest": {
47
42
  "transformIgnorePatterns": [
48
43
  "!node_modules/url-join"
49
44
  ]
50
45
  },
51
- "lint-staged": {
52
- "*.{ts,tsx,js,jsx}": [
53
- "prettier --write --config .prettierrc"
54
- ]
55
- },
56
46
  "main": "main.js",
57
47
  "name": "@cccsaurora/clue-ui",
58
48
  "peerDependencies": {
@@ -68,58 +58,58 @@
68
58
  },
69
59
  "type": "module",
70
60
  "types": "main.d.ts",
71
- "version": "1.5.0-dev.485",
61
+ "version": "1.6.0-dev.517.1",
72
62
  "exports": {
73
63
  ".": "./main.js",
74
64
  "./index.css": "./index.css",
75
65
  "./en/*.json": "./en/*.json",
76
66
  "./fr/*.json": "./fr/*.json",
67
+ "./text/*": "./text/*.js",
68
+ "./types/*": "./types/*.js",
69
+ "./plugins/*": "./plugins/*.js",
70
+ "./data/*": "./data/*.js",
71
+ "./hooks/*": "./hooks/*.js",
77
72
  "./icons/*": "./icons/*.js",
78
73
  "./components/*": "./components/*.js",
79
- "./plugins/*": "./plugins/*.js",
80
74
  "./utils/*": "./utils/*.js",
81
75
  "./utils/*.json": "./utils/*.json",
82
- "./data/*": "./data/*.js",
83
- "./hooks/*": "./hooks/*.js",
84
76
  "./database/*": "./database/*.js",
85
77
  "./database": "./database/index.js",
86
- "./types/*": "./types/*.js",
87
- "./text/*": "./text/*.js",
88
78
  "./components/fetchers/*": "./components/fetchers/*.js",
79
+ "./components/actions/*": "./components/actions/*.js",
89
80
  "./components/display/*": "./components/display/*.js",
90
81
  "./components/enrichment/*": "./components/enrichment/*.js",
91
- "./components/actions/*": "./components/actions/*.js",
92
- "./components/stats/*": "./components/stats/*.js",
93
82
  "./components/group/*": "./components/group/*.js",
83
+ "./components/stats/*": "./components/stats/*.js",
84
+ "./components/display/json/*": "./components/display/json/*.js",
85
+ "./components/display/json": "./components/display/json/index.js",
94
86
  "./components/display/icons/*": "./components/display/icons/*.js",
95
87
  "./components/display/graph/*": "./components/display/graph/*.js",
96
88
  "./components/display/graph": "./components/display/graph/index.js",
97
- "./components/display/json/*": "./components/display/json/*.js",
98
- "./components/display/json": "./components/display/json/index.js",
99
89
  "./components/display/markdown/*.md": "./components/display/markdown/*.md.js",
100
90
  "./components/display/markdown": "./components/display/markdown/index.js",
101
91
  "./components/display/graph/elements/*": "./components/display/graph/elements/*.js",
102
92
  "./components/display/graph/visualizations/*": "./components/display/graph/visualizations/*.js",
103
- "./components/display/graph/visualizations/icons/*": "./components/display/graph/visualizations/icons/*.js",
104
- "./components/display/graph/visualizations/icons": "./components/display/graph/visualizations/icons/index.js",
93
+ "./components/display/graph/visualizations/panels/*": "./components/display/graph/visualizations/panels/*.js",
105
94
  "./components/display/graph/visualizations/cloud/*": "./components/display/graph/visualizations/cloud/*.js",
106
95
  "./components/display/graph/visualizations/cloud": "./components/display/graph/visualizations/cloud/index.js",
107
- "./components/display/graph/visualizations/panels/*": "./components/display/graph/visualizations/panels/*.js",
96
+ "./components/display/graph/visualizations/icons/*": "./components/display/graph/visualizations/icons/*.js",
97
+ "./components/display/graph/visualizations/icons": "./components/display/graph/visualizations/icons/index.js",
108
98
  "./components/display/graph/visualizations/tree/*": "./components/display/graph/visualizations/tree/*.js",
109
99
  "./components/display/graph/visualizations/tree": "./components/display/graph/visualizations/tree/index.js",
110
100
  "./components/actions/form/*": "./components/actions/form/*.js",
111
101
  "./components/actions/formats/*": "./components/actions/formats/*.js",
112
102
  "./components/actions/formats": "./components/actions/formats/index.js",
113
- "./plugins/graph/*": "./plugins/graph/*.js",
114
- "./plugins/graph": "./plugins/graph/index.js",
115
- "./plugins/json/*": "./plugins/json/*.js",
116
- "./plugins/json": "./plugins/json/index.js",
117
103
  "./plugins/image/*": "./plugins/image/*.js",
118
104
  "./plugins/image": "./plugins/image/index.js",
119
- "./plugins/file/*": "./plugins/file/*.js",
120
- "./plugins/file": "./plugins/file/index.js",
121
105
  "./plugins/test/*": "./plugins/test/*.js",
122
106
  "./plugins/test": "./plugins/test/index.js",
107
+ "./plugins/json/*": "./plugins/json/*.js",
108
+ "./plugins/json": "./plugins/json/index.js",
109
+ "./plugins/file/*": "./plugins/file/*.js",
110
+ "./plugins/file": "./plugins/file/index.js",
111
+ "./plugins/graph/*": "./plugins/graph/*.js",
112
+ "./plugins/graph": "./plugins/graph/index.js",
123
113
  "./plugins/markdown/*.md": "./plugins/markdown/*.md.js",
124
114
  "./plugins/markdown": "./plugins/markdown/index.js",
125
115
  "./plugins/graph/example/*": "./plugins/graph/example/*.js"
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { jsx } from "react/jsx-runtime";
5
- import { J as JSONViewer } from "../../index-DUEubgWN.js";
5
+ import { J as JSONViewer } from "../../index-D4JJWbGh.js";
6
6
  import ClueUIPlugin from "../ClueUIPlugin.js";
7
7
  import { validateJsonData } from "../utils.js";
8
8
  class JsonPlugin extends ClueUIPlugin {
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var _hashFn, _keyMap, _unpack, _options, _root, _local, _operators, _iteratees, _yieldedValues, _getNext, _a, _source, _predicate, _projection, _options2, _operators2, _result, _buffer, _compiled, _options3, _condition;
12
- import { a as api, j as joinAllUri, u as uri } from "./index-Dd7KdsT8.js";
12
+ import { a as api, j as joinAllUri, u as uri } from "./index-29cEmZLo.js";
13
13
  import { ClueReplicationError } from "./database/errors.js";
14
14
  import { REPLICATORS } from "./database/globals.js";
15
15
  import { l as last$1 } from "./last-CUCl67Im.js";
@@ -11523,10 +11523,17 @@ function startReplicationOnLeaderShip(waitForLeadership2, replicationState) {
11523
11523
  });
11524
11524
  }
11525
11525
  const DEFAULT_PULL_BATCH_SIZE = 250;
11526
- const buildRequestConfig = (config2) => {
11526
+ const getToken = (config2) => {
11527
11527
  var _a2;
11528
- const headers = {};
11529
11528
  const token = (_a2 = config2.getToken) == null ? void 0 : _a2.call(config2);
11529
+ if (config2.getToken && !token) {
11530
+ throw new Error("getToken must return a token when configured");
11531
+ }
11532
+ return token;
11533
+ };
11534
+ const buildRequestConfig = (config2) => {
11535
+ const headers = {};
11536
+ const token = getToken(config2);
11530
11537
  if (token) {
11531
11538
  headers.Authorization = `Bearer ${token}`;
11532
11539
  }
@@ -11558,11 +11565,12 @@ const stream = (collection, config2) => {
11558
11565
  const MAX_RETRY_DELAY = 6e4;
11559
11566
  const INITIAL_RETRY_DELAY = 1e3;
11560
11567
  const loggedEvents = [];
11568
+ let started = false;
11561
11569
  let currentXhr = null;
11562
11570
  let retryTimer = null;
11563
11571
  let closed = false;
11564
11572
  const isClosed = () => closed || collection.closed;
11565
- const getToken = () => {
11573
+ const getStreamToken = () => {
11566
11574
  var _a2;
11567
11575
  try {
11568
11576
  return (_a2 = config2.getToken) == null ? void 0 : _a2.call(config2);
@@ -11586,7 +11594,7 @@ const stream = (collection, config2) => {
11586
11594
  stream$.next("RESYNC");
11587
11595
  }
11588
11596
  };
11589
- const connect = (timeout = INITIAL_RETRY_DELAY, token = getToken()) => {
11597
+ const connect = (timeout = INITIAL_RETRY_DELAY, token = getStreamToken()) => {
11590
11598
  if (isClosed()) {
11591
11599
  return;
11592
11600
  }
@@ -11652,7 +11660,7 @@ const stream = (collection, config2) => {
11652
11660
  reconnect();
11653
11661
  } else if (xhr.status === 401) {
11654
11662
  if (await reportHttpFailure(error)) {
11655
- const refreshedToken = (_a2 = getToken()) == null ? void 0 : _a2.trim();
11663
+ const refreshedToken = (_a2 = getStreamToken()) == null ? void 0 : _a2.trim();
11656
11664
  if (refreshedToken && refreshedToken !== token && !isClosed()) {
11657
11665
  connect(INITIAL_RETRY_DELAY, refreshedToken);
11658
11666
  emitResyncIfNeeded();
@@ -11678,10 +11686,17 @@ const stream = (collection, config2) => {
11678
11686
  }
11679
11687
  currentXhr == null ? void 0 : currentXhr.abort();
11680
11688
  });
11681
- connect();
11682
- return stream$;
11689
+ return new Observable((subscriber) => {
11690
+ const subscription = stream$.subscribe(subscriber);
11691
+ if (!started) {
11692
+ started = true;
11693
+ connect();
11694
+ }
11695
+ return subscription;
11696
+ });
11683
11697
  };
11684
11698
  const replicateSelectorCollection = async (replicationId, collection, config2) => {
11699
+ getToken(config2);
11685
11700
  const pullBatchSize = config2.pullBatchSize ?? DEFAULT_PULL_BATCH_SIZE;
11686
11701
  collection.onClose.push(() => {
11687
11702
  delete REPLICATORS[replicationId];
@@ -11721,7 +11736,7 @@ const replicateSelectorCollection = async (replicationId, collection, config2) =
11721
11736
  }
11722
11737
  };
11723
11738
  },
11724
- stream$: pullStream$.asObservable()
11739
+ stream$: pullStream$
11725
11740
  }
11726
11741
  });
11727
11742
  replicationState.error$.subscribe((err) => console.error(err));