@cccsaurora/clue-ui 1.1.0-dev.10 → 1.1.0-dev.100

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 (85) hide show
  1. package/{ActionForm-D4ryHO0M.js → ActionForm-ByeOzpc4.js} +162 -43
  2. package/{AnnotationDetails-YAPoqw3R.js → AnnotationDetails-DknbKDyl.js} +1 -1
  3. package/{AnnotationPreview-DiQDjt9s.js → AnnotationPreview-CQwKs8se.js} +2 -2
  4. package/{ClueEnrichContext-DIn6g8tw.js → ClueEnrichContext-6NJfXpUB.js} +27 -13
  5. package/_commonjsHelpers-DWwsNxpa.js +8 -0
  6. package/api/lookup/index.d.ts +1 -1
  7. package/api/lookup/types.d.ts +2 -2
  8. package/api/lookup/types_detection.d.ts +2 -2
  9. package/components/AnnotationBody.js +1 -1
  10. package/components/AnnotationDetailPopover.js +1 -1
  11. package/components/AnnotationDetails.js +2 -2
  12. package/components/AnnotationEntry.js +1 -1
  13. package/components/AnnotationPreview.js +2 -2
  14. package/components/ClassificationChip.d.ts +2 -1
  15. package/components/EnrichedCard.js +11 -5
  16. package/components/EnrichedChip.js +4 -10
  17. package/components/EnrichedTypography.d.ts +1 -1
  18. package/components/EnrichedTypography.js +7 -12
  19. package/components/actions/ActionForm.js +3 -3
  20. package/components/actions/ResultModal.js +12 -44
  21. package/components/actions/form/schemaAdapter.js +4 -3
  22. package/components/display/graph/elements/NodeCard.js +26 -4
  23. package/components/display/graph/index.js +15 -16
  24. package/components/display/json/index.js +2 -2
  25. package/components/display/markdown/index.js +190 -19
  26. package/components/enrichment/EnrichPopover.js +1 -1
  27. package/components/fetchers/Fetcher.js +1 -1
  28. package/components/fetchers/StatusChip.js +0 -1
  29. package/components/group/Entry.js +1 -1
  30. package/components/group/GroupControl.js +3 -2
  31. package/components/stats/QueryStatus.js +8 -4
  32. package/database/index.js +1 -1
  33. package/en/translation.json +39 -59
  34. package/fr/translation.json +37 -56
  35. package/hooks/ClueActionContext.d.ts +26 -0
  36. package/hooks/ClueActionContext.js +5 -4
  37. package/hooks/ClueDatabaseContext.js +1 -1
  38. package/hooks/ClueEnrichContext.js +2 -2
  39. package/hooks/ClueEnrichContextType.d.ts +7 -0
  40. package/hooks/ClueEnrichProps.d.ts +3 -1
  41. package/hooks/ClueFetcherContext.js +1 -1
  42. package/hooks/CluePopupContext.js +2 -2
  43. package/hooks/ClueProvider.js +3 -3
  44. package/hooks/selectors.d.ts +4 -5
  45. package/hooks/selectors.js +3 -4
  46. package/hooks/useActionResult.d.ts +14 -0
  47. package/hooks/useActionResult.js +5 -0
  48. package/hooks/useAnnotations.js +1 -1
  49. package/hooks/useClue.js +1 -1
  50. package/hooks/useClueActions.d.ts +1 -1
  51. package/hooks/useClueActions.js +1 -1
  52. package/hooks/useClueConfig.d.ts +2 -1
  53. package/hooks/useClueConfig.js +2 -2
  54. package/hooks/useClueTypeConfig.js +1 -1
  55. package/hooks/useMyLocalStorage.d.ts +4 -3
  56. package/hooks/useMyLocalStorage.js +6 -6
  57. package/icons/Action.js +2 -2
  58. package/icons/Assessment.js +1 -1
  59. package/icons/Context.js +6 -3
  60. package/icons/Opinion.js +1 -1
  61. package/{index-BMxyILVD.js → index-Bi21Wb23.js} +1 -1
  62. package/{index-BHPT3qoB.js → index-C3lkTD69.js} +1 -1
  63. package/{index-Dz1kF2MU.js → index-CC12Ux-9.js} +2 -2
  64. package/main.d.ts +3 -2
  65. package/main.js +17 -13
  66. package/package.json +3 -3
  67. package/types/RunningActionData.d.ts +4 -3
  68. package/types/action.d.ts +10 -1
  69. package/types/config.d.ts +4 -1
  70. package/{useClueTypeConfig-CH-nGq6a.js → useClueTypeConfig-XvGvIw2S.js} +54 -37
  71. package/utils/graph.js +4 -4
  72. package/utils/loggerUtil.d.ts +1 -1
  73. package/utils/loggerUtil.js +2 -2
  74. package/utils/sessionStorage.js +1 -1
  75. package/utils/time.d.ts +3 -0
  76. package/utils/time.js +536 -0
  77. package/utils/utils.js +2 -1
  78. package/utils-7OtvGnmf.js +200 -0
  79. package/_commonjsHelpers-CUmg6egw.js +0 -6
  80. package/components/display/markdown/DynamicTabs.d.ts +0 -8
  81. package/components/display/markdown/DynamicTabs.js +0 -26
  82. package/components/display/markdown/markdownPlugins/tabs.d.ts +0 -3
  83. package/components/display/markdown/markdownPlugins/tabs.js +0 -4
  84. package/tabs-xGuUGsJd.js +0 -254
  85. package/utils-Dr4wbKBZ.js +0 -4182
@@ -0,0 +1,200 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { dayjs } from "./utils/time.js";
5
+ import { i as isArray } from "./_Map-kgDsDYxq.js";
6
+ import { i as isEmpty } from "./isEmpty-BQkZubqU.js";
7
+ import { b as baseIsEqual } from "./_baseIsEqual-B5xLoweL.js";
8
+ import { i as isNil } from "./isNil-CIubwp4T.js";
9
+ import { i as isObjectLike, b as baseGetTag } from "./isObjectLike-OAgjjZye.js";
10
+ import { g as getPrototype } from "./_getPrototype-D1LAdQKO.js";
11
+ import { b as baseUniq } from "./_baseUniq-CpupKWcL.js";
12
+ function isBuffer(obj) {
13
+ return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
14
+ }
15
+ function keyIdentity(key) {
16
+ return key;
17
+ }
18
+ function flatten(target, opts) {
19
+ opts = opts || {};
20
+ const delimiter = opts.delimiter || ".";
21
+ const maxDepth = opts.maxDepth;
22
+ const transformKey = opts.transformKey || keyIdentity;
23
+ const output = {};
24
+ function step(object, prev, currentDepth) {
25
+ currentDepth = currentDepth || 1;
26
+ Object.keys(object).forEach(function(key) {
27
+ const value = object[key];
28
+ const isarray = opts.safe && Array.isArray(value);
29
+ const type = Object.prototype.toString.call(value);
30
+ const isbuffer = isBuffer(value);
31
+ const isobject = type === "[object Object]" || type === "[object Array]";
32
+ const newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
33
+ if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) {
34
+ return step(value, newKey, currentDepth + 1);
35
+ }
36
+ output[newKey] = value;
37
+ });
38
+ }
39
+ step(target);
40
+ return output;
41
+ }
42
+ function unflatten(target, opts) {
43
+ opts = opts || {};
44
+ const delimiter = opts.delimiter || ".";
45
+ const overwrite = opts.overwrite || false;
46
+ const transformKey = opts.transformKey || keyIdentity;
47
+ const result = {};
48
+ const isbuffer = isBuffer(target);
49
+ if (isbuffer || Object.prototype.toString.call(target) !== "[object Object]") {
50
+ return target;
51
+ }
52
+ function getkey(key) {
53
+ const parsedKey = Number(key);
54
+ return isNaN(parsedKey) || key.indexOf(".") !== -1 || opts.object ? key : parsedKey;
55
+ }
56
+ function addKeys(keyPrefix, recipient, target2) {
57
+ return Object.keys(target2).reduce(function(result2, key) {
58
+ result2[keyPrefix + delimiter + key] = target2[key];
59
+ return result2;
60
+ }, recipient);
61
+ }
62
+ function isEmpty2(val) {
63
+ const type = Object.prototype.toString.call(val);
64
+ const isArray2 = type === "[object Array]";
65
+ const isObject = type === "[object Object]";
66
+ if (!val) {
67
+ return true;
68
+ } else if (isArray2) {
69
+ return !val.length;
70
+ } else if (isObject) {
71
+ return !Object.keys(val).length;
72
+ }
73
+ }
74
+ target = Object.keys(target).reduce(function(result2, key) {
75
+ const type = Object.prototype.toString.call(target[key]);
76
+ const isObject = type === "[object Object]" || type === "[object Array]";
77
+ if (!isObject || isEmpty2(target[key])) {
78
+ result2[key] = target[key];
79
+ return result2;
80
+ } else {
81
+ return addKeys(
82
+ key,
83
+ result2,
84
+ flatten(target[key], opts)
85
+ );
86
+ }
87
+ }, {});
88
+ Object.keys(target).forEach(function(key) {
89
+ const split = key.split(delimiter).map(transformKey);
90
+ let key1 = getkey(split.shift());
91
+ let key2 = getkey(split[0]);
92
+ let recipient = result;
93
+ while (key2 !== void 0) {
94
+ if (key1 === "__proto__") {
95
+ return;
96
+ }
97
+ const type = Object.prototype.toString.call(recipient[key1]);
98
+ const isobject = type === "[object Object]" || type === "[object Array]";
99
+ if (!overwrite && !isobject && typeof recipient[key1] !== "undefined") {
100
+ return;
101
+ }
102
+ if (overwrite && !isobject || !overwrite && recipient[key1] == null) {
103
+ recipient[key1] = typeof key2 === "number" && !opts.object ? [] : {};
104
+ }
105
+ recipient = recipient[key1];
106
+ if (split.length > 0) {
107
+ key1 = getkey(split.shift());
108
+ key2 = getkey(split[0]);
109
+ }
110
+ }
111
+ recipient[key1] = unflatten(target[key], opts);
112
+ });
113
+ return result;
114
+ }
115
+ var objectTag = "[object Object]";
116
+ var funcProto = Function.prototype, objectProto = Object.prototype;
117
+ var funcToString = funcProto.toString;
118
+ var hasOwnProperty = objectProto.hasOwnProperty;
119
+ var objectCtorString = funcToString.call(Object);
120
+ function isPlainObject(value) {
121
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
122
+ return false;
123
+ }
124
+ var proto = getPrototype(value);
125
+ if (proto === null) {
126
+ return true;
127
+ }
128
+ var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
129
+ return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
130
+ }
131
+ function isEqual(value, other) {
132
+ return baseIsEqual(value, other);
133
+ }
134
+ function uniqWith(array, comparator) {
135
+ comparator = typeof comparator == "function" ? comparator : void 0;
136
+ return array && array.length ? baseUniq(array, void 0, comparator) : [];
137
+ }
138
+ const twitterShort = (date) => {
139
+ if (!date || date === "?") {
140
+ return "?";
141
+ }
142
+ const now = dayjs();
143
+ const comparedDate = dayjs(date);
144
+ if (comparedDate.isAfter(now)) {
145
+ return now.fromNow();
146
+ }
147
+ return comparedDate.fromNow();
148
+ };
149
+ const delay = (ms, rejectOnCancel = false) => {
150
+ let timerId;
151
+ let onCancel;
152
+ class TimedPromise extends Promise {
153
+ constructor() {
154
+ super(...arguments);
155
+ __publicField(this, "cancel", () => {
156
+ if (rejectOnCancel) {
157
+ onCancel();
158
+ }
159
+ clearTimeout(timerId);
160
+ });
161
+ }
162
+ }
163
+ return new TimedPromise((resolve, reject) => {
164
+ timerId = setTimeout(resolve, ms);
165
+ onCancel = reject;
166
+ });
167
+ };
168
+ const removeEmpty = (obj, aggressive = false) => {
169
+ if (aggressive && isEmpty(obj)) {
170
+ return null;
171
+ } else if (isArray(obj)) {
172
+ return obj;
173
+ }
174
+ return Object.fromEntries(
175
+ Object.entries(obj ?? {}).filter(([__, v]) => !isNil(v)).map(([k, v]) => [k, isPlainObject(v) || isArray(v) ? removeEmpty(v, aggressive) : v]).filter(([__, v]) => !!v)
176
+ );
177
+ };
178
+ const searchObject = (o, query) => {
179
+ try {
180
+ const regex = new RegExp(query, "i");
181
+ return unflatten(
182
+ Object.fromEntries(Object.entries(flatten(o)).filter(([k, v]) => regex.test(k) || regex.test(v))) ?? {}
183
+ );
184
+ } catch {
185
+ return o;
186
+ }
187
+ };
188
+ const filterEnrichments = (failedEnrichments) => {
189
+ return uniqWith(failedEnrichments, isEqual);
190
+ };
191
+ export {
192
+ isPlainObject as a,
193
+ filterEnrichments as b,
194
+ delay as d,
195
+ flatten as f,
196
+ isEqual as i,
197
+ removeEmpty as r,
198
+ searchObject as s,
199
+ twitterShort as t
200
+ };
@@ -1,6 +0,0 @@
1
- function getDefaultExportFromCjs(x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
3
- }
4
- export {
5
- getDefaultExportFromCjs as g
6
- };
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- declare const DynamicTabs: React.FC<{
3
- tabs: {
4
- title: string;
5
- children: React.ReactNode;
6
- }[];
7
- }>;
8
- export default DynamicTabs;
@@ -1,26 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Box, Tabs, Tab } from "@mui/material";
3
- import * as React from "react";
4
- const CustomTabPanel = (props) => {
5
- const { children, value, index, ...other } = props;
6
- return /* @__PURE__ */ jsx("div", { role: "tabpanel", hidden: value !== index, id: `tabpanel-${index}`, "aria-labelledby": `tab-${index}`, ...other, children: value === index && /* @__PURE__ */ jsx(Box, { sx: { p: 1 }, children }) });
7
- };
8
- const a11yProps = (index) => {
9
- return {
10
- id: `tab-${index}`,
11
- "aria-controls": `tabpanel-${index}`
12
- };
13
- };
14
- const DynamicTabs = ({ tabs }) => {
15
- const [value, setValue] = React.useState(0);
16
- const handleChange = (_event, newValue) => {
17
- setValue(newValue);
18
- };
19
- return /* @__PURE__ */ jsxs(Box, { sx: { width: "100%" }, children: [
20
- /* @__PURE__ */ jsx(Box, { sx: { borderBottom: 1, borderColor: "divider" }, children: /* @__PURE__ */ jsx(Tabs, { value, onChange: handleChange, "aria-label": "dynamic tabs", children: tabs.map((t, index) => /* @__PURE__ */ jsx(Tab, { label: t.title, ...a11yProps(index) }, t.title)) }) }),
21
- tabs.map((t, index) => /* @__PURE__ */ jsx(CustomTabPanel, { value, index, children: t.children }, t.title))
22
- ] });
23
- };
24
- export {
25
- DynamicTabs as default
26
- };
@@ -1,3 +0,0 @@
1
- import type * as mdast from 'mdast';
2
- import type * as unified from 'unified';
3
- export declare const codeTabs: unified.Plugin<[], mdast.Root>;
@@ -1,4 +0,0 @@
1
- import { c } from "../../../../tabs-xGuUGsJd.js";
2
- export {
3
- c as codeTabs
4
- };
package/tabs-xGuUGsJd.js DELETED
@@ -1,254 +0,0 @@
1
- const convert = (
2
- // Note: overloads in JSDoc can’t yet use different `@template`s.
3
- /**
4
- * @type {(
5
- * (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
6
- * (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
7
- * (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
8
- * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
9
- * ((test?: Test) => Check)
10
- * )}
11
- */
12
- /**
13
- * @param {Test} [test]
14
- * @returns {Check}
15
- */
16
- function(test) {
17
- if (test === null || test === void 0) {
18
- return ok;
19
- }
20
- if (typeof test === "function") {
21
- return castFactory(test);
22
- }
23
- if (typeof test === "object") {
24
- return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
25
- }
26
- if (typeof test === "string") {
27
- return typeFactory(test);
28
- }
29
- throw new Error("Expected function, string, or object as test");
30
- }
31
- );
32
- function anyFactory(tests) {
33
- const checks = [];
34
- let index = -1;
35
- while (++index < tests.length) {
36
- checks[index] = convert(tests[index]);
37
- }
38
- return castFactory(any);
39
- function any(...parameters) {
40
- let index2 = -1;
41
- while (++index2 < checks.length) {
42
- if (checks[index2].apply(this, parameters)) return true;
43
- }
44
- return false;
45
- }
46
- }
47
- function propsFactory(check) {
48
- const checkAsRecord = (
49
- /** @type {Record<string, unknown>} */
50
- check
51
- );
52
- return castFactory(all);
53
- function all(node) {
54
- const nodeAsRecord = (
55
- /** @type {Record<string, unknown>} */
56
- /** @type {unknown} */
57
- node
58
- );
59
- let key;
60
- for (key in check) {
61
- if (nodeAsRecord[key] !== checkAsRecord[key]) return false;
62
- }
63
- return true;
64
- }
65
- }
66
- function typeFactory(check) {
67
- return castFactory(type);
68
- function type(node) {
69
- return node && node.type === check;
70
- }
71
- }
72
- function castFactory(testFunction) {
73
- return check;
74
- function check(value, index, parent) {
75
- return Boolean(
76
- looksLikeANode(value) && testFunction.call(
77
- this,
78
- value,
79
- typeof index === "number" ? index : void 0,
80
- parent || void 0
81
- )
82
- );
83
- }
84
- }
85
- function ok() {
86
- return true;
87
- }
88
- function looksLikeANode(value) {
89
- return value !== null && typeof value === "object" && "type" in value;
90
- }
91
- function color(d) {
92
- return d;
93
- }
94
- const empty = [];
95
- const CONTINUE = true;
96
- const EXIT = false;
97
- const SKIP = "skip";
98
- function visitParents(tree, test, visitor, reverse) {
99
- let check;
100
- if (typeof test === "function" && typeof visitor !== "function") {
101
- reverse = visitor;
102
- visitor = test;
103
- } else {
104
- check = test;
105
- }
106
- const is = convert(check);
107
- const step = reverse ? -1 : 1;
108
- factory(tree, void 0, [])();
109
- function factory(node, index, parents) {
110
- const value = (
111
- /** @type {Record<string, unknown>} */
112
- node && typeof node === "object" ? node : {}
113
- );
114
- if (typeof value.type === "string") {
115
- const name = (
116
- // `hast`
117
- typeof value.tagName === "string" ? value.tagName : (
118
- // `xast`
119
- typeof value.name === "string" ? value.name : void 0
120
- )
121
- );
122
- Object.defineProperty(visit2, "name", {
123
- value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
124
- });
125
- }
126
- return visit2;
127
- function visit2() {
128
- let result = empty;
129
- let subresult;
130
- let offset;
131
- let grandparents;
132
- if (!test || is(node, index, parents[parents.length - 1] || void 0)) {
133
- result = toResult(visitor(node, parents));
134
- if (result[0] === EXIT) {
135
- return result;
136
- }
137
- }
138
- if ("children" in node && node.children) {
139
- const nodeAsParent = (
140
- /** @type {UnistParent} */
141
- node
142
- );
143
- if (nodeAsParent.children && result[0] !== SKIP) {
144
- offset = (reverse ? nodeAsParent.children.length : -1) + step;
145
- grandparents = parents.concat(nodeAsParent);
146
- while (offset > -1 && offset < nodeAsParent.children.length) {
147
- const child = nodeAsParent.children[offset];
148
- subresult = factory(child, offset, grandparents)();
149
- if (subresult[0] === EXIT) {
150
- return subresult;
151
- }
152
- offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
153
- }
154
- }
155
- }
156
- return result;
157
- }
158
- }
159
- }
160
- function toResult(value) {
161
- if (Array.isArray(value)) {
162
- return value;
163
- }
164
- if (typeof value === "number") {
165
- return [CONTINUE, value];
166
- }
167
- return value === null || value === void 0 ? empty : [value];
168
- }
169
- function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
170
- let reverse;
171
- let test;
172
- let visitor;
173
- if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
174
- test = void 0;
175
- visitor = testOrVisitor;
176
- reverse = visitorOrReverse;
177
- } else {
178
- test = testOrVisitor;
179
- visitor = visitorOrReverse;
180
- reverse = maybeReverse;
181
- }
182
- visitParents(tree, test, overload, reverse);
183
- function overload(node, parents) {
184
- const parent = parents[parents.length - 1];
185
- const index = parent ? parent.children.indexOf(node) : void 0;
186
- return visitor(node, index, parent);
187
- }
188
- }
189
- function findTabs(index, parent) {
190
- const { children } = parent;
191
- const tabs = [];
192
- while (index++ < children.length) {
193
- const child = children[index];
194
- if (child && child.type === "code") {
195
- const metaString = `${child.lang ?? ""} ${child.meta ?? ""}`.trim();
196
- if (!metaString) break;
197
- const [tabtitle] = metaString.match(new RegExp(`(?<=tab=("|'))(.*?)(?=("|'))`)) ?? [""];
198
- if (!tabtitle) {
199
- console.warn("Failed to parse tab title.");
200
- break;
201
- }
202
- tabs.push({ title: tabtitle, lang: child.lang, value: child.value });
203
- } else {
204
- break;
205
- }
206
- }
207
- return tabs;
208
- }
209
- const codeTabs = () => {
210
- return (tree, file) => {
211
- visit(tree, "code", (node, index, parent) => {
212
- const metaString = `${node.lang ?? ""} ${node.meta ?? ""}`.trim();
213
- if (!metaString) {
214
- return;
215
- }
216
- const [tab] = metaString.match(new RegExp(`(?<=tab=("|'))(.*?)(?=("|'))`)) ?? [""];
217
- if (!tab && metaString.includes("tab=")) {
218
- file.message("Invalid tab title", node, "remark-code-title");
219
- return;
220
- }
221
- if (!tab) {
222
- return;
223
- }
224
- const tabs = [{ title: tab, lang: node.lang, value: node.value }, ...findTabs(index, parent)];
225
- if (tabs.length > 1) {
226
- const tabsNode = {
227
- type: "code",
228
- lang: "tabs",
229
- value: JSON.stringify(tabs)
230
- };
231
- parent.children.splice(index, tabs.length, tabsNode);
232
- return index + tabs.length - 1;
233
- } else {
234
- const titleNode = {
235
- type: "paragraph",
236
- data: {
237
- hName: "div",
238
- hProperties: {
239
- "data-remark-code-title": true,
240
- "data-language": node.lang
241
- }
242
- },
243
- children: [{ type: "text", value: tab }]
244
- };
245
- parent.children.splice(index, 0, titleNode);
246
- return index + 2;
247
- }
248
- });
249
- };
250
- };
251
- export {
252
- codeTabs as c,
253
- visit as v
254
- };