@ynput/ayon-frontend-shared 0.6.4 → 0.6.5

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 (51) hide show
  1. package/dist/DetailsPanel.es.js +480 -477
  2. package/dist/ListTable.es.js +24 -25
  3. package/dist/NewEntity.es.js +6 -7
  4. package/dist/ProjectTreeTable.es.js +2016 -1996
  5. package/dist/Views.es.js +28 -28
  6. package/dist/api.es.js +291 -289
  7. package/dist/chunks/Actions.es.js +12 -12
  8. package/dist/chunks/ColumnDropIndicator.es.js +8 -9
  9. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +31 -25
  10. package/dist/chunks/DeleteEntitiesContextInstance.es.js +1 -1
  11. package/dist/chunks/DetailsDialog.es.js +1 -1
  12. package/dist/chunks/EmptyPlaceholder.es.js +13 -12
  13. package/dist/chunks/EntityPath.es.js +67 -67
  14. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  15. package/dist/chunks/EntityTooltip.es.js +8 -8
  16. package/dist/chunks/Feed.es.js +75 -76
  17. package/dist/chunks/MetaWidget.es.js +1283 -1279
  18. package/dist/chunks/PlayableIcon.es.js +458 -451
  19. package/dist/chunks/ProjectContext.es.js +20 -20
  20. package/dist/chunks/RepresentationsList.es.js +9 -9
  21. package/dist/chunks/ReviewablesSelector.es.js +1504 -1374
  22. package/dist/chunks/Slicer.es.js +68 -69
  23. package/dist/chunks/ThumbnailSimple.es.js +4 -4
  24. package/dist/chunks/Watchers.es.js +104 -105
  25. package/dist/chunks/activeEntities.es.js +58 -0
  26. package/dist/chunks/columnConfigConverter.es.js +57 -63
  27. package/dist/chunks/getUris.es.js +886 -831
  28. package/dist/chunks/iconUtils.es.js +151 -0
  29. package/dist/chunks/realtimeUpdatesUtils.es.js +113 -80
  30. package/dist/chunks/searchTerms.es.js +329 -247
  31. package/dist/chunks/useAttributeEnums.es.js +34 -34
  32. package/dist/chunks/viewUpdateHelper.es.js +11 -11
  33. package/dist/components.es.js +340 -337
  34. package/dist/context.es.js +48 -48
  35. package/dist/hooks.es.js +34 -34
  36. package/dist/index.es.js +1 -1
  37. package/dist/types/ContextMenu.d.ts +1 -1
  38. package/dist/types/Feed.d.ts +1 -1
  39. package/dist/types/ListTable.d.ts +1 -1
  40. package/dist/types/ProjectTreeTable.d.ts +4 -1
  41. package/dist/types/SimpleTable.d.ts +1 -1
  42. package/dist/types/Slicer.d.ts +5 -5
  43. package/dist/types/Views.d.ts +4 -4
  44. package/dist/types/api.d.ts +545 -171
  45. package/dist/types/components.d.ts +64 -9
  46. package/dist/types/context.d.ts +5 -5
  47. package/dist/types/util.d.ts +237 -2
  48. package/dist/util.es.js +127 -114
  49. package/package.json +1 -1
  50. package/dist/chunks/extractEntityHierarchyFromParents.es.js +0 -28
  51. package/dist/chunks/parseHtmlToPlainTextWithLinks.es.js +0 -138
package/dist/util.es.js CHANGED
@@ -1,49 +1,49 @@
1
- import { K as S, g as I, a as P } from "./chunks/platform.es.js";
1
+ import { K as S, g as I, a as A } from "./chunks/platform.es.js";
2
2
  import { c as d } from "./chunks/confirmDelete.es.js";
3
- import { a as C } from "./chunks/confirmDelete.es.js";
4
- import { e as A, g as M } from "./chunks/getEntityTypeIcon.es.js";
5
- import { g as L, r as U } from "./chunks/replaceRoot.es.js";
6
- import { e as v, g as N } from "./chunks/extractEntityHierarchyFromParents.es.js";
7
- import { c as k } from "./chunks/copyToClipboard.es.js";
8
- import { g as O, h as B } from "./chunks/humanizeFieldName.es.js";
9
- import { c as K, a as z, g as q, p as J, b as Q } from "./chunks/parseHtmlToPlainTextWithLinks.es.js";
3
+ import { a as R } from "./chunks/confirmDelete.es.js";
4
+ import { e as F, g as M } from "./chunks/getEntityTypeIcon.es.js";
5
+ import { g as v, r as D } from "./chunks/replaceRoot.es.js";
6
+ import { A as U, c as w, e as N, g as O, a as V, s as k, u as H, b as K } from "./chunks/activeEntities.es.js";
7
+ import { c as z } from "./chunks/copyToClipboard.es.js";
8
+ import { g as q, h as J } from "./chunks/humanizeFieldName.es.js";
9
+ import { c as W, a as X, g as Y, b as $, d as G, p as Z, e as ee } from "./chunks/iconUtils.es.js";
10
10
  import { bk as g } from "./chunks/searchTerms.es.js";
11
- import { bl as $, be as j, bm as G, bg as X, bn as Y, bi as Z, bo as ee, bp as ae, bj as te, bf as re, bq as oe, br as se, bs as ne, bh as ie, bt as le, bu as me, bv as ce, bw as pe } from "./chunks/searchTerms.es.js";
12
- import { a as ge, b as be, d as ue, e as fe, c as Ee, g as he, f as Te, s as xe, v as ye, w as Se } from "./chunks/realtimeUpdatesUtils.es.js";
13
- import { e as Pe } from "./chunks/extractVersionFromFilename.es.js";
14
- import { c as Ce, a as Re, b as Ae, g as Me, h as De, s as Le, v as Ue, d as _e, e as ve } from "./chunks/versionUploadHelpers.es.js";
15
- import { c as we, a as ke } from "./chunks/columnConfigConverter.es.js";
16
- import { p as Oe } from "./chunks/pluralize.es.js";
17
- import { b as Ve, a as Ke, h as ze, p as qe, r as Je } from "./chunks/colorUtils.es.js";
18
- import { g as We } from "./chunks/getGroupByDataType.es.js";
19
- import { b as je, g as Ge, a as Xe, c as Ye, p as Ze, u as ea } from "./chunks/getBundleMode.es.js";
20
- import { b as ta, s as ra } from "./chunks/buildHierarchicalTableRows.es.js";
21
- import { g as sa, a as na } from "./chunks/getThumbnailUrl.es.js";
22
- import { p as la } from "./chunks/parseFilename.es.js";
23
- import { i as ca } from "./chunks/isHTMLElement.es.js";
24
- import { ConfirmDialog as da } from "primereact/confirmdialog";
25
- const f = (e) => {
26
- const t = /* @__PURE__ */ new Map(), o = [];
27
- for (const a of e)
28
- t.set(a.id, { ...a, children: [] });
29
- for (const a of e) {
30
- const s = t.get(a.id);
31
- a.parentId && t.has(a.parentId) ? t.get(a.parentId).children.push(s) : o.push(s);
11
+ import { bl as ae, be as re, bm as se, bg as oe, bn as ie, bi as ne, bo as le, bp as me, bj as ce, bf as pe, bq as de, br as ge, bs as be, bh as ue, bt as Ee, bu as fe, bv as he, bw as Te } from "./chunks/searchTerms.es.js";
12
+ import { M as xe, a as Se, b as Ie, d as Ae, e as Pe, f as Re, c as Ce, g as Fe, h as Me, i as _e, p as ve, s as De, j as Le, v as Ue, w as we } from "./chunks/realtimeUpdatesUtils.es.js";
13
+ import { e as Oe } from "./chunks/extractVersionFromFilename.es.js";
14
+ import { c as ke, a as He, b as Ke, g as Be, h as ze, s as je, v as qe, d as Je, e as Qe } from "./chunks/versionUploadHelpers.es.js";
15
+ import { c as Xe, a as Ye } from "./chunks/columnConfigConverter.es.js";
16
+ import { p as Ge } from "./chunks/pluralize.es.js";
17
+ import { b as et, a as tt, h as at, p as rt, r as st } from "./chunks/colorUtils.es.js";
18
+ import { g as it } from "./chunks/getGroupByDataType.es.js";
19
+ import { b as lt, g as mt, a as ct, c as pt, p as dt, u as gt } from "./chunks/getBundleMode.es.js";
20
+ import { b as ut, s as Et } from "./chunks/buildHierarchicalTableRows.es.js";
21
+ import { g as ht, a as Tt } from "./chunks/getThumbnailUrl.es.js";
22
+ import { p as xt } from "./chunks/parseFilename.es.js";
23
+ import { i as It } from "./chunks/isHTMLElement.es.js";
24
+ import { ConfirmDialog as Pt } from "primereact/confirmdialog";
25
+ const E = (e) => {
26
+ const a = /* @__PURE__ */ new Map(), s = [];
27
+ for (const t of e)
28
+ a.set(t.id, { ...t, children: [] });
29
+ for (const t of e) {
30
+ const o = a.get(t.id);
31
+ t.parentId && a.has(t.parentId) ? a.get(t.parentId).children.push(o) : s.push(o);
32
32
  }
33
- return { folderMap: t, rootFolders: o };
34
- }, E = async ({
33
+ return { folderMap: a, rootFolders: s };
34
+ }, f = async ({
35
35
  folderIds: e,
36
- folders: t,
37
- deleteMutation: o,
38
- onSelect: a,
39
- itemTypeName: s,
36
+ folders: a,
37
+ deleteMutation: s,
38
+ onSelect: t,
39
+ itemTypeName: o,
40
40
  messageDetail: l
41
41
  }) => {
42
- const i = Array.isArray(e) ? e : [e], n = i.map((r) => t?.find((p) => p.id === r)).filter(Boolean), m = n.length === 1 ? n[0]?.label || "Folder" : n.length > 1 ? `${n.length} folders` : "Folder", c = `Only the folder(s) will be deleted. ${s} inside the folder will remain.`;
42
+ const n = Array.isArray(e) ? e : [e], i = n.map((r) => a?.find((p) => p.id === r)).filter(Boolean), m = i.length === 1 ? i[0]?.label || "Folder" : i.length > 1 ? `${i.length} folders` : "Folder", c = `Only the folder(s) will be deleted. ${o} inside the folder will remain.`;
43
43
  d({
44
44
  accept: async () => {
45
45
  try {
46
- await Promise.all(i.map((r) => o(r))), a([]);
46
+ await Promise.all(n.map((r) => s(r))), t([]);
47
47
  } catch (r) {
48
48
  throw g(r, "Failed to delete folder(s)");
49
49
  }
@@ -64,88 +64,101 @@ const f = (e) => {
64
64
  }
65
65
  };
66
66
  export {
67
- da as ConfirmDialog,
68
- $ as ENUM_CONTEXT_PARAMS,
67
+ U as ACTIVE_ENTITIES_PRIORITY,
68
+ Pt as ConfirmDialog,
69
+ ae as ENUM_CONTEXT_PARAMS,
69
70
  S as KeyMode,
70
- j as PubSub,
71
- ge as REALTIME_REST_CALL_LIMIT,
72
- be as REALTIME_REST_JITTER,
73
- ue as REALTIME_TASK_SUPPORTED_VALUE_FIELDS,
74
- fe as REALTIME_UPDATE_DEBOUNCE,
75
- Ve as blendCategoryColor,
76
- Ke as blendColors,
77
- je as buildEntityUri,
78
- f as buildFolderHierarchy,
79
- ta as buildHierarchicalTableRows,
80
- K as checkLabel,
81
- z as checkName,
71
+ xe as MAX_SORT_KEYS,
72
+ re as PubSub,
73
+ Se as REALTIME_REST_CALL_LIMIT,
74
+ Ie as REALTIME_REST_JITTER,
75
+ Ae as REALTIME_TASK_SUPPORTED_VALUE_FIELDS,
76
+ Pe as REALTIME_UPDATE_DEBOUNCE,
77
+ et as blendCategoryColor,
78
+ tt as blendColors,
79
+ lt as buildEntityUri,
80
+ E as buildFolderHierarchy,
81
+ ut as buildHierarchicalTableRows,
82
+ Re as buildSortArgs,
83
+ W as checkLabel,
84
+ X as checkName,
85
+ w as clearActiveEntities,
82
86
  d as confirmDelete,
83
- C as confirmDeleteDialog,
84
- we as convertColumnConfigToTanstackStates,
85
- ke as convertTanstackStatesToColumnConfig,
86
- k as copyToClipboard,
87
- Ce as createProductAndVersion,
88
- Re as createProductHelper,
89
- Ee as createRealtimeBatcher,
90
- Ae as createVersionHelper,
91
- A as entityTypesWithIcons,
92
- v as extractEntityHierarchyFromParents,
93
- Pe as extractVersionFromFilename,
94
- q as getAttributeIcon,
95
- Ge as getBundleModeFromUser,
87
+ R as confirmDeleteDialog,
88
+ Xe as convertColumnConfigToTanstackStates,
89
+ Ye as convertTanstackStatesToColumnConfig,
90
+ z as copyToClipboard,
91
+ ke as createProductAndVersion,
92
+ He as createProductHelper,
93
+ Ce as createRealtimeBatcher,
94
+ Ke as createVersionHelper,
95
+ F as entityTypesWithIcons,
96
+ N as extractEntityHierarchyFromParents,
97
+ Oe as extractVersionFromFilename,
98
+ O as getActiveEntities,
99
+ Y as getAttributeIcon,
100
+ mt as getBundleModeFromUser,
96
101
  I as getCurrentPlatform,
97
- he as getEntityId,
98
- Xe as getEntityStateFromUri,
99
- sa as getEntityThumbnailUrl,
102
+ $ as getEntityColor,
103
+ G as getEntityIcon,
104
+ Fe as getEntityId,
105
+ ct as getEntityStateFromUri,
106
+ ht as getEntityThumbnailUrl,
100
107
  M as getEntityTypeIcon,
101
- G as getEnumContextParams,
102
- X as getEnumErrorText,
103
- Y as getEnumItemIcon,
108
+ se as getEnumContextParams,
109
+ oe as getEnumErrorText,
110
+ ie as getEnumItemIcon,
104
111
  g as getErrorMessage,
105
- We as getGroupByDataType,
106
- O as getMixedState,
107
- Me as getNextVersionNumber,
108
- P as getPlatformShortcutKey,
109
- N as getPriorityOptions,
112
+ it as getGroupByDataType,
113
+ q as getMixedState,
114
+ Be as getNextVersionNumber,
115
+ A as getPlatformShortcutKey,
116
+ Me as getPrimarySortKey,
117
+ V as getPriorityOptions,
110
118
  h as getProjectDisplayName,
111
- na as getProjectThumbnailUrl,
112
- Z as getRequestErrorString,
113
- ee as getSelectableAssignees,
114
- ae as getSelectableEnumItems,
115
- Ye as getSettingsStateFromUri,
116
- Te as getSupportedEntityPatch,
117
- L as groupResult,
118
- E as handleDeleteFolders,
119
- De as handleUploadError,
120
- te as hasEnumOptions,
121
- re as hasEnumResolver,
122
- ze as hexToRgb,
123
- B as humanizeField,
124
- oe as isEnumContextParam,
125
- se as isEnumIconImage,
126
- ca as isHTMLElement,
127
- ne as matchSearchQuery,
119
+ Tt as getProjectThumbnailUrl,
120
+ ne as getRequestErrorString,
121
+ le as getSelectableAssignees,
122
+ me as getSelectableEnumItems,
123
+ pt as getSettingsStateFromUri,
124
+ _e as getSupportedEntityPatch,
125
+ v as groupResult,
126
+ f as handleDeleteFolders,
127
+ ze as handleUploadError,
128
+ ce as hasEnumOptions,
129
+ pe as hasEnumResolver,
130
+ at as hexToRgb,
131
+ J as humanizeField,
132
+ de as isEnumContextParam,
133
+ ge as isEnumIconImage,
134
+ It as isHTMLElement,
135
+ be as matchSearchQuery,
128
136
  T as mentionTypeOptions,
129
- ie as normalizeEnumItems,
130
- J as parseAndFormatName,
131
- qe as parseColor,
132
- la as parseFilename,
133
- Q as parseHtmlToPlainTextWithLinks,
134
- le as parseSearchQuery,
135
- Ze as parseUri,
136
- me as pastedListToSearch,
137
- Oe as pluralize,
138
- U as replaceRoot,
139
- Je as rgbToHex,
140
- Le as sanitizeProductName,
141
- ra as shouldBlockShortcuts,
142
- ce as sortKeysDeep,
143
- xe as subscribeToThumbnailUpdates,
144
- pe as toDropdownErrorText,
145
- ea as useStagingModeState,
146
- ye as validateEntityId,
147
- Ue as validateFormData,
148
- _e as validateProductName,
149
- ve as validateVersion,
150
- Se as waitForRealtimeJitter
137
+ ue as normalizeEnumItems,
138
+ Z as parseAndFormatName,
139
+ rt as parseColor,
140
+ xt as parseFilename,
141
+ ee as parseHtmlToPlainTextWithLinks,
142
+ Ee as parseSearchQuery,
143
+ dt as parseUri,
144
+ ve as parseViewSorting,
145
+ fe as pastedListToSearch,
146
+ Ge as pluralize,
147
+ D as replaceRoot,
148
+ st as rgbToHex,
149
+ je as sanitizeProductName,
150
+ De as serializeViewSorting,
151
+ k as setActiveEntities,
152
+ Et as shouldBlockShortcuts,
153
+ he as sortKeysDeep,
154
+ Le as subscribeToThumbnailUpdates,
155
+ Te as toDropdownErrorText,
156
+ H as useActiveEntities,
157
+ K as useRegisterActiveEntities,
158
+ gt as useStagingModeState,
159
+ Ue as validateEntityId,
160
+ qe as validateFormData,
161
+ Je as validateProductName,
162
+ Qe as validateVersion,
163
+ we as waitForRealtimeJitter
151
164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynput/ayon-frontend-shared",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Shared React components for AYON frontend",
5
5
  "module": "dist/index.es.js",
6
6
  "exports": {
@@ -1,28 +0,0 @@
1
- const a = (e, l) => {
2
- if (!(!e?.scope?.includes(l) || e?.name !== "priority"))
3
- return e.data.enum || [];
4
- }, n = (e, l, c) => {
5
- let o = "", t, i, r;
6
- switch (l) {
7
- case "folder":
8
- o = [...e, c].join("/");
9
- break;
10
- case "task":
11
- o = e.join("/"), t = c;
12
- break;
13
- case "product":
14
- o = e.join("/"), i = c;
15
- break;
16
- case "version":
17
- e.length > 0 && (o = e.slice(0, -1).join("/"), i = e[e.length - 1]), r = c;
18
- break;
19
- case "representation":
20
- e.length > 1 && (o = e.slice(0, -2).join("/"), i = e[e.length - 2], r = e[e.length - 1]);
21
- break;
22
- }
23
- return { folderPath: o, taskName: t, productName: i, versionName: r };
24
- };
25
- export {
26
- n as e,
27
- a as g
28
- };
@@ -1,138 +0,0 @@
1
- import { e as m, g as h } from "./getEntityTypeIcon.es.js";
2
- import { deburr as g, snakeCase as y } from "lodash";
3
- const w = (t, s, p) => {
4
- let n = "format_list_bulleted";
5
- const i = {
6
- status: "arrow_circle_right",
7
- assignees: "person",
8
- author: "person",
9
- tags: "local_offer",
10
- priority: "keyboard_double_arrow_up",
11
- fps: "30fps_select",
12
- resolutionWidth: "settings_overscan",
13
- resolutionHeight: "settings_overscan",
14
- pixelAspect: "stop",
15
- clipIn: "line_start_diamond",
16
- clipOut: "line_end_diamond",
17
- frameStart: "line_start_circle",
18
- frameEnd: "line_end_circle",
19
- handleStart: "line_start_square",
20
- handleEnd: "line_end_square",
21
- fullName: "id_card",
22
- email: "alternate_email",
23
- developerMode: "code",
24
- productGroup: "inventory_2",
25
- machine: "computer",
26
- comment: "comment",
27
- colorSpace: "palette",
28
- description: "description",
29
- latest: "verified"
30
- }, c = {
31
- integer: "pin",
32
- float: "speed_1_2",
33
- boolean: "check_box",
34
- datetime: "calendar_month",
35
- list_of_strings: "format_list_bulleted",
36
- list_of_integers: "format_list_numbered",
37
- list_of_any: "format_list_bulleted",
38
- list_of_submodels: "format_list_bulleted",
39
- dict: "format_list_bulleted",
40
- string: "title"
41
- };
42
- return i[t] ? n = i[t] : m.includes(t) ? n = h(t) : p && s === "string" ? n = "format_list_bulleted" : p ? n = "checklist" : s && c[s] && (n = c[s]), n;
43
- }, N = (t) => t ? /\s/.test(t) ? { valid: !1, error: "Spaces are not allowed in name" } : /^[a-zA-Z0-9_\.\-]+$/.test(t) ? /^[.-]/.test(t) ? { valid: !1, error: "Name cannot start with dot or dash" } : /[.-]$/.test(t) ? { valid: !1, error: "Name cannot end with dot or dash" } : { valid: !0 } : {
44
- valid: !1,
45
- error: "Name can only contain letters, numbers, underscores, dashes or dots"
46
- } : { valid: !1, error: "Name is required" }, L = (t) => t ? t.includes("'") ? { valid: !1, error: "Label cannot contain single quotes (')" } : { valid: !0 } : { valid: !1, error: "Label is required" }, k = (t, s = { capitalization: "lower", separator: "" }) => {
47
- const { capitalization: p = "lower", separator: n = "" } = s;
48
- if (!t) return "";
49
- const d = t.trim().split(/\s+/).filter(Boolean).map((o) => {
50
- let r = o.normalize("NFD");
51
- return r = g(r), r = r.replace(/[^a-zA-Z0-9_\-\.]+/g, ""), r = r.replace(/[.-]+$/g, ""), r;
52
- }).filter(Boolean);
53
- let e = ((o) => {
54
- switch (p) {
55
- case "upper":
56
- return o.map((r) => r.toUpperCase());
57
- case "pascal":
58
- return o.map((r) => r.charAt(0).toUpperCase() + r.slice(1).toLowerCase());
59
- case "camel":
60
- return o.map(
61
- (r, _) => _ === 0 ? r.toLowerCase() : r.charAt(0).toUpperCase() + r.slice(1).toLowerCase()
62
- );
63
- case "keep":
64
- return o;
65
- default:
66
- return o.map((r) => r.toLowerCase());
67
- }
68
- })(d).join(n);
69
- e = e.replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g, "");
70
- const { valid: a } = N(e);
71
- return a || (e = y(e)), e;
72
- }, A = (t) => {
73
- const s = document.createElement("div");
74
- s.innerHTML = t;
75
- const p = [];
76
- let n = 0;
77
- const i = (l) => {
78
- if (l.nodeType === Node.TEXT_NODE)
79
- return l.textContent || "";
80
- if (l.nodeType === Node.ELEMENT_NODE) {
81
- const e = l;
82
- if (e.tagName === "A") {
83
- const a = e.getAttribute("href"), o = e.textContent || "";
84
- return a && o ? (p.push({
85
- type: "url",
86
- content: o,
87
- href: a,
88
- key: n++
89
- }), `__LINK_${n - 1}__`) : o;
90
- }
91
- if (e.tagName === "LI") {
92
- const a = Array.from(e.childNodes).map(i).join("").trim();
93
- return a ? `• ${a}` : "";
94
- }
95
- if (e.tagName === "OL" || e.tagName === "UL")
96
- return Array.from(e.children).filter((o) => o.tagName === "LI").map(i).filter((o) => o.trim()).join(`
97
- `);
98
- if (e.tagName === "P") {
99
- const a = Array.from(e.childNodes).map(i).join("");
100
- return a.trim() ? a + `
101
- ` : "";
102
- }
103
- return e.tagName === "BR" ? `
104
- ` : Array.from(e.childNodes).map(i).join("");
105
- }
106
- return "";
107
- };
108
- let c = i(s);
109
- c = c.replace(/\n{3,}/g, `
110
-
111
- `).replace(/[ \t]+/g, " ").trim();
112
- const d = [];
113
- let u = c, f = 0;
114
- return p.forEach((l) => {
115
- const e = `__LINK_${l.key}__`, a = u.split(e);
116
- a.length > 1 && (a[0] && d.push({
117
- type: "text",
118
- content: a[0],
119
- key: f++
120
- }), d.push({
121
- type: "url",
122
- content: l.content,
123
- href: l.href,
124
- key: f++
125
- }), u = a.slice(1).join(e));
126
- }), u && d.push({
127
- type: "text",
128
- content: u,
129
- key: f++
130
- }), d.length > 0 ? d : [{ type: "text", content: c, key: 0 }];
131
- };
132
- export {
133
- N as a,
134
- A as b,
135
- L as c,
136
- w as g,
137
- k as p
138
- };