@bikdotai/bik-component-library 0.0.839-beta.6 → 0.0.839
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.
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +20 -44
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js +2 -2
- package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/DiscardModal.js +1 -1
- package/dist/cjs/components/agent-builder/components/DiscardModal.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js +1 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionEditor.js +1 -1
- package/dist/cjs/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +13 -13
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +4 -4
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +6 -6
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/StepSectionHeader.js +1 -1
- package/dist/cjs/components/agent-builder/components/StepSectionHeader.js.map +1 -1
- package/dist/cjs/components/agent-builder/constants/tools.js +1 -1
- package/dist/cjs/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +1 -3
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +3 -5
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentListing.js +1 -1
- package/dist/cjs/components/agent-listing/AgentListing.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentTable.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTable.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/cjs/components/agent-listing/DeleteAgentModal.js +1 -1
- package/dist/cjs/components/agent-listing/DeleteAgentModal.js.map +1 -1
- package/dist/cjs/components/button/Button.styled.js +0 -1
- package/dist/cjs/components/button/Button.styled.js.map +1 -1
- package/dist/cjs/components/button/themes.js +11 -11
- package/dist/cjs/components/button/themes.js.map +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.styles.js +54 -97
- package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
- package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js +3 -3
- package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
- package/dist/cjs/icons/Media/Visual/FormkitNeutral.js +2 -0
- package/dist/cjs/icons/Media/Visual/FormkitNeutral.js.map +1 -0
- package/dist/cjs/icons/Media/Visual/FormkitSad.js +2 -0
- package/dist/cjs/icons/Media/Visual/FormkitSad.js.map +1 -0
- package/dist/cjs/icons/index.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +66 -61
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +102 -106
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +0 -3
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +82 -110
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +21 -29
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +26 -27
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.js +25 -25
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +23 -24
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/DiscardModal.d.ts +1 -3
- package/dist/esm/components/agent-builder/components/DiscardModal.js +16 -25
- package/dist/esm/components/agent-builder/components/DiscardModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/GoLiveModal.js +34 -36
- package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionEditor.js +19 -19
- package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.js +60 -64
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.d.ts +0 -2
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +105 -111
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +4 -13
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +148 -173
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/components/StepSectionHeader.js +7 -7
- package/dist/esm/components/agent-builder/components/StepSectionHeader.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/tools.js +1 -1
- package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +103 -104
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +98 -102
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +142 -144
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +79 -23
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +23 -35
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentListing.js +65 -70
- package/dist/esm/components/agent-listing/AgentListing.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTable.d.ts +0 -2
- package/dist/esm/components/agent-listing/AgentTable.js +15 -16
- package/dist/esm/components/agent-listing/AgentTable.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.js +11 -11
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/esm/components/agent-listing/DeleteAgentModal.js +8 -8
- package/dist/esm/components/agent-listing/DeleteAgentModal.js.map +1 -1
- package/dist/esm/components/button/Button.styled.js +19 -25
- package/dist/esm/components/button/Button.styled.js.map +1 -1
- package/dist/esm/components/button/themes.d.ts +1 -0
- package/dist/esm/components/button/themes.js +61 -51
- package/dist/esm/components/button/themes.js.map +1 -1
- package/dist/esm/components/dropdown/Dropdown.js +13 -18
- package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.js +13 -13
- package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/esm/editor/BikEditor.js +160 -173
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.styles.d.ts +3 -20
- package/dist/esm/editor/BikEditor.styles.js +57 -102
- package/dist/esm/editor/BikEditor.styles.js.map +1 -1
- package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.d.ts +8 -5
- package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js +68 -87
- package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
- package/dist/esm/icons/Media/Visual/FormkitNeutral.js +58 -0
- package/dist/esm/icons/Media/Visual/FormkitNeutral.js.map +1 -0
- package/dist/esm/icons/Media/Visual/FormkitSad.js +61 -0
- package/dist/esm/icons/Media/Visual/FormkitSad.js.map +1 -0
- package/dist/esm/icons/Media/Visual/index.d.ts +2 -0
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/icons/index.js +420 -416
- package/dist/esm/icons/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/agent-listing/AgentTableShimmer.js +0 -2
- package/dist/cjs/components/agent-listing/AgentTableShimmer.js.map +0 -1
- package/dist/esm/components/agent-builder/__fixtures__/agentValue.d.ts +0 -11
- package/dist/esm/components/agent-listing/AgentTableShimmer.d.ts +0 -12
- package/dist/esm/components/agent-listing/AgentTableShimmer.js +0 -20
- package/dist/esm/components/agent-listing/AgentTableShimmer.js.map +0 -1
- package/dist/esm/components/agent-listing/__fixtures__/agents.d.ts +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Extension as
|
|
2
|
-
import { Plugin as
|
|
3
|
-
import { Decoration as
|
|
4
|
-
import { tokenizeJson as
|
|
5
|
-
const
|
|
1
|
+
import { Extension as h } from "../../../node_modules/@tiptap/core/dist/index.js";
|
|
2
|
+
import { Plugin as d, PluginKey as p, TextSelection as m } from "@tiptap/pm/state";
|
|
3
|
+
import { Decoration as u, DecorationSet as g } from "@tiptap/pm/view";
|
|
4
|
+
import { tokenizeJson as k } from "./tokenizeJson.js";
|
|
5
|
+
const y = {
|
|
6
6
|
key: "bik-json-key",
|
|
7
7
|
string: "bik-json-string",
|
|
8
8
|
number: "bik-json-number",
|
|
@@ -10,40 +10,11 @@ const k = {
|
|
|
10
10
|
null: "bik-json-null",
|
|
11
11
|
punctuation: "bik-json-punct"
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
function f(s) {
|
|
14
|
+
const t = document.createElement("span");
|
|
15
|
+
return t.className = "bik-json-lineno", t.textContent = String(s), t.setAttribute("contenteditable", "false"), t;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
dom;
|
|
19
|
-
contentDOM;
|
|
20
|
-
gutter;
|
|
21
|
-
constructor(n) {
|
|
22
|
-
const t = document.createElement("pre"), e = document.createElement("div");
|
|
23
|
-
e.className = "bik-json-gutter", e.contentEditable = "false";
|
|
24
|
-
const o = document.createElement("code");
|
|
25
|
-
t.appendChild(e), t.appendChild(o), this.dom = t, this.contentDOM = o, this.gutter = e, this.renderGutter(n);
|
|
26
|
-
}
|
|
27
|
-
renderGutter(n) {
|
|
28
|
-
const t = b(n.textContent);
|
|
29
|
-
if (this.gutter.childElementCount === t)
|
|
30
|
-
return;
|
|
31
|
-
const e = [];
|
|
32
|
-
for (let o = 1; o <= t; o++) {
|
|
33
|
-
const s = document.createElement("span");
|
|
34
|
-
s.className = "bik-json-lineno", s.textContent = String(o), e.push(s);
|
|
35
|
-
}
|
|
36
|
-
this.gutter.replaceChildren(...e);
|
|
37
|
-
}
|
|
38
|
-
update(n) {
|
|
39
|
-
return n.type.name !== "codeBlock" ? !1 : (this.renderGutter(n), !0);
|
|
40
|
-
}
|
|
41
|
-
// The gutter is ours to manage — never let ProseMirror parse it as content.
|
|
42
|
-
ignoreMutation(n) {
|
|
43
|
-
return this.gutter === n.target || this.gutter.contains(n.target);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const E = p.create({
|
|
17
|
+
const w = h.create({
|
|
47
18
|
name: "jsonHighlight",
|
|
48
19
|
// Above CodeBlock (default 100) so our Backspace handler runs first and can
|
|
49
20
|
// veto CodeBlock's own "clearNodes at start" shortcut (which would lift the
|
|
@@ -58,15 +29,15 @@ const E = p.create({
|
|
|
58
29
|
// deleting a leading `\n` from line 2+) still works — those have
|
|
59
30
|
// parentOffset > 0.
|
|
60
31
|
Backspace: () => {
|
|
61
|
-
const { selection:
|
|
62
|
-
return
|
|
32
|
+
const { selection: s } = this.editor.state, { empty: t, $from: e } = s;
|
|
33
|
+
return t && e.parent.type.name === "codeBlock" && e.parentOffset === 0;
|
|
63
34
|
}
|
|
64
35
|
};
|
|
65
36
|
},
|
|
66
37
|
addProseMirrorPlugins() {
|
|
67
38
|
return [
|
|
68
|
-
new
|
|
69
|
-
key: new
|
|
39
|
+
new d({
|
|
40
|
+
key: new p("jsonHighlightGuard"),
|
|
70
41
|
// jsonMode invariant: the whole document is ONE codeBlock. Several
|
|
71
42
|
// default Backspace paths can lift it to a plain paragraph — and one
|
|
72
43
|
// of them, TipTap core's `clearDocument` appendTransaction (fired when
|
|
@@ -75,70 +46,80 @@ const E = p.create({
|
|
|
75
46
|
// A paragraph has no gutter and no monospace rule, so the line numbers
|
|
76
47
|
// and font vanish. Re-wrap the content back into a codeBlock whenever
|
|
77
48
|
// something lifts it, restoring the invariant.
|
|
78
|
-
appendTransaction(
|
|
79
|
-
if (!
|
|
49
|
+
appendTransaction(s, t, e) {
|
|
50
|
+
if (!s.some((a) => a.docChanged))
|
|
80
51
|
return null;
|
|
81
|
-
const { doc:
|
|
82
|
-
if (!
|
|
52
|
+
const { doc: r, schema: i } = e, o = i.nodes.codeBlock;
|
|
53
|
+
if (!o || r.childCount === 1 && r.firstChild?.type === o)
|
|
83
54
|
return null;
|
|
84
|
-
let
|
|
85
|
-
if (
|
|
86
|
-
a.type ===
|
|
87
|
-
}),
|
|
55
|
+
let l = !1;
|
|
56
|
+
if (r.forEach((a) => {
|
|
57
|
+
a.type === o && (l = !0);
|
|
58
|
+
}), l)
|
|
88
59
|
return null;
|
|
89
|
-
const
|
|
90
|
-
`),
|
|
91
|
-
return
|
|
60
|
+
const n = r.textBetween(0, r.content.size, `
|
|
61
|
+
`), c = e.tr;
|
|
62
|
+
return c.replaceWith(
|
|
92
63
|
0,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
),
|
|
64
|
+
r.content.size,
|
|
65
|
+
o.create(null, n ? i.text(n) : null)
|
|
66
|
+
), c.setSelection(m.create(c.doc, 1)), c;
|
|
96
67
|
}
|
|
97
68
|
}),
|
|
98
|
-
new
|
|
99
|
-
key: new
|
|
69
|
+
new d({
|
|
70
|
+
key: new p("jsonHighlight"),
|
|
100
71
|
props: {
|
|
101
|
-
// The gutter is a node view, not a widget decoration — see
|
|
102
|
-
// JsonCodeBlockView for why (MAP-7286).
|
|
103
|
-
nodeViews: {
|
|
104
|
-
codeBlock: (r) => new y(r)
|
|
105
|
-
},
|
|
106
72
|
// Paste beautify: if the clipboard text is valid JSON, drop in a
|
|
107
73
|
// pretty-printed version (2-space indent, matching the Beautify
|
|
108
74
|
// button) instead of the raw blob. Non-JSON pastes fall through to
|
|
109
75
|
// the default handler untouched.
|
|
110
|
-
handlePaste(
|
|
111
|
-
const
|
|
112
|
-
if (!
|
|
76
|
+
handlePaste(s, t) {
|
|
77
|
+
const e = t.clipboardData?.getData("text/plain");
|
|
78
|
+
if (!e || !e.trim())
|
|
113
79
|
return !1;
|
|
114
|
-
let
|
|
80
|
+
let r;
|
|
115
81
|
try {
|
|
116
|
-
|
|
82
|
+
r = JSON.parse(e);
|
|
117
83
|
} catch {
|
|
118
84
|
return !1;
|
|
119
85
|
}
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
86
|
+
const i = JSON.stringify(r, null, 2);
|
|
87
|
+
if (i === e)
|
|
122
88
|
return !1;
|
|
123
|
-
const { state:
|
|
124
|
-
return
|
|
89
|
+
const { state: o, dispatch: l } = s, { from: n, to: c } = o.selection;
|
|
90
|
+
return l(o.tr.insertText(i, n, c).scrollIntoView()), !0;
|
|
125
91
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
92
|
+
decorations(s) {
|
|
93
|
+
const t = [];
|
|
94
|
+
return s.doc.descendants((e, r) => {
|
|
95
|
+
if (e.type.name !== "codeBlock") return;
|
|
96
|
+
const i = e.textContent, o = r + 1;
|
|
97
|
+
for (const n of k(i))
|
|
98
|
+
t.push(
|
|
99
|
+
u.inline(o + n.start, o + n.end, {
|
|
100
|
+
class: y[n.type]
|
|
101
|
+
})
|
|
102
|
+
);
|
|
103
|
+
let l = 1;
|
|
104
|
+
t.push(
|
|
105
|
+
u.widget(o, () => f(1), {
|
|
106
|
+
side: -1,
|
|
107
|
+
key: "ln-1"
|
|
108
|
+
})
|
|
109
|
+
);
|
|
110
|
+
for (let n = 0; n < i.length; n++) {
|
|
111
|
+
if (i[n] !== `
|
|
112
|
+
`) continue;
|
|
113
|
+
l += 1;
|
|
114
|
+
const c = l;
|
|
115
|
+
t.push(
|
|
116
|
+
u.widget(o + n + 1, () => f(c), {
|
|
117
|
+
side: -1,
|
|
118
|
+
key: `ln-${c}`
|
|
139
119
|
})
|
|
140
120
|
);
|
|
141
|
-
|
|
121
|
+
}
|
|
122
|
+
}), g.create(s.doc, t);
|
|
142
123
|
}
|
|
143
124
|
}
|
|
144
125
|
})
|
|
@@ -146,6 +127,6 @@ const E = p.create({
|
|
|
146
127
|
}
|
|
147
128
|
});
|
|
148
129
|
export {
|
|
149
|
-
|
|
130
|
+
w as JsonHighlightExtension
|
|
150
131
|
};
|
|
151
132
|
//# sourceMappingURL=JsonHighlightExtension.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonHighlightExtension.js","sources":["../../../../../src/editor/extensions/jsonHighlight/JsonHighlightExtension.ts"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model';\nimport { Plugin, PluginKey, TextSelection } from '@tiptap/pm/state';\nimport type { NodeView } from '@tiptap/pm/view';\nimport { Decoration, DecorationSet } from '@tiptap/pm/view';\nimport { JsonTokenType, tokenizeJson } from './tokenizeJson';\n\nconst CLASS_BY_TYPE: Record<JsonTokenType, string> = {\n\tkey: 'bik-json-key',\n\tstring: 'bik-json-string',\n\tnumber: 'bik-json-number',\n\tboolean: 'bik-json-boolean',\n\tnull: 'bik-json-null',\n\tpunctuation: 'bik-json-punct',\n};\n\n/** Visual line count of a code block's text (0 when empty → no gutter). */\nfunction lineCount(text: string): number {\n\treturn text.length === 0 ? 0 : text.split('\\n').length;\n}\n\n/**\n * Node view for the JSON `codeBlock` that renders the line-number gutter as a\n * `contenteditable=false` sibling of the editable `<code>` — NOT as ProseMirror\n * widget decorations.\n *\n * Why: widget decorations are re-inserted into the content flow on every\n * decoration recompute (i.e. every keystroke). Re-inserting a node next to the\n * caret reset the contenteditable selection to the line start, so typing a JSON\n * key and then its `:` dropped the caret to the start of the line (MAP-7286).\n * A node view lets us update the gutter DOM independently of `contentDOM`, so\n * the caret is never touched — and we only rebuild it when the line count\n * actually changes.\n */\nclass JsonCodeBlockView implements NodeView {\n\tdom: HTMLPreElement;\n\tcontentDOM: HTMLElement;\n\tprivate gutter: HTMLElement;\n\n\tconstructor(node: ProseMirrorNode) {\n\t\tconst pre = document.createElement('pre');\n\t\tconst gutter = document.createElement('div');\n\t\tgutter.className = 'bik-json-gutter';\n\t\tgutter.contentEditable = 'false';\n\t\tconst code = document.createElement('code');\n\t\t// Gutter is absolutely positioned into the reserved left padding, so its\n\t\t// order relative to <code> doesn't affect the code layout.\n\t\tpre.appendChild(gutter);\n\t\tpre.appendChild(code);\n\n\t\tthis.dom = pre;\n\t\tthis.contentDOM = code;\n\t\tthis.gutter = gutter;\n\t\tthis.renderGutter(node);\n\t}\n\n\tprivate renderGutter(node: ProseMirrorNode): void {\n\t\tconst count = lineCount(node.textContent);\n\t\t// Nothing to do while the line count is unchanged — this is the common case\n\t\t// (typing within a line) and skipping it avoids touching the gutter DOM.\n\t\tif (this.gutter.childElementCount === count) {\n\t\t\treturn;\n\t\t}\n\t\tconst numbers: HTMLElement[] = [];\n\t\tfor (let n = 1; n <= count; n++) {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.className = 'bik-json-lineno';\n\t\t\tspan.textContent = String(n);\n\t\t\tnumbers.push(span);\n\t\t}\n\t\tthis.gutter.replaceChildren(...numbers);\n\t}\n\n\tupdate(node: ProseMirrorNode): boolean {\n\t\tif (node.type.name !== 'codeBlock') {\n\t\t\treturn false;\n\t\t}\n\t\tthis.renderGutter(node);\n\t\treturn true;\n\t}\n\n\t// The gutter is ours to manage — never let ProseMirror parse it as content.\n\tignoreMutation(mutation: MutationRecord | { target: Node }): boolean {\n\t\treturn (\n\t\t\tthis.gutter === mutation.target || this.gutter.contains(mutation.target)\n\t\t);\n\t}\n}\n\n/**\n * Colours JSON tokens inside `codeBlock` nodes and renders a line-number gutter\n * (via {@link JsonCodeBlockView}). A code block stores its whole multi-line body\n * in a single text node, so token offsets map 1:1 onto document positions\n * (`nodeStart + offset`) — no cross-node bookkeeping needed.\n *\n * Purely decorative: the document text is never rewritten, so undo/redo,\n * character count and the cursor all behave exactly as with plain text.\n */\nexport const JsonHighlightExtension = Extension.create({\n\tname: 'jsonHighlight',\n\t// Above CodeBlock (default 100) so our Backspace handler runs first and can\n\t// veto CodeBlock's own \"clearNodes at start\" shortcut (which would lift the\n\t// block to a paragraph).\n\tpriority: 1000,\n\taddKeyboardShortcuts() {\n\t\treturn {\n\t\t\t// In JSON mode the document is a single code block. A Backspace at its very\n\t\t\t// start would lift it to a plain paragraph (killing the highlight, the\n\t\t\t// line-number gutter and the monospace font). There's nothing to delete\n\t\t\t// before the caret there anyway, so swallow it. Mid-text Backspace (and\n\t\t\t// deleting a leading `\\n` from line 2+) still works — those have\n\t\t\t// parentOffset > 0.\n\t\t\tBackspace: () => {\n\t\t\t\tconst { selection } = this.editor.state;\n\t\t\t\tconst { empty, $from } = selection;\n\t\t\t\treturn (\n\t\t\t\t\tempty &&\n\t\t\t\t\t$from.parent.type.name === 'codeBlock' &&\n\t\t\t\t\t$from.parentOffset === 0\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [\n\t\t\tnew Plugin({\n\t\t\t\tkey: new PluginKey('jsonHighlightGuard'),\n\t\t\t\t// jsonMode invariant: the whole document is ONE codeBlock. Several\n\t\t\t\t// default Backspace paths can lift it to a plain paragraph — and one\n\t\t\t\t// of them, TipTap core's `clearDocument` appendTransaction (fired when\n\t\t\t\t// the whole doc is selected then deleted, e.g. Cmd-A → Backspace),\n\t\t\t\t// runs AFTER our Backspace shortcut, so a keymap veto can't stop it.\n\t\t\t\t// A paragraph has no gutter and no monospace rule, so the line numbers\n\t\t\t\t// and font vanish. Re-wrap the content back into a codeBlock whenever\n\t\t\t\t// something lifts it, restoring the invariant.\n\t\t\t\tappendTransaction(transactions, _oldState, newState) {\n\t\t\t\t\tif (!transactions.some((tr) => tr.docChanged)) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tconst { doc, schema } = newState;\n\t\t\t\t\tconst codeBlock = schema.nodes['codeBlock'];\n\t\t\t\t\tif (!codeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// Common case: already a single codeBlock → nothing to do.\n\t\t\t\t\tif (doc.childCount === 1 && doc.firstChild?.type === codeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// If a codeBlock survives anywhere, leave it alone (don't fight\n\t\t\t\t\t// legitimate multi-node edits that shouldn't happen in jsonMode).\n\t\t\t\t\tlet hasCodeBlock = false;\n\t\t\t\t\tdoc.forEach((node) => {\n\t\t\t\t\t\tif (node.type === codeBlock) {\n\t\t\t\t\t\t\thasCodeBlock = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (hasCodeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// A lift happened: rebuild a single codeBlock from the text\n\t\t\t\t\t// (block boundaries preserved as newlines, matching JSON lines).\n\t\t\t\t\tconst text = doc.textBetween(0, doc.content.size, '\\n');\n\t\t\t\t\tconst tr = newState.tr;\n\t\t\t\t\ttr.replaceWith(\n\t\t\t\t\t\t0,\n\t\t\t\t\t\tdoc.content.size,\n\t\t\t\t\t\tcodeBlock.create(null, text ? schema.text(text) : null),\n\t\t\t\t\t);\n\t\t\t\t\ttr.setSelection(TextSelection.create(tr.doc, 1));\n\t\t\t\t\treturn tr;\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew Plugin({\n\t\t\t\tkey: new PluginKey('jsonHighlight'),\n\t\t\t\tprops: {\n\t\t\t\t\t// The gutter is a node view, not a widget decoration — see\n\t\t\t\t\t// JsonCodeBlockView for why (MAP-7286).\n\t\t\t\t\tnodeViews: {\n\t\t\t\t\t\tcodeBlock: (node) => new JsonCodeBlockView(node),\n\t\t\t\t\t},\n\t\t\t\t\t// Paste beautify: if the clipboard text is valid JSON, drop in a\n\t\t\t\t\t// pretty-printed version (2-space indent, matching the Beautify\n\t\t\t\t\t// button) instead of the raw blob. Non-JSON pastes fall through to\n\t\t\t\t\t// the default handler untouched.\n\t\t\t\t\thandlePaste(view, event) {\n\t\t\t\t\t\tconst raw = event.clipboardData?.getData('text/plain');\n\t\t\t\t\t\tif (!raw || !raw.trim()) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet value: unknown;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvalue = JSON.parse(raw);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst pretty = JSON.stringify(value, null, 2);\n\t\t\t\t\t\t// No-op if it was already beautified (avoids a redundant tx).\n\t\t\t\t\t\tif (pretty === raw) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst { state, dispatch } = view;\n\t\t\t\t\t\tconst { from, to } = state.selection;\n\t\t\t\t\t\tdispatch(state.tr.insertText(pretty, from, to).scrollIntoView());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t},\n\t\t\t\t\t// Inline token colours only. Recolouring an inline span does not\n\t\t\t\t\t// disturb the caret (unlike the old gutter widgets).\n\t\t\t\t\tdecorations(state) {\n\t\t\t\t\t\tconst decorations: Decoration[] = [];\n\t\t\t\t\t\tstate.doc.descendants((node, pos) => {\n\t\t\t\t\t\t\tif (node.type.name !== 'codeBlock') return;\n\t\t\t\t\t\t\tconst text = node.textContent;\n\t\t\t\t\t\t\tif (text.length === 0) return;\n\t\t\t\t\t\t\t// +1: step past the code-block node boundary into its text.\n\t\t\t\t\t\t\tconst base = pos + 1;\n\t\t\t\t\t\t\tfor (const tok of tokenizeJson(text)) {\n\t\t\t\t\t\t\t\tdecorations.push(\n\t\t\t\t\t\t\t\t\tDecoration.inline(base + tok.start, base + tok.end, {\n\t\t\t\t\t\t\t\t\t\tclass: CLASS_BY_TYPE[tok.type],\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn DecorationSet.create(state.doc, decorations);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t];\n\t},\n});\n"],"names":["CLASS_BY_TYPE","lineCount","text","JsonCodeBlockView","node","pre","gutter","code","count","numbers","n","span","mutation","JsonHighlightExtension","Extension","selection","empty","$from","Plugin","PluginKey","transactions","_oldState","newState","tr","doc","schema","codeBlock","hasCodeBlock","TextSelection","view","event","raw","value","pretty","state","dispatch","from","to","decorations","pos","base","tok","tokenizeJson","Decoration","DecorationSet"],"mappings":";;;;AAOA,MAAMA,IAA+C;AAAA,EACpD,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AACd;AAGA,SAASC,EAAUC,GAAsB;AACxC,SAAOA,EAAK,WAAW,IAAI,IAAIA,EAAK,MAAM;AAAA,CAAI,EAAE;AACjD;AAeA,MAAMC,EAAsC;AAAA,EAC3C;AAAA,EACA;AAAA,EACQ;AAAA,EAER,YAAYC,GAAuB;AAClC,UAAMC,IAAM,SAAS,cAAc,KAAK,GAClCC,IAAS,SAAS,cAAc,KAAK;AAC3C,IAAAA,EAAO,YAAY,mBACnBA,EAAO,kBAAkB;AACzB,UAAMC,IAAO,SAAS,cAAc,MAAM;AAG1C,IAAAF,EAAI,YAAYC,CAAM,GACtBD,EAAI,YAAYE,CAAI,GAEpB,KAAK,MAA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AO,UAAAC,EAAA,IAAaN,GACtB,EAAE,MAAAO,GAAM,IAAAC,EAAA,IAAOH,EAAM;AAC3B,mBAAAC,EAASD,EAAM,GAAG,WAAWD,GAAQG,GAAMC,CAAE,EAAE,gBAAgB,GACxD;AAAA,UACR;AAAA;AAAA;AAAA,UAGA,YAAYH,GAAO;AAClB,kBAAMI,IAA4B,CAAA;AAClC,mBAAAJ,EAAM,IAAI,YAAY,CAAC9B,GAAMmC,MAAQ;AACpC,kBAAInC,EAAK,KAAK,SAAS,YAAa;AACpC,oBAAMF,IAAOE,EAAK;AAClB,kBAAIF,EAAK,WAAW,EAAG;AAEvB,oBAAMsC,IAAOD,IAAM;AACnB,yBAAWE,KAAOC,EAAaxC,CAAI;AAClC,gBAAAoC,EAAY;AAAA,kBACXK,EAAW,OAAOH,IAAOC,EAAI,OAAOD,IAAOC,EAAI,KAAK;AAAA,oBACnD,OAAOzC,EAAcyC,EAAI,IAAI;AAAA,kBAAA,CAC7B;AAAA,gBAAA;AAAA,YAGJ,CAAC,GACMG,EAAc,OAAOV,EAAM,KAAKI,CAAW;AAAA,UACnD;AAAA,QAAA;AAAA,MACD,CACA;AAAA,IAAA;AAAA,EAEH;AACD,CAAC;"}
|
|
1
|
+
{"version":3,"file":"JsonHighlightExtension.js","sources":["../../../../../src/editor/extensions/jsonHighlight/JsonHighlightExtension.ts"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { Plugin, PluginKey, TextSelection } from '@tiptap/pm/state';\nimport { Decoration, DecorationSet } from '@tiptap/pm/view';\nimport { JsonTokenType, tokenizeJson } from './tokenizeJson';\n\nconst CLASS_BY_TYPE: Record<JsonTokenType, string> = {\n\tkey: 'bik-json-key',\n\tstring: 'bik-json-string',\n\tnumber: 'bik-json-number',\n\tboolean: 'bik-json-boolean',\n\tnull: 'bik-json-null',\n\tpunctuation: 'bik-json-punct',\n};\n\n/** Line-number widget rendered in the hanging gutter at each line start. */\nfunction lineNumberWidget(n: number): HTMLElement {\n\tconst span = document.createElement('span');\n\tspan.className = 'bik-json-lineno';\n\tspan.textContent = String(n);\n\tspan.setAttribute('contenteditable', 'false');\n\treturn span;\n}\n\n/**\n * Colours JSON tokens inside `codeBlock` nodes and renders a line-number gutter.\n * A code block stores its whole multi-line body in a single text node, so token\n * offsets map 1:1 onto document positions (`nodeStart + offset`) — no cross-node\n * bookkeeping needed, and lines are just the `\\n`-separated runs of that text.\n *\n * Purely decorative: the document text is never rewritten, so undo/redo,\n * character count and the cursor all behave exactly as with plain text. The\n * gutter numbers are `side: -1` widgets that hang into the code block's left\n * padding (see `.bik-json-lineno` in BikEditor.styles.ts), so they never enter\n * the document text or shift character offsets.\n */\nexport const JsonHighlightExtension = Extension.create({\n\tname: 'jsonHighlight',\n\t// Above CodeBlock (default 100) so our Backspace handler runs first and can\n\t// veto CodeBlock's own \"clearNodes at start\" shortcut (which would lift the\n\t// block to a paragraph).\n\tpriority: 1000,\n\taddKeyboardShortcuts() {\n\t\treturn {\n\t\t\t// In JSON mode the document is a single code block. A Backspace at its very\n\t\t\t// start would lift it to a plain paragraph (killing the highlight, the\n\t\t\t// line-number gutter and the monospace font). There's nothing to delete\n\t\t\t// before the caret there anyway, so swallow it. Mid-text Backspace (and\n\t\t\t// deleting a leading `\\n` from line 2+) still works — those have\n\t\t\t// parentOffset > 0.\n\t\t\tBackspace: () => {\n\t\t\t\tconst { selection } = this.editor.state;\n\t\t\t\tconst { empty, $from } = selection;\n\t\t\t\treturn (\n\t\t\t\t\tempty &&\n\t\t\t\t\t$from.parent.type.name === 'codeBlock' &&\n\t\t\t\t\t$from.parentOffset === 0\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [\n\t\t\tnew Plugin({\n\t\t\t\tkey: new PluginKey('jsonHighlightGuard'),\n\t\t\t\t// jsonMode invariant: the whole document is ONE codeBlock. Several\n\t\t\t\t// default Backspace paths can lift it to a plain paragraph — and one\n\t\t\t\t// of them, TipTap core's `clearDocument` appendTransaction (fired when\n\t\t\t\t// the whole doc is selected then deleted, e.g. Cmd-A → Backspace),\n\t\t\t\t// runs AFTER our Backspace shortcut, so a keymap veto can't stop it.\n\t\t\t\t// A paragraph has no gutter and no monospace rule, so the line numbers\n\t\t\t\t// and font vanish. Re-wrap the content back into a codeBlock whenever\n\t\t\t\t// something lifts it, restoring the invariant.\n\t\t\t\tappendTransaction(transactions, _oldState, newState) {\n\t\t\t\t\tif (!transactions.some((tr) => tr.docChanged)) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tconst { doc, schema } = newState;\n\t\t\t\t\tconst codeBlock = schema.nodes['codeBlock'];\n\t\t\t\t\tif (!codeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// Common case: already a single codeBlock → nothing to do.\n\t\t\t\t\tif (doc.childCount === 1 && doc.firstChild?.type === codeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// If a codeBlock survives anywhere, leave it alone (don't fight\n\t\t\t\t\t// legitimate multi-node edits that shouldn't happen in jsonMode).\n\t\t\t\t\tlet hasCodeBlock = false;\n\t\t\t\t\tdoc.forEach((node) => {\n\t\t\t\t\t\tif (node.type === codeBlock) {\n\t\t\t\t\t\t\thasCodeBlock = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (hasCodeBlock) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t// A lift happened: rebuild a single codeBlock from the text\n\t\t\t\t\t// (block boundaries preserved as newlines, matching JSON lines).\n\t\t\t\t\tconst text = doc.textBetween(0, doc.content.size, '\\n');\n\t\t\t\t\tconst tr = newState.tr;\n\t\t\t\t\ttr.replaceWith(\n\t\t\t\t\t\t0,\n\t\t\t\t\t\tdoc.content.size,\n\t\t\t\t\t\tcodeBlock.create(null, text ? schema.text(text) : null),\n\t\t\t\t\t);\n\t\t\t\t\ttr.setSelection(TextSelection.create(tr.doc, 1));\n\t\t\t\t\treturn tr;\n\t\t\t\t},\n\t\t\t}),\n\t\t\tnew Plugin({\n\t\t\t\tkey: new PluginKey('jsonHighlight'),\n\t\t\t\tprops: {\n\t\t\t\t\t// Paste beautify: if the clipboard text is valid JSON, drop in a\n\t\t\t\t\t// pretty-printed version (2-space indent, matching the Beautify\n\t\t\t\t\t// button) instead of the raw blob. Non-JSON pastes fall through to\n\t\t\t\t\t// the default handler untouched.\n\t\t\t\t\thandlePaste(view, event) {\n\t\t\t\t\t\tconst raw = event.clipboardData?.getData('text/plain');\n\t\t\t\t\t\tif (!raw || !raw.trim()) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet value: unknown;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tvalue = JSON.parse(raw);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst pretty = JSON.stringify(value, null, 2);\n\t\t\t\t\t\t// No-op if it was already beautified (avoids a redundant tx).\n\t\t\t\t\t\tif (pretty === raw) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst { state, dispatch } = view;\n\t\t\t\t\t\tconst { from, to } = state.selection;\n\t\t\t\t\t\tdispatch(state.tr.insertText(pretty, from, to).scrollIntoView());\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t},\n\t\t\t\t\tdecorations(state) {\n\t\t\t\t\t\tconst decorations: Decoration[] = [];\n\t\t\t\t\t\tstate.doc.descendants((node, pos) => {\n\t\t\t\t\t\t\tif (node.type.name !== 'codeBlock') return;\n\t\t\t\t\t\t\tconst text = node.textContent;\n\t\t\t\t\t\t\t// +1: step past the code-block node boundary into its text.\n\t\t\t\t\t\t\tconst base = pos + 1;\n\n\t\t\t\t\t\t\tfor (const tok of tokenizeJson(text)) {\n\t\t\t\t\t\t\t\tdecorations.push(\n\t\t\t\t\t\t\t\t\tDecoration.inline(base + tok.start, base + tok.end, {\n\t\t\t\t\t\t\t\t\t\tclass: CLASS_BY_TYPE[tok.type],\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// One line number per `\\n`-separated line (line 1 at offset 0,\n\t\t\t\t\t\t\t// then one after every newline). `white-space: pre` on the block\n\t\t\t\t\t\t\t// disables wrapping, so logical lines == visual lines.\n\t\t\t\t\t\t\tlet line = 1;\n\t\t\t\t\t\t\tdecorations.push(\n\t\t\t\t\t\t\t\tDecoration.widget(base, () => lineNumberWidget(1), {\n\t\t\t\t\t\t\t\t\tside: -1,\n\t\t\t\t\t\t\t\t\tkey: 'ln-1',\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tfor (let i = 0; i < text.length; i++) {\n\t\t\t\t\t\t\t\tif (text[i] !== '\\n') continue;\n\t\t\t\t\t\t\t\tline += 1;\n\t\t\t\t\t\t\t\tconst n = line;\n\t\t\t\t\t\t\t\tdecorations.push(\n\t\t\t\t\t\t\t\t\tDecoration.widget(base + i + 1, () => lineNumberWidget(n), {\n\t\t\t\t\t\t\t\t\t\tside: -1,\n\t\t\t\t\t\t\t\t\t\tkey: `ln-${n}`,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn DecorationSet.create(state.doc, decorations);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t];\n\t},\n});\n"],"names":["CLASS_BY_TYPE","lineNumberWidget","n","span","JsonHighlightExtension","Extension","selection","empty","$from","Plugin","PluginKey","transactions","_oldState","newState","tr","doc","schema","codeBlock","hasCodeBlock","node","text","TextSelection","view","event","raw","value","pretty","state","dispatch","from","to","decorations","pos","base","tok","tokenizeJson","Decoration","line","i","DecorationSet"],"mappings":";;;;AAKA,MAAMA,IA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;AAAA,oBACnD,OAAOlC,EAAckC,EAAI,IAAI;AAAA,kBAAA,CAC7B;AAAA,gBAAA;AAOH,kBAAIG,IAAO;AACX,cAAAN,EAAY;AAAA,gBACXK,EAAW,OAAOH,GAAM,MAAMhC,EAAiB,CAAC,GAAG;AAAA,kBAClD,MAAM;AAAA,kBACN,KAAK;AAAA,gBAAA,CACL;AAAA,cAAA;AAEF,uBAASqC,IAAI,GAAGA,IAAIlB,EAAK,QAAQkB,KAAK;AACrC,oBAAIlB,EAAKkB,CAAC,MAAM;AAAA,EAAM;AACtB,gBAAAD,KAAQ;AACR,sBAAMnC,IAAImC;AACV,gBAAAN,EAAY;AAAA,kBACXK,EAAW,OAAOH,IAAOK,IAAI,GAAG,MAAMrC,EAAiBC,CAAC,GAAG;AAAA,oBAC1D,MAAM;AAAA,oBACN,KAAK,MAAMA,CAAC;AAAA,kBAAA,CACZ;AAAA,gBAAA;AAAA,cAEH;AAAA,YACD,CAAC,GACMqC,EAAc,OAAOZ,EAAM,KAAKI,CAAW;AAAA,UACnD;AAAA,QAAA;AAAA,MACD,CACA;AAAA,IAAA;AAAA,EAEH;AACD,CAAC;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
const s = ({
|
|
3
|
+
size: t = 24,
|
|
4
|
+
color: o = "currentColor",
|
|
5
|
+
...C
|
|
6
|
+
}) => {
|
|
7
|
+
const l = {
|
|
8
|
+
width: t,
|
|
9
|
+
height: t,
|
|
10
|
+
color: o,
|
|
11
|
+
...C
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ e(
|
|
14
|
+
"svg",
|
|
15
|
+
{
|
|
16
|
+
viewBox: "0 0 15 15",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
...l,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ r(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
24
|
+
d: "M5.23976 6.28567C5.81834 6.28567 6.28738 5.81663 6.28738 5.23805C6.28738 4.65946 5.81834 4.19043 5.23976 4.19043C4.66117 4.19043 4.19214 4.65946 4.19214 5.23805C4.19214 5.81663 4.66117 6.28567 5.23976 6.28567Z",
|
|
25
|
+
fill: "currentColor"
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ r(
|
|
29
|
+
"path",
|
|
30
|
+
{
|
|
31
|
+
d: "M9.43043 6.28567C10.009 6.28567 10.4781 5.81663 10.4781 5.23805C10.4781 4.65946 10.009 4.19043 9.43043 4.19043C8.85185 4.19043 8.38281 4.65946 8.38281 5.23805C8.38281 5.81663 8.85185 6.28567 9.43043 6.28567Z",
|
|
32
|
+
fill: "currentColor"
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ r(
|
|
36
|
+
"path",
|
|
37
|
+
{
|
|
38
|
+
d: "M7.3348 14.6667C3.29099 14.6667 0.00146484 11.3771 0.00146484 7.33333C0.00146484 3.28952 3.29099 0 7.3348 0C11.3786 0 14.6681 3.28952 14.6681 7.33333C14.6681 11.3771 11.3786 14.6667 7.3348 14.6667ZM7.3348 1.33333C3.86718 1.33333 1.3348 3.86571 1.3348 7.33333C1.3348 10.801 3.86718 13.3333 7.3348 13.3333C10.8024 13.3333 13.3348 10.801 13.3348 7.33333C13.3348 3.86571 10.8024 1.33333 7.3348 1.33333Z",
|
|
39
|
+
fill: "currentColor"
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ r(
|
|
43
|
+
"path",
|
|
44
|
+
{
|
|
45
|
+
d: "M4.00146 9H10.6681",
|
|
46
|
+
stroke: "#616161",
|
|
47
|
+
strokeWidth: 1.33333,
|
|
48
|
+
strokeLinecap: "round"
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
s as default
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=FormkitNeutral.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormkitNeutral.js","sources":["../../../../../src/icons/Media/Visual/FormkitNeutral.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgFormkitNeutral = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 15 15\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M5.23976 6.28567C5.81834 6.28567 6.28738 5.81663 6.28738 5.23805C6.28738 4.65946 5.81834 4.19043 5.23976 4.19043C4.66117 4.19043 4.19214 4.65946 4.19214 5.23805C4.19214 5.81663 4.66117 6.28567 5.23976 6.28567Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M9.43043 6.28567C10.009 6.28567 10.4781 5.81663 10.4781 5.23805C10.4781 4.65946 10.009 4.19043 9.43043 4.19043C8.85185 4.19043 8.38281 4.65946 8.38281 5.23805C8.38281 5.81663 8.85185 6.28567 9.43043 6.28567Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M7.3348 14.6667C3.29099 14.6667 0.00146484 11.3771 0.00146484 7.33333C0.00146484 3.28952 3.29099 0 7.3348 0C11.3786 0 14.6681 3.28952 14.6681 7.33333C14.6681 11.3771 11.3786 14.6667 7.3348 14.6667ZM7.3348 1.33333C3.86718 1.33333 1.3348 3.86571 1.3348 7.33333C1.3348 10.801 3.86718 13.3333 7.3348 13.3333C10.8024 13.3333 13.3348 10.801 13.3348 7.33333C13.3348 3.86571 10.8024 1.33333 7.3348 1.33333Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M4.00146 9H10.6681\"\n\t\t\t\tstroke=\"#616161\"\n\t\t\t\tstrokeWidth={1.33333}\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgFormkitNeutral;\n"],"names":["SvgFormkitNeutral","size","color","rest","props","jsxs","jsx"],"mappings":";AAMA,MAAMA,IAAoB,CAAC;AAAA,EAC1B,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACJ,MAAa;AACZ,QAAMC,IAAQ;AAAA,IACb,OAAOH;AAAA,IACP,QAAQA;AAAA,IACR,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA;AAEJ,SACC,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACL,GAAGD;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAE;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEN,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEN,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEN,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,QAAO;AAAA,YACP,aAAa;AAAA,YACb,eAAc;AAAA,UAAA;AAAA,QAAA;AAAA,MACf;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs as t, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
const h = ({
|
|
3
|
+
size: r = 24,
|
|
4
|
+
color: l = "currentColor",
|
|
5
|
+
...i
|
|
6
|
+
}) => {
|
|
7
|
+
const o = {
|
|
8
|
+
width: r,
|
|
9
|
+
height: r,
|
|
10
|
+
color: l,
|
|
11
|
+
...i
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ t(
|
|
14
|
+
"svg",
|
|
15
|
+
{
|
|
16
|
+
viewBox: "0 0 16 16",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
...o,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ t("g", { clipPath: "url(#clip0_6886_8842)", children: [
|
|
22
|
+
/* @__PURE__ */ C(
|
|
23
|
+
"path",
|
|
24
|
+
{
|
|
25
|
+
d: "M5.90773 6.95168C6.48631 6.95168 6.95535 6.48265 6.95535 5.90406C6.95535 5.32548 6.48631 4.85645 5.90773 4.85645C5.32914 4.85645 4.86011 5.32548 4.86011 5.90406C4.86011 6.48265 5.32914 6.95168 5.90773 6.95168Z",
|
|
26
|
+
fill: "currentColor"
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ C(
|
|
30
|
+
"path",
|
|
31
|
+
{
|
|
32
|
+
d: "M10.0984 6.95168C10.677 6.95168 11.146 6.48265 11.146 5.90406C11.146 5.32548 10.677 4.85645 10.0984 4.85645C9.51982 4.85645 9.05078 5.32548 9.05078 5.90406C9.05078 6.48265 9.51982 6.95168 10.0984 6.95168Z",
|
|
33
|
+
fill: "currentColor"
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ C(
|
|
37
|
+
"path",
|
|
38
|
+
{
|
|
39
|
+
d: "M8.00277 15.3332C3.95896 15.3332 0.669434 12.0436 0.669434 7.99984C0.669434 3.95603 3.95896 0.666504 8.00277 0.666504C12.0466 0.666504 15.3361 3.95603 15.3361 7.99984C15.3361 12.0436 12.0466 15.3332 8.00277 15.3332ZM8.00277 1.99984C4.53515 1.99984 2.00277 4.53222 2.00277 7.99984C2.00277 11.4675 4.53515 13.9998 8.00277 13.9998C11.4704 13.9998 14.0028 11.4675 14.0028 7.99984C14.0028 4.53222 11.4704 1.99984 8.00277 1.99984Z",
|
|
40
|
+
fill: "currentColor"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ C(
|
|
44
|
+
"path",
|
|
45
|
+
{
|
|
46
|
+
d: "M5.62329 11.3467C5.51404 11.6611 5.16422 11.8306 4.8479 11.7109L4.84692 11.7109L4.84399 11.7109L4.84497 11.71C4.53138 11.5999 4.36268 11.2515 4.48267 10.9355L4.48169 10.9346C4.73997 10.2037 5.21864 9.57115 5.85181 9.12402C6.48507 8.6769 7.24166 8.43732 8.01685 8.43848C9.50331 8.43848 10.8485 9.32324 11.4436 10.6611L11.5549 10.9395L11.554 10.9404C11.596 11.0884 11.5811 11.2469 11.511 11.3838C11.4408 11.5208 11.3208 11.6263 11.176 11.6787C11.0314 11.7309 10.8722 11.7264 10.7307 11.666C10.5891 11.6055 10.4756 11.4934 10.4133 11.3525L10.4104 11.3467L10.4114 11.3467C10.2369 10.8511 9.91239 10.4218 9.48364 10.1182C9.05488 9.81456 8.54222 9.65137 8.01685 9.65137C7.49167 9.65142 6.97967 9.81473 6.55103 10.1182C6.12226 10.4218 5.79777 10.8511 5.62329 11.3467Z",
|
|
47
|
+
fill: "currentColor",
|
|
48
|
+
stroke: "#4B1583",
|
|
49
|
+
strokeWidth: 0.166667
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ C("defs", { children: /* @__PURE__ */ C("clipPath", { id: "clip0_6886_8842", children: /* @__PURE__ */ C("rect", { width: 16, height: 16, fill: "white" }) }) })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
h as default
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=FormkitSad.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormkitSad.js","sources":["../../../../../src/icons/Media/Visual/FormkitSad.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgFormkitSad = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 16 16\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<g clipPath=\"url(#clip0_6886_8842)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"M5.90773 6.95168C6.48631 6.95168 6.95535 6.48265 6.95535 5.90406C6.95535 5.32548 6.48631 4.85645 5.90773 4.85645C5.32914 4.85645 4.86011 5.32548 4.86011 5.90406C4.86011 6.48265 5.32914 6.95168 5.90773 6.95168Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M10.0984 6.95168C10.677 6.95168 11.146 6.48265 11.146 5.90406C11.146 5.32548 10.677 4.85645 10.0984 4.85645C9.51982 4.85645 9.05078 5.32548 9.05078 5.90406C9.05078 6.48265 9.51982 6.95168 10.0984 6.95168Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M8.00277 15.3332C3.95896 15.3332 0.669434 12.0436 0.669434 7.99984C0.669434 3.95603 3.95896 0.666504 8.00277 0.666504C12.0466 0.666504 15.3361 3.95603 15.3361 7.99984C15.3361 12.0436 12.0466 15.3332 8.00277 15.3332ZM8.00277 1.99984C4.53515 1.99984 2.00277 4.53222 2.00277 7.99984C2.00277 11.4675 4.53515 13.9998 8.00277 13.9998C11.4704 13.9998 14.0028 11.4675 14.0028 7.99984C14.0028 4.53222 11.4704 1.99984 8.00277 1.99984Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M5.62329 11.3467C5.51404 11.6611 5.16422 11.8306 4.8479 11.7109L4.84692 11.7109L4.84399 11.7109L4.84497 11.71C4.53138 11.5999 4.36268 11.2515 4.48267 10.9355L4.48169 10.9346C4.73997 10.2037 5.21864 9.57115 5.85181 9.12402C6.48507 8.6769 7.24166 8.43732 8.01685 8.43848C9.50331 8.43848 10.8485 9.32324 11.4436 10.6611L11.5549 10.9395L11.554 10.9404C11.596 11.0884 11.5811 11.2469 11.511 11.3838C11.4408 11.5208 11.3208 11.6263 11.176 11.6787C11.0314 11.7309 10.8722 11.7264 10.7307 11.666C10.5891 11.6055 10.4756 11.4934 10.4133 11.3525L10.4104 11.3467L10.4114 11.3467C10.2369 10.8511 9.91239 10.4218 9.48364 10.1182C9.05488 9.81456 8.54222 9.65137 8.01685 9.65137C7.49167 9.65142 6.97967 9.81473 6.55103 10.1182C6.12226 10.4218 5.79777 10.8511 5.62329 11.3467Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tstroke=\"#4B1583\"\n\t\t\t\t\tstrokeWidth={0.166667}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_6886_8842\">\n\t\t\t\t\t<rect width={16} height={16} fill=\"white\" />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</svg>\n\t);\n};\nexport default SvgFormkitSad;\n"],"names":["SvgFormkitSad","size","color","rest","props","jsxs","jsx"],"mappings":";AAMA,MAAMA,IAAgB,CAAC;AAAA,EACtB,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACJ,MAAa;AACZ,QAAMC,IAAQ;AAAA,IACb,OAAOH;AAAA,IACP,QAAQA;AAAA,IACR,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA;AAEJ,SACC,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACL,GAAGD;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAAC,KAAA,EAAE,UAAS,yBACX,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,cACL,QAAO;AAAA,cACP,aAAa;AAAA,YAAA;AAAA,UAAA;AAAA,QACd,GACD;AAAA,QACA,gBAAAA,EAAC,QAAA,EACA,UAAA,gBAAAA,EAAC,YAAA,EAAS,IAAG,mBACZ,UAAA,gBAAAA,EAAC,QAAA,EAAK,OAAO,IAAI,QAAQ,IAAI,MAAK,SAAQ,GAC3C,EAAA,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
@@ -5,6 +5,8 @@ export { default as Crop } from './Crop';
|
|
|
5
5
|
export { default as FlashOff } from './FlashOff';
|
|
6
6
|
export { default as FlashOn } from './FlashOn';
|
|
7
7
|
export { default as FormkitHappy } from './FormkitHappy';
|
|
8
|
+
export { default as FormkitNeutral } from './FormkitNeutral';
|
|
9
|
+
export { default as FormkitSad } from './FormkitSad';
|
|
8
10
|
export { default as IconTrailing } from './IconTrailing';
|
|
9
11
|
export { default as Image } from './Image';
|
|
10
12
|
export { default as ImageAdd } from './ImageAdd';
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
export { Send, Activate, Code, Cross, Deactivate, Delete, Edit, Forward, Fullscreen, LinkSimpleHorizontal, Minus, Plus, ProductTour, RestApi, Save, SendAirplane, ShareAndroid, Shortcut, Task } from './Actions/Common actions';
|
|
2
|
-
export { CheckboxIcon, Copy, DecreaseIndent, Dropdown, IncreaseIndent, MultiLine, MultiSelect, Number, NumberList, Quotes, Subscript, Superscript, TextBold, Text, TextAlignCenter, TextAlignLeft, TextAlignRight, TextItalics, TextJustify, TextStrikethrough, TextUnderline, Textbox } from './Actions/Formatting';
|
|
3
|
-
export { ArrowRedo, ArrowUndo, LogIn, LogOut, OpenNewWindow, Refresh, Rewind, Sync, Whatsapp } from './Actions/Navigation';
|
|
1
|
+
export { Send, Activate, Code, Cross, Deactivate, Delete, Edit, Forward, Fullscreen, LinkSimpleHorizontal, Minus, Plus, ProductTour, RestApi, Save, SendAirplane, ShareAndroid, Shortcut, Task, } from './Actions/Common actions';
|
|
2
|
+
export { CheckboxIcon, Copy, DecreaseIndent, Dropdown, IncreaseIndent, MultiLine, MultiSelect, Number, NumberList, Quotes, Subscript, Superscript, TextBold, Text, TextAlignCenter, TextAlignLeft, TextAlignRight, TextItalics, TextJustify, TextStrikethrough, TextUnderline, Textbox, } from './Actions/Formatting';
|
|
3
|
+
export { ArrowRedo, ArrowUndo, LogIn, LogOut, OpenNewWindow, Refresh, Rewind, Sync, Whatsapp, } from './Actions/Navigation';
|
|
4
4
|
export { HandleDrag, SingleChoice } from './Actions/Selection';
|
|
5
5
|
export { CaratDown, CaratLeft, CaratRight, CaratUp } from './Arrows/Carat';
|
|
6
|
-
export { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from './Arrows/Chevron';
|
|
7
|
-
export { ChevronDoubleDown, ChevronDoubleLeft, ChevronDoubleRight, ChevronDoubleUp } from './Arrows/Double chevron';
|
|
8
|
-
export { ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpLeft, ArrowUpRight } from './Arrows/Normal arrows';
|
|
6
|
+
export { ChevronDown, ChevronLeft, ChevronRight, ChevronUp, } from './Arrows/Chevron';
|
|
7
|
+
export { ChevronDoubleDown, ChevronDoubleLeft, ChevronDoubleRight, ChevronDoubleUp, } from './Arrows/Double chevron';
|
|
8
|
+
export { ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpLeft, ArrowUpRight, } from './Arrows/Normal arrows';
|
|
9
9
|
export { ArrowSwitch } from './Arrows/Special';
|
|
10
|
-
export { AiIcon, Webhook, AiEmoji, AiRobot, Expand, Frame27389, Frame27597, Frame27598, Frame27599, GeminiSparkle, ManifestSparkle, PricePlease, Shape, Shorter, Sparkling2Line, WandSparkles, Write } from './BIK AI specific';
|
|
11
|
-
export { Bell, BellSync, Bulb, Forms, MenuHamburger, MessageSearch, MoreHorizontal, MoreVertical, Placeholder, Search, Settings, Training } from './Informational/Common UI';
|
|
12
|
-
export { Chat, ChatCheck, ChatQuestion, ChatStar, Email, LiveChat, Phone } from './Informational/Communication';
|
|
13
|
-
export { ClipboardCheck, Experimental, Help, Percent, Purchase, Services, ShoppingCart, Unsatisfactory, UserSound } from './Informational/Customer intent';
|
|
10
|
+
export { AiIcon, Webhook, AiEmoji, AiRobot, Expand, Frame27389, Frame27597, Frame27598, Frame27599, GeminiSparkle, ManifestSparkle, PricePlease, Shape, Shorter, Sparkling2Line, WandSparkles, Write, } from './BIK AI specific';
|
|
11
|
+
export { Bell, BellSync, Bulb, Forms, MenuHamburger, MessageSearch, MoreHorizontal, MoreVertical, Placeholder, Search, Settings, Training, } from './Informational/Common UI';
|
|
12
|
+
export { Chat, ChatCheck, ChatQuestion, ChatStar, Email, LiveChat, Phone, } from './Informational/Communication';
|
|
13
|
+
export { ClipboardCheck, Experimental, Help, Percent, Purchase, Services, ShoppingCart, Unsatisfactory, UserSound, } from './Informational/Customer intent';
|
|
14
14
|
export { SingleChoice as SingleChoice2 } from './Informational/Customer intent';
|
|
15
|
-
export { CalendarCheck, Calendar, CalendarAdd, Clock, HourGlass, WorkingHours } from './Informational/Date and time';
|
|
16
|
-
export { AddLabel, Click, Filter, Gift1, GiftMinus, GiftPlus, Promocode, Receipt, ShieldCheck, ShoppingBag, ShoppingBasket } from './Informational/eCommerce';
|
|
15
|
+
export { CalendarCheck, Calendar, CalendarAdd, Clock, HourGlass, WorkingHours, } from './Informational/Date and time';
|
|
16
|
+
export { AddLabel, Click, Filter, Gift1, GiftMinus, GiftPlus, Promocode, Receipt, ShieldCheck, ShoppingBag, ShoppingBasket, } from './Informational/eCommerce';
|
|
17
17
|
export { ShoppingCart as ShoppingCart2 } from './Informational/eCommerce';
|
|
18
|
-
export { Archive1, Excel, File, FileCsv, FilePage, FilePdf, Folder, MediaMessage, Move, OrderHistory, PrivateNote, TextMessage, Unarchive } from './Informational/Files and folders';
|
|
19
|
-
export { Bank, CashOnDelivery, ChartLine, CreditCard, Growth, Money1, NoCredits, Rupee, TablerTicket, Wallet } from './Informational/Finance';
|
|
18
|
+
export { Archive1, Excel, File, FileCsv, FilePage, FilePdf, Folder, MediaMessage, Move, OrderHistory, PrivateNote, TextMessage, Unarchive, } from './Informational/Files and folders';
|
|
19
|
+
export { Bank, CashOnDelivery, ChartLine, CreditCard, Growth, Money1, NoCredits, Rupee, TablerTicket, Wallet, } from './Informational/Finance';
|
|
20
20
|
export { Percent as Percent2 } from './Informational/Finance';
|
|
21
|
-
export { BookOpenText, TicketV2, AlertTriangle, Check, CheckDouble, CloseTicket1, Error, FailDoc, HourglassFilled, IcList, Info, Merge, NewTicket, RoundCheck, Slash } from './Informational/General';
|
|
21
|
+
export { BookOpenText, TicketV2, AlertTriangle, Check, CheckDouble, CloseTicket1, Error, FailDoc, HourglassFilled, IcList, Info, Merge, NewTicket, RoundCheck, Slash, } from './Informational/General';
|
|
22
22
|
export { Help as Help2 } from './Informational/General';
|
|
23
|
-
export { User, Chatbot, Contacts, Group, IdCard, Person, Robot, Union, Union1, UserMinus1, UserPlus } from './Informational/Identity';
|
|
24
|
-
export { Address, LanguageChange, MapPin, Truck } from './Informational/Location';
|
|
25
|
-
export { AllProduct, Clipboard, CustomerReport, Head112, InventoryReport, LegalBalance, OrderReport, PaymentReport, Store, StoreSync, TicketForm } from './Informational/Store related';
|
|
23
|
+
export { User, Chatbot, Contacts, Group, IdCard, Person, Robot, Union, Union1, UserMinus1, UserPlus, } from './Informational/Identity';
|
|
24
|
+
export { Address, LanguageChange, MapPin, Truck, } from './Informational/Location';
|
|
25
|
+
export { AllProduct, Clipboard, CustomerReport, Head112, InventoryReport, LegalBalance, OrderReport, PaymentReport, Store, StoreSync, TicketForm, } from './Informational/Store related';
|
|
26
26
|
export { ClipboardCheck as ClipboardCheck2 } from './Informational/Store related';
|
|
27
27
|
export { Box, Box2 } from './Legacy - Bikayi specific/Categories';
|
|
28
28
|
export { Journeys } from './Legacy - Bikayi specific/Navigation';
|
|
29
29
|
export { Services as Services2 } from './Legacy - Bikayi specific/Navigation';
|
|
30
30
|
export { PlanUltimate } from './Legacy - Bikayi specific/Plans';
|
|
31
|
-
export { Businesscard, Customdomain, LoudSpeaker, Marketing, PaymentLink, Theme } from './Legacy - Bikayi specific/Services';
|
|
32
|
-
export { Microphone, Pause, Play, Sleep, VolumeMute, VolumeOneline, VolumeTwoline } from './Media/Audio';
|
|
31
|
+
export { Businesscard, Customdomain, LoudSpeaker, Marketing, PaymentLink, Theme, } from './Legacy - Bikayi specific/Services';
|
|
32
|
+
export { Microphone, Pause, Play, Sleep, VolumeMute, VolumeOneline, VolumeTwoline, } from './Media/Audio';
|
|
33
33
|
export { Desktop, Smartphone } from './Media/Devices';
|
|
34
|
-
export { BarcodeScan, Download, EmojiSmile, Paperclip, Upload } from './Media/Others';
|
|
35
|
-
export { Frame26086263, Camera, CameraAdd, Crop, FlashOff, FlashOn, FormkitHappy, IconTrailing, Image, ImageAdd, Images, Maximize, RotateAnticlockwise, RotateClockwise, VideoCamcorder, VideoFilm } from './Media/Visual';
|
|
36
|
-
export { EmailMarketingV2, EmailV2, FacebookCommentV2, FacebookV2, GmailV2, InstagramCommentV2, InstagramV2, MessengerV2, PhoneV2, RcsV2, SmsV2, TaskV2, WebpushV2, WhatsAppCallV2, WhatsAppV2, Bigcommerce, EmailMarketing, Facebook, FacebookComment, Instagram, InstagramIcon, Messenger, MonoFacebookComment, MonoFacebook, MonoInstagram, MonoInstagramComment, MonoMail, MonoMessenger, MonoPhone, MonoTasks, MonoWhatsapp, ShopifyBrand, Tasks, WebPush, WhatsApp } from './Social/Channels';
|
|
34
|
+
export { BarcodeScan, Download, EmojiSmile, Paperclip, Upload, } from './Media/Others';
|
|
35
|
+
export { Frame26086263, Camera, CameraAdd, Crop, FlashOff, FlashOn, FormkitHappy, FormkitNeutral, FormkitSad, IconTrailing, Image, ImageAdd, Images, Maximize, RotateAnticlockwise, RotateClockwise, VideoCamcorder, VideoFilm, } from './Media/Visual';
|
|
36
|
+
export { EmailMarketingV2, EmailV2, FacebookCommentV2, FacebookV2, GmailV2, InstagramCommentV2, InstagramV2, MessengerV2, PhoneV2, RcsV2, SmsV2, TaskV2, WebpushV2, WhatsAppCallV2, WhatsAppV2, Bigcommerce, EmailMarketing, Facebook, FacebookComment, Instagram, InstagramIcon, Messenger, MonoFacebookComment, MonoFacebook, MonoInstagram, MonoInstagramComment, MonoMail, MonoMessenger, MonoPhone, MonoTasks, MonoWhatsapp, ShopifyBrand, Tasks, WebPush, WhatsApp, } from './Social/Channels';
|
|
37
37
|
export { Email as Email2 } from './Social/Channels';
|
|
38
|
-
export { SlackIcon, BigCommerce, Google, Gorgias, Kustomer, Rcs, ShopifyDefault, Twitter, Website, WooCommerce, Youtube, Zendesk } from './Social/Social';
|
|
38
|
+
export { SlackIcon, BigCommerce, Google, Gorgias, Kustomer, Rcs, ShopifyDefault, Twitter, Website, WooCommerce, Youtube, Zendesk, } from './Social/Social';
|
|
39
39
|
export { EmailMarketing as EmailMarketing2 } from './Social/Social';
|
|
40
40
|
export { Facebook as Facebook2 } from './Social/Social';
|
|
41
41
|
export { Instagram as Instagram2 } from './Social/Social';
|
|
42
42
|
export { Messenger as Messenger2 } from './Social/Social';
|
|
43
43
|
export { Whatsapp as Whatsapp2 } from './Social/Social';
|
|
44
|
-
export { Eye, EyeClosed, EyeOff, HeartEmpty, HeartFilled, Lock, StarEmpty, StarFilled, StarHalf, Unlock } from './Toggles/General';
|
|
44
|
+
export { Eye, EyeClosed, EyeOff, HeartEmpty, HeartFilled, Lock, StarEmpty, StarFilled, StarHalf, Unlock, } from './Toggles/General';
|