@bikdotai/bik-component-library 0.0.867-beta.0 → 0.0.867

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 (48) hide show
  1. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +4 -4
  2. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  3. package/dist/cjs/components/button/Button.js +1 -1
  4. package/dist/cjs/components/button/Button.js.map +1 -1
  5. package/dist/cjs/components/button/Button.styled.js +2 -2
  6. package/dist/cjs/components/button/Button.styled.js.map +1 -1
  7. package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
  8. package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
  9. package/dist/cjs/components/tag/Tag.js +1 -1
  10. package/dist/cjs/components/tag/Tag.js.map +1 -1
  11. package/dist/cjs/components/tag/Tag.styled.js +4 -4
  12. package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
  13. package/dist/cjs/components/tag/model.js.map +1 -1
  14. package/dist/cjs/editor/extensions/buildExtensions.js +2 -2
  15. package/dist/cjs/editor/extensions/buildExtensions.js.map +1 -1
  16. package/dist/cjs/icons/BIK AI specific/WandSparkles.js +1 -1
  17. package/dist/cjs/icons/BIK AI specific/WandSparkles.js.map +1 -1
  18. package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +3 -1
  19. package/dist/esm/components/agent-builder/utils/mentionSerialization.js +31 -23
  20. package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  21. package/dist/esm/components/button/Button.js +19 -21
  22. package/dist/esm/components/button/Button.js.map +1 -1
  23. package/dist/esm/components/button/Button.styled.d.ts +0 -1
  24. package/dist/esm/components/button/Button.styled.js +5 -5
  25. package/dist/esm/components/button/Button.styled.js.map +1 -1
  26. package/dist/esm/components/button/model.d.ts +0 -5
  27. package/dist/esm/components/dropdown-button/DropdownButton.d.ts +0 -5
  28. package/dist/esm/components/dropdown-button/DropdownButton.js +3 -4
  29. package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
  30. package/dist/esm/components/tag/Tag.d.ts +1 -1
  31. package/dist/esm/components/tag/Tag.js +41 -48
  32. package/dist/esm/components/tag/Tag.js.map +1 -1
  33. package/dist/esm/components/tag/Tag.styled.d.ts +0 -3
  34. package/dist/esm/components/tag/Tag.styled.js +9 -6
  35. package/dist/esm/components/tag/Tag.styled.js.map +1 -1
  36. package/dist/esm/components/tag/model.d.ts +0 -11
  37. package/dist/esm/components/tag/model.js.map +1 -1
  38. package/dist/esm/editor/extensions/buildExtensions.d.ts +1 -1
  39. package/dist/esm/editor/extensions/buildExtensions.js +43 -49
  40. package/dist/esm/editor/extensions/buildExtensions.js.map +1 -1
  41. package/dist/esm/icons/BIK AI specific/WandSparkles.js +1 -1
  42. package/dist/esm/icons/BIK AI specific/WandSparkles.js.map +1 -1
  43. package/package.json +1 -2
  44. package/dist/cjs/editor/extensions/emailLayout/EmailLayoutExtensions.js +0 -2
  45. package/dist/cjs/editor/extensions/emailLayout/EmailLayoutExtensions.js.map +0 -1
  46. package/dist/esm/editor/extensions/emailLayout/EmailLayoutExtensions.d.ts +0 -19
  47. package/dist/esm/editor/extensions/emailLayout/EmailLayoutExtensions.js +0 -110
  48. package/dist/esm/editor/extensions/emailLayout/EmailLayoutExtensions.js.map +0 -1
@@ -1,32 +1,31 @@
1
1
  import s from "@tiptap/extension-character-count";
2
2
  import i from "@tiptap/extension-color";
3
- import k from "@tiptap/extension-font-family";
4
- import M from "@tiptap/extension-hard-break";
5
- import E from "@tiptap/extension-highlight";
3
+ import S from "@tiptap/extension-font-family";
4
+ import k from "@tiptap/extension-hard-break";
5
+ import M from "@tiptap/extension-highlight";
6
6
  import b from "@tiptap/extension-image";
7
7
  import C from "@tiptap/extension-link";
8
- import y from "../../node_modules/@tiptap/extension-paragraph/dist/index.js";
8
+ import E from "../../node_modules/@tiptap/extension-paragraph/dist/index.js";
9
9
  import l from "@tiptap/extension-placeholder";
10
- import L from "@tiptap/extension-subscript";
10
+ import y from "@tiptap/extension-subscript";
11
11
  import T from "@tiptap/extension-superscript";
12
- import P from "@tiptap/extension-text-align";
13
- import { TextStyle as H } from "@tiptap/extension-text-style";
14
- import w from "@tiptap/extension-underline";
12
+ import L from "@tiptap/extension-text-align";
13
+ import { TextStyle as P } from "@tiptap/extension-text-style";
14
+ import H from "@tiptap/extension-underline";
15
15
  import m from "@tiptap/starter-kit";
16
- import { isAllowedLinkUrl as A } from "../../helpers/sanitize.js";
17
- import { CharacterLimitExtension as D } from "./characterLimit/CharacterLimitExtension.js";
18
- import { buildEmailLayoutExtensions as I } from "./emailLayout/EmailLayoutExtensions.js";
19
- import { FontSizeExtension as g } from "./FontSizeExtension.js";
20
- import { HtmlTagStripExtension as B } from "./htmlTagStrip/HtmlTagStripExtension.js";
21
- import { JsonHighlightExtension as O } from "./jsonHighlight/JsonHighlightExtension.js";
22
- import { buildAgentMentionExtension as R, buildTeamMentionExtension as z } from "./mention/MentionExtension.js";
23
- import { PasteExtension as F } from "./paste/PasteExtension.js";
24
- import { PasteNormalizationExtension as U } from "./plainClipboard/PasteNormalizationExtension.js";
25
- import { SectionDividerNode as K } from "./sectionDivider/SectionDividerNode.js";
16
+ import { isAllowedLinkUrl as w } from "../../helpers/sanitize.js";
17
+ import { CharacterLimitExtension as A } from "./characterLimit/CharacterLimitExtension.js";
18
+ import { FontSizeExtension as D } from "./FontSizeExtension.js";
19
+ import { HtmlTagStripExtension as I } from "./htmlTagStrip/HtmlTagStripExtension.js";
20
+ import { JsonHighlightExtension as g } from "./jsonHighlight/JsonHighlightExtension.js";
21
+ import { buildAgentMentionExtension as B, buildTeamMentionExtension as O } from "./mention/MentionExtension.js";
22
+ import { PasteExtension as R } from "./paste/PasteExtension.js";
23
+ import { PasteNormalizationExtension as z } from "./plainClipboard/PasteNormalizationExtension.js";
24
+ import { SectionDividerNode as F } from "./sectionDivider/SectionDividerNode.js";
26
25
  import { SendShortcutExtension as d } from "./sendShortcut/SendShortcutExtension.js";
27
- import { buildSlashCommandExtension as N } from "./slashCommand/SlashCommandExtension.js";
28
- import { VariableDecorationExtension as j } from "./variable/VariableDecorationExtension.js";
29
- function xe(e) {
26
+ import { buildSlashCommandExtension as U } from "./slashCommand/SlashCommandExtension.js";
27
+ import { VariableDecorationExtension as K } from "./variable/VariableDecorationExtension.js";
28
+ function he(e) {
30
29
  if (e.features?.jsonMode)
31
30
  return [
32
31
  m.configure({
@@ -49,7 +48,7 @@ function xe(e) {
49
48
 
50
49
  }`
51
50
  }),
52
- O,
51
+ g,
53
52
  d.configure({
54
53
  onSend: e.onSend,
55
54
  sendShortcut: e.sendShortcut,
@@ -57,13 +56,13 @@ function xe(e) {
57
56
  }),
58
57
  ...e.maxCharacters ? [s.configure({ limit: e.maxCharacters })] : []
59
58
  ];
60
- const o = e.features?.richPaste ?? !1, p = e.features?.richTypography ?? !1, n = e.features?.allowedMarks, t = (r) => !n || n.includes(r), u = M.extend({
59
+ const o = e.features?.richPaste ?? !1, p = e.features?.richTypography ?? !1, n = e.features?.allowedMarks, t = (r) => !n || n.includes(r), u = k.extend({
61
60
  addKeyboardShortcuts() {
62
61
  return {
63
62
  "Shift-Enter": () => this.editor.commands.setHardBreak()
64
63
  };
65
64
  }
66
- }), a = (r) => r === "0" || r === "0px" || r === "0pt" || r === "0em", h = y.extend({
65
+ }), a = (r) => r === "0" || r === "0px" || r === "0pt" || r === "0em", h = E.extend({
67
66
  addAttributes() {
68
67
  return {
69
68
  ...this.parent?.() ?? {},
@@ -90,7 +89,7 @@ function xe(e) {
90
89
  }),
91
90
  h,
92
91
  u,
93
- ...t("underline") ? [w] : [],
92
+ ...t("underline") ? [H] : [],
94
93
  // Extend Link to strip addPasteRules() and addInputRules() so pasting a
95
94
  // URL never creates a hyperlink regardless of autolink/linkOnPaste values.
96
95
  C.extend({
@@ -102,21 +101,21 @@ function xe(e) {
102
101
  linkOnPaste: !1,
103
102
  // Block javascript:/data:/vbscript: hrefs. TipTap keeps the href
104
103
  // attribute verbatim, so scheme validation must live here.
105
- isAllowedUri: (r) => A(r),
104
+ isAllowedUri: (r) => w(r),
106
105
  HTMLAttributes: {
107
106
  rel: "noopener noreferrer",
108
107
  class: "bik-link"
109
108
  }
110
109
  }),
111
- H,
110
+ P,
112
111
  l.configure({
113
112
  placeholder: e.placeholder ?? "Type a message..."
114
113
  }),
115
114
  // Consumer paste callback runs first. If it returns true the event is
116
115
  // consumed and neither PlainClipboardExtension nor the editor's default
117
116
  // paste handling will run for that event.
118
- ...e.onPaste ? [F.configure({ onPaste: e.onPaste })] : [],
119
- U.configure({
117
+ ...e.onPaste ? [R.configure({ onPaste: e.onPaste })] : [],
118
+ z.configure({
120
119
  preserveMarks: o,
121
120
  // Only email + signature (richPaste) keep the rich HTML paste pipeline.
122
121
  // Every other channel (WhatsApp, IG, FB, comments) forces plain-text
@@ -128,15 +127,15 @@ function xe(e) {
128
127
  sendShortcut: e.sendShortcut,
129
128
  extraShortcuts: e.shortcuts ?? []
130
129
  }),
131
- j,
130
+ K,
132
131
  // Strip HTML tags from typed text.
133
132
  // Non-email (WhatsApp, IG, private note): strip ALL tags.
134
133
  // Email (richPaste): strip only dangerous tags (script, iframe, form, etc.)
135
134
  // while preserving legitimate email tags (h1, table, div, etc.).
136
- B.configure({ stripAll: !o }),
135
+ I.configure({ stripAll: !o }),
137
136
  ...e.maxCharacters ? [s.configure({ limit: e.maxCharacters })] : [],
138
137
  ...e.characterLimit ? [
139
- D.configure({
138
+ A.configure({
140
139
  limit: e.characterLimit,
141
140
  hard: e.characterLimitHard
142
141
  })
@@ -145,10 +144,10 @@ function xe(e) {
145
144
  // node is part of the schema in every editor instance. This means imperative
146
145
  // callers (setBodyAndSections / setSectionContent) work even when no
147
146
  // `sections` prop was provided at mount time.
148
- K
147
+ F
149
148
  ], f = [
150
149
  ...e.mentions?.agents ? [
151
- R(
150
+ B(
152
151
  e.mentions.agents,
153
152
  e.onMentionSelected,
154
153
  e.renderMentionItem,
@@ -158,7 +157,7 @@ function xe(e) {
158
157
  )
159
158
  ] : [],
160
159
  ...e.mentions?.teams ? [
161
- z(
160
+ O(
162
161
  e.mentions.teams,
163
162
  e.onMentionSelected,
164
163
  e.renderMentionItem,
@@ -167,7 +166,7 @@ function xe(e) {
167
166
  )
168
167
  ] : [],
169
168
  ...e.slashCommands ? [
170
- N(
169
+ U(
171
170
  e.slashCommands,
172
171
  e.onSlashCommandSelected,
173
172
  e.renderSlashCommandItem,
@@ -176,22 +175,17 @@ function xe(e) {
176
175
  ] : []
177
176
  ], x = p ? [
178
177
  i,
179
- E.configure({ multicolor: !0 }),
180
- k,
181
- g,
182
- P.configure({ types: ["heading", "paragraph"] }),
183
- L,
178
+ M.configure({ multicolor: !0 }),
179
+ S,
180
+ D,
181
+ L.configure({ types: ["heading", "paragraph"] }),
182
+ y,
184
183
  T,
185
184
  b
186
- ] : [i], S = o ? I() : [];
187
- return [
188
- ...c,
189
- ...f,
190
- ...x,
191
- ...S
192
- ];
185
+ ] : [i];
186
+ return [...c, ...f, ...x];
193
187
  }
194
188
  export {
195
- xe as buildExtensions
189
+ he as buildExtensions
196
190
  };
197
191
  //# sourceMappingURL=buildExtensions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildExtensions.js","sources":["../../../../src/editor/extensions/buildExtensions.ts"],"sourcesContent":["import CharacterCount from '@tiptap/extension-character-count';\nimport Color from '@tiptap/extension-color';\nimport FontFamily from '@tiptap/extension-font-family';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Highlight from '@tiptap/extension-highlight';\nimport Image from '@tiptap/extension-image';\nimport Link from '@tiptap/extension-link';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Subscript from '@tiptap/extension-subscript';\nimport Superscript from '@tiptap/extension-superscript';\nimport TextAlign from '@tiptap/extension-text-align';\nimport { TextStyle } from '@tiptap/extension-text-style';\nimport Underline from '@tiptap/extension-underline';\nimport StarterKit from '@tiptap/starter-kit';\nimport type { ReactNode } from 'react';\nimport { isAllowedLinkUrl } from '../../helpers/sanitize';\nimport type {\n\tEditorFeatures,\n\tEditorSnapshot,\n\tKeyboardShortcut,\n\tMentionDropdownRenderProps,\n\tMentionItem,\n\tPasteData,\n\tSlashCommandDropdownRenderProps,\n\tSlashCommandItem,\n} from '../BikEditor.types';\nimport { CharacterLimitExtension } from './characterLimit/CharacterLimitExtension';\nimport { buildEmailLayoutExtensions } from './emailLayout/EmailLayoutExtensions';\nimport { FontSizeExtension } from './FontSizeExtension';\nimport { HtmlTagStripExtension } from './htmlTagStrip/HtmlTagStripExtension';\nimport { JsonHighlightExtension } from './jsonHighlight/JsonHighlightExtension';\nimport {\n\tbuildAgentMentionExtension,\n\tbuildTeamMentionExtension,\n} from './mention/MentionExtension';\nimport { PasteExtension } from './paste/PasteExtension';\nimport { PasteNormalizationExtension } from './plainClipboard/PasteNormalizationExtension';\nimport { SectionDividerNode } from './sectionDivider/SectionDividerNode';\nimport { SendShortcutExtension } from './sendShortcut/SendShortcutExtension';\nimport { buildSlashCommandExtension } from './slashCommand/SlashCommandExtension';\nimport { VariableDecorationExtension } from './variable/VariableDecorationExtension';\n\ninterface ExtensionConfig {\n\tfeatures?: EditorFeatures;\n\tplaceholder?: string;\n\tmaxCharacters?: number;\n\t/**\n\t * Soft character limit. Unlike `maxCharacters` (which hard-blocks all input),\n\t * this blocks typing past the limit but ALLOWS paste to overflow, rendering\n\t * the excess characters greyed (`.bik-editor-overflow`). Purely visual +\n\t * typing-guard; the consumer shows the count/error and gates send itself.\n\t */\n\tcharacterLimit?: number;\n\t/**\n\t * Upgrade {@link characterLimit} to a HARD cap: no edit (typing, Enter, paste,\n\t * drop) may grow the content past the limit, while content loaded over the limit\n\t * is preserved and can only shrink. Keeps the same metric as the shown count.\n\t */\n\tcharacterLimitHard?: boolean;\n\thasSections?: boolean;\n\tmentions?: {\n\t\tagents?: { current: MentionItem[] };\n\t\tteams?: { current: MentionItem[] };\n\t};\n\tslashCommands?: { current: SlashCommandItem[] };\n\tonPaste?: (data: PasteData) => boolean | void;\n\tonSend?: (content: EditorSnapshot) => void;\n\tsendShortcut?:\n\t\t| { key: string; modifiers?: Array<'mod' | 'ctrl' | 'shift' | 'alt'> }\n\t\t| Array<{\n\t\t\t\tkey: string;\n\t\t\t\tmodifiers?: Array<'mod' | 'ctrl' | 'shift' | 'alt'>;\n\t\t }>;\n\tshortcuts?: KeyboardShortcut[];\n\tonMentionSelected?: (item: MentionItem, char: '@' | '#') => void;\n\tonSlashCommandSelected?: (command: SlashCommandItem) => void;\n\trenderMentionItem?: (item: MentionItem, isActive: boolean) => ReactNode;\n\trenderMentionDropdown?: (props: MentionDropdownRenderProps) => ReactNode;\n\tremoveMentionTriggerOnDismiss?: boolean;\n\trenderMentionChipIcon?: (\n\t\tsource: string | null,\n\t\tkind: string | null,\n\t) => ReactNode;\n\trenderSlashCommandItem?: (\n\t\titem: SlashCommandItem,\n\t\tisActive: boolean,\n\t) => ReactNode;\n\trenderSlashCommandDropdown?: (\n\t\tprops: SlashCommandDropdownRenderProps,\n\t) => ReactNode;\n}\n\nexport function buildExtensions(config: ExtensionConfig) {\n\t// JSON body mode is a dedicated code editor — it deliberately skips the rich\n\t// text stack (mentions, typography, rich paste, sections) and turns the whole\n\t// document into one syntax-highlighted JSON code block, Postman-style.\n\tif (config.features?.jsonMode) {\n\t\treturn [\n\t\t\tStarterKit.configure({\n\t\t\t\tlink: false,\n\t\t\t\tunderline: false,\n\t\t\t\t// Keep codeBlock (the JSON container) and history; drop everything\n\t\t\t\t// that has no meaning inside raw JSON.\n\t\t\t\tbold: false,\n\t\t\t\titalic: false,\n\t\t\t\tstrike: false,\n\t\t\t\tcode: false,\n\t\t\t\theading: false,\n\t\t\t\tbulletList: false,\n\t\t\t\torderedList: false,\n\t\t\t\tblockquote: false,\n\t\t\t\thorizontalRule: false,\n\t\t\t}),\n\t\t\tPlaceholder.configure({\n\t\t\t\tplaceholder: config.placeholder ?? '{\\n \\n}',\n\t\t\t}),\n\t\t\tJsonHighlightExtension,\n\t\t\tSendShortcutExtension.configure({\n\t\t\t\tonSend: config.onSend,\n\t\t\t\tsendShortcut: config.sendShortcut,\n\t\t\t\textraShortcuts: config.shortcuts ?? [],\n\t\t\t}),\n\t\t\t...(config.maxCharacters\n\t\t\t\t? [CharacterCount.configure({ limit: config.maxCharacters })]\n\t\t\t\t: []),\n\t\t];\n\t}\n\n\tconst hasRichPaste = config.features?.richPaste ?? false;\n\tconst hasRichTypography = config.features?.richTypography ?? false;\n\n\t// When allowedMarks is specified only those marks are registered in the schema.\n\t// This disables rendering, keyboard shortcuts AND paste-preservation for the\n\t// excluded marks — all three come for free when the extension is absent.\n\tconst allowedMarks = config.features?.allowedMarks;\n\tconst isMark = (m: 'bold' | 'italic' | 'strike' | 'underline' | 'code') =>\n\t\t!allowedMarks || allowedMarks.includes(m);\n\n\t// Soft line break. Shift-Enter inserts a <br> inside the current block\n\t// (matches Gmail); plain Enter still splits the block into a new paragraph\n\t// via StarterKit's default. HardBreak is registered standalone — like Link\n\t// and Underline above — instead of through StarterKit, so we can bind ONLY\n\t// Shift-Enter here and leave Mod-Enter free for the send shortcut.\n\tconst softBreak = HardBreak.extend({\n\t\taddKeyboardShortcuts() {\n\t\t\treturn {\n\t\t\t\t'Shift-Enter': () => this.editor.commands.setHardBreak(),\n\t\t\t};\n\t\t},\n\t});\n\n\t// Paragraph that preserves a zero block-margin from the source (Gmail-style).\n\t// Most sources (ChatGPT, typed text) use plain <p> → no margin attr → the\n\t// editor/viewer default 1em margin provides the gap. Google-Docs-style\n\t// content uses margin:0 paragraphs and a separate blank-line paragraph for\n\t// spacing; we keep that margin:0 so the blank line — not stacked margins —\n\t// provides a single-line gap, exactly like Gmail. The paste pipeline also\n\t// sets margin:'0' on every paragraph when a paste contains blank-line\n\t// paragraphs (see applyParagraphSpacing), so spacing comes from EITHER the\n\t// margin OR the blank line, never both (no double gap).\n\tconst isZeroLen = (v: string) =>\n\t\tv === '0' || v === '0px' || v === '0pt' || v === '0em';\n\tconst ParagraphWithMargin = Paragraph.extend({\n\t\taddAttributes() {\n\t\t\treturn {\n\t\t\t\t...(this.parent?.() ?? {}),\n\t\t\t\tmargin: {\n\t\t\t\t\tdefault: null,\n\t\t\t\t\tparseHTML: (el: HTMLElement) =>\n\t\t\t\t\t\tisZeroLen(el.style.marginTop) && isZeroLen(el.style.marginBottom)\n\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\trenderHTML: (attrs: { margin?: string | null }) =>\n\t\t\t\t\t\tattrs.margin === '0' ? { style: 'margin: 0px' } : {},\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t});\n\n\tconst base = [\n\t\t// Exclude Link and Underline from StarterKit — TipTap v3 bundles both.\n\t\t// Without this, two copies of each are registered and the StarterKit copy's\n\t\t// click handler calls window.open even when openOnClick: false is set.\n\t\tStarterKit.configure({\n\t\t\tlink: false,\n\t\t\tunderline: false,\n\t\t\thardBreak: false,\n\t\t\tparagraph: false,\n\t\t\tbold: isMark('bold') ? {} : false,\n\t\t\titalic: isMark('italic') ? {} : false,\n\t\t\tstrike: isMark('strike') ? {} : false,\n\t\t\tcode: isMark('code') ? {} : false,\n\t\t}),\n\t\tParagraphWithMargin,\n\t\tsoftBreak,\n\t\t...(isMark('underline') ? [Underline] : []),\n\t\t// Extend Link to strip addPasteRules() and addInputRules() so pasting a\n\t\t// URL never creates a hyperlink regardless of autolink/linkOnPaste values.\n\t\tLink.extend({\n\t\t\taddPasteRules: () => [],\n\t\t\taddInputRules: () => [],\n\t\t}).configure({\n\t\t\topenOnClick: false,\n\t\t\tautolink: false,\n\t\t\tlinkOnPaste: false,\n\t\t\t// Block javascript:/data:/vbscript: hrefs. TipTap keeps the href\n\t\t\t// attribute verbatim, so scheme validation must live here.\n\t\t\tisAllowedUri: (url) => isAllowedLinkUrl(url),\n\t\t\tHTMLAttributes: {\n\t\t\t\trel: 'noopener noreferrer',\n\t\t\t\tclass: 'bik-link',\n\t\t\t},\n\t\t}),\n\t\tTextStyle,\n\t\tPlaceholder.configure({\n\t\t\tplaceholder: config.placeholder ?? 'Type a message...',\n\t\t}),\n\t\t// Consumer paste callback runs first. If it returns true the event is\n\t\t// consumed and neither PlainClipboardExtension nor the editor's default\n\t\t// paste handling will run for that event.\n\t\t...(config.onPaste\n\t\t\t? [PasteExtension.configure({ onPaste: config.onPaste })]\n\t\t\t: []),\n\t\tPasteNormalizationExtension.configure({\n\t\t\tpreserveMarks: hasRichPaste,\n\t\t\t// Only email + signature (richPaste) keep the rich HTML paste pipeline.\n\t\t\t// Every other channel (WhatsApp, IG, FB, comments) forces plain-text\n\t\t\t// paste for BOTH Cmd/Ctrl+V and Cmd/Ctrl+Shift+V — no formatting.\n\t\t\tplainOnly: !hasRichPaste,\n\t\t}),\n\t\tSendShortcutExtension.configure({\n\t\t\tonSend: config.onSend,\n\t\t\tsendShortcut: config.sendShortcut,\n\t\t\textraShortcuts: config.shortcuts ?? [],\n\t\t}),\n\t\tVariableDecorationExtension,\n\t\t// Strip HTML tags from typed text.\n\t\t// Non-email (WhatsApp, IG, private note): strip ALL tags.\n\t\t// Email (richPaste): strip only dangerous tags (script, iframe, form, etc.)\n\t\t// while preserving legitimate email tags (h1, table, div, etc.).\n\t\tHtmlTagStripExtension.configure({ stripAll: !hasRichPaste }),\n\t\t...(config.maxCharacters\n\t\t\t? [CharacterCount.configure({ limit: config.maxCharacters })]\n\t\t\t: []),\n\t\t...(config.characterLimit\n\t\t\t? [\n\t\t\t\t\tCharacterLimitExtension.configure({\n\t\t\t\t\t\tlimit: config.characterLimit,\n\t\t\t\t\t\thard: config.characterLimitHard,\n\t\t\t\t\t}),\n\t\t\t ]\n\t\t\t: []),\n\t\t// Always register SectionDividerNode so the custom <div data-section-divider>\n\t\t// node is part of the schema in every editor instance. This means imperative\n\t\t// callers (setBodyAndSections / setSectionContent) work even when no\n\t\t// `sections` prop was provided at mount time.\n\t\tSectionDividerNode,\n\t];\n\n\tconst mentionExtensions = [\n\t\t...(config.mentions?.agents\n\t\t\t? [\n\t\t\t\t\tbuildAgentMentionExtension(\n\t\t\t\t\t\tconfig.mentions.agents,\n\t\t\t\t\t\tconfig.onMentionSelected,\n\t\t\t\t\t\tconfig.renderMentionItem,\n\t\t\t\t\t\tconfig.renderMentionDropdown,\n\t\t\t\t\t\tconfig.removeMentionTriggerOnDismiss,\n\t\t\t\t\t\tconfig.renderMentionChipIcon,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t\t...(config.mentions?.teams\n\t\t\t? [\n\t\t\t\t\tbuildTeamMentionExtension(\n\t\t\t\t\t\tconfig.mentions.teams,\n\t\t\t\t\t\tconfig.onMentionSelected,\n\t\t\t\t\t\tconfig.renderMentionItem,\n\t\t\t\t\t\tconfig.renderMentionDropdown,\n\t\t\t\t\t\tconfig.removeMentionTriggerOnDismiss,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t\t...(config.slashCommands\n\t\t\t? [\n\t\t\t\t\tbuildSlashCommandExtension(\n\t\t\t\t\t\tconfig.slashCommands,\n\t\t\t\t\t\tconfig.onSlashCommandSelected,\n\t\t\t\t\t\tconfig.renderSlashCommandItem,\n\t\t\t\t\t\tconfig.renderSlashCommandDropdown,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t];\n\n\tconst richExtensions = hasRichTypography\n\t\t? [\n\t\t\t\tColor,\n\t\t\t\tHighlight.configure({ multicolor: true }),\n\t\t\t\tFontFamily,\n\t\t\t\tFontSizeExtension,\n\t\t\t\tTextAlign.configure({ types: ['heading', 'paragraph'] }),\n\t\t\t\tSubscript,\n\t\t\t\tSuperscript,\n\t\t\t\tImage,\n\t\t ]\n\t\t: [Color];\n\n\t// Email carries transactional layout markup (order cards) that the plain\n\t// schema would flatten. See EmailLayoutExtensions.\n\tconst emailLayoutExtensions = hasRichPaste\n\t\t? buildEmailLayoutExtensions()\n\t\t: [];\n\n\treturn [\n\t\t...base,\n\t\t...mentionExtensions,\n\t\t...richExtensions,\n\t\t...emailLayoutExtensions,\n\t];\n}\n"],"names":["buildExtensions","config","StarterKit","Placeholder","JsonHighlightExtension","SendShortcutExtension","CharacterCount","hasRichPaste","hasRichTypography","allowedMarks","isMark","m","softBreak","HardBreak","isZeroLen","v","ParagraphWithMargin","Paragraph","el","attrs","base","Underline","Link","url","isAllowedLinkUrl","TextStyle","PasteExtension","PasteNormalizationExtension","VariableDecorationExtension","HtmlTagStripExtension","CharacterLimitExtension","SectionDividerNode","mentionExtensions","buildAgentMentionExtension","buildTeamMentionExtension","buildSlashCommandExtension","richExtensions","Color","Highlight","FontFamily","FontSizeExtension","TextAlign","Subscript","Superscript","Image","emailLayoutExtensions","buildEmailLayoutExtensions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FO,SAASA,GAAgBC,GAAyB;AAIxD,MAAIA,EAAO,UAAU;AACpB,WAAO;AAAA,MACNC,EAAW,UAAU;AAAA,QACpB,MAAM;AAAA,QACN,WAAW;AAAA;AAAA;AAAA,QAGX,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,aAAa;AAAA,QACb,YAAY;AAAA,QACZ,gBAAgB;AAAA,MAAA,CAChB;AAAA,MACDC,EAAY,UAAU;AAAA,QACrB,aAAaF,EAAO,eAAe;AAAA;AAAA;AAAA,MAAA,CACnC;AAAA,MACDG;AAAA,MACAC,EAAsB,UAAU;AAAA,QAC/B,QAAQJ,EAAO;AAAA,QACf,cAAcA,EAAO;AAAA,QACrB,gBAAgBA,EAAO,aAAa,CAAA;AAAA,MAAC,CACrC;AAAA,MACD,GAAIA,EAAO,gBACR,CAACK,EAAe,UAAU,EAAE,OAAOL,EAAO,cAAA,CAAe,CAAC,IAC1D,CAAA;AAAA,IAAC;AAIN,QAAMM,IAAeN,EAAO,UAAU,aAAa,IAC7CO,IAAoBP,EAAO,UAAU,kBAAkB,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AAIA,EAAO,UAAU,QAClB;AAAA,MACAiC;AAAA,QACCjC,EAAO,SAAS;AAAA,QAChBA,EAAO;AAAA,QACPA,EAAO;AAAA,QACPA,EAAO;AAAA,QACPA,EAAO;AAAA,MAAA;AAAA,IACR,IAEA,CAAA;AAAA,IACH,GAAIA,EAAO,gBACR;AAAA,MACAkC;AAAA,QACClC,EAAO;AAAA,QACPA,EAAO;AAAA,QACPA,EAAO;AAAA,QACPA,EAAO;AAAA,MAAA;AAAA,IACR,IAEA,CAAA;AAAA,EAAC,GAGCmC,IAAiB5B,IACpB;AAAA,IACA6B;AAAA,IACAC,EAAU,UAAU,EAAE,YAAY,IAAM;AAAA,IACxCC;AAAA,IACAC;AAAA,IACAC,EAAU,UAAU,EAAE,OAAO,CAAC,WAAW,WAAW,GAAG;AAAA,IACvDC;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA,IAEA,CAACP,CAAK,GAIHQ,IAAwBtC,IAC3BuC,EAAA,IACA,CAAA;AAEH,SAAO;AAAA,IACN,GAAG1B;AAAA,IACH,GAAGY;AAAA,IACH,GAAGI;AAAA,IACH,GAAGS;AAAA,EAAA;AAEL;"}
1
+ {"version":3,"file":"buildExtensions.js","sources":["../../../../src/editor/extensions/buildExtensions.ts"],"sourcesContent":["import CharacterCount from '@tiptap/extension-character-count';\nimport Color from '@tiptap/extension-color';\nimport FontFamily from '@tiptap/extension-font-family';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Highlight from '@tiptap/extension-highlight';\nimport Image from '@tiptap/extension-image';\nimport Link from '@tiptap/extension-link';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Subscript from '@tiptap/extension-subscript';\nimport Superscript from '@tiptap/extension-superscript';\nimport TextAlign from '@tiptap/extension-text-align';\nimport { TextStyle } from '@tiptap/extension-text-style';\nimport Underline from '@tiptap/extension-underline';\nimport StarterKit from '@tiptap/starter-kit';\nimport type { ReactNode } from 'react';\nimport { isAllowedLinkUrl } from '../../helpers/sanitize';\nimport type {\n\tEditorFeatures,\n\tEditorSnapshot,\n\tKeyboardShortcut,\n\tMentionDropdownRenderProps,\n\tMentionItem,\n\tPasteData,\n\tSlashCommandDropdownRenderProps,\n\tSlashCommandItem,\n} from '../BikEditor.types';\nimport { CharacterLimitExtension } from './characterLimit/CharacterLimitExtension';\nimport { FontSizeExtension } from './FontSizeExtension';\nimport { HtmlTagStripExtension } from './htmlTagStrip/HtmlTagStripExtension';\nimport { JsonHighlightExtension } from './jsonHighlight/JsonHighlightExtension';\nimport {\n\tbuildAgentMentionExtension,\n\tbuildTeamMentionExtension,\n} from './mention/MentionExtension';\nimport { PasteExtension } from './paste/PasteExtension';\nimport { PasteNormalizationExtension } from './plainClipboard/PasteNormalizationExtension';\nimport { SectionDividerNode } from './sectionDivider/SectionDividerNode';\nimport { SendShortcutExtension } from './sendShortcut/SendShortcutExtension';\nimport { buildSlashCommandExtension } from './slashCommand/SlashCommandExtension';\nimport { VariableDecorationExtension } from './variable/VariableDecorationExtension';\n\ninterface ExtensionConfig {\n\tfeatures?: EditorFeatures;\n\tplaceholder?: string;\n\tmaxCharacters?: number;\n\t/**\n\t * Soft character limit. Unlike `maxCharacters` (which hard-blocks all input),\n\t * this blocks typing past the limit but ALLOWS paste to overflow, rendering\n\t * the excess characters greyed (`.bik-editor-overflow`). Purely visual +\n\t * typing-guard; the consumer shows the count/error and gates send itself.\n\t */\n\tcharacterLimit?: number;\n\t/**\n\t * Upgrade {@link characterLimit} to a HARD cap: no edit (typing, Enter, paste,\n\t * drop) may grow the content past the limit, while content loaded over the limit\n\t * is preserved and can only shrink. Keeps the same metric as the shown count.\n\t */\n\tcharacterLimitHard?: boolean;\n\thasSections?: boolean;\n\tmentions?: {\n\t\tagents?: { current: MentionItem[] };\n\t\tteams?: { current: MentionItem[] };\n\t};\n\tslashCommands?: { current: SlashCommandItem[] };\n\tonPaste?: (data: PasteData) => boolean | void;\n\tonSend?: (content: EditorSnapshot) => void;\n\tsendShortcut?:\n\t\t| { key: string; modifiers?: Array<'mod' | 'ctrl' | 'shift' | 'alt'> }\n\t\t| Array<{\n\t\t\t\tkey: string;\n\t\t\t\tmodifiers?: Array<'mod' | 'ctrl' | 'shift' | 'alt'>;\n\t\t }>;\n\tshortcuts?: KeyboardShortcut[];\n\tonMentionSelected?: (item: MentionItem, char: '@' | '#') => void;\n\tonSlashCommandSelected?: (command: SlashCommandItem) => void;\n\trenderMentionItem?: (item: MentionItem, isActive: boolean) => ReactNode;\n\trenderMentionDropdown?: (props: MentionDropdownRenderProps) => ReactNode;\n\tremoveMentionTriggerOnDismiss?: boolean;\n\trenderMentionChipIcon?: (\n\t\tsource: string | null,\n\t\tkind: string | null,\n\t) => ReactNode;\n\trenderSlashCommandItem?: (\n\t\titem: SlashCommandItem,\n\t\tisActive: boolean,\n\t) => ReactNode;\n\trenderSlashCommandDropdown?: (\n\t\tprops: SlashCommandDropdownRenderProps,\n\t) => ReactNode;\n}\n\nexport function buildExtensions(config: ExtensionConfig) {\n\t// JSON body mode is a dedicated code editor — it deliberately skips the rich\n\t// text stack (mentions, typography, rich paste, sections) and turns the whole\n\t// document into one syntax-highlighted JSON code block, Postman-style.\n\tif (config.features?.jsonMode) {\n\t\treturn [\n\t\t\tStarterKit.configure({\n\t\t\t\tlink: false,\n\t\t\t\tunderline: false,\n\t\t\t\t// Keep codeBlock (the JSON container) and history; drop everything\n\t\t\t\t// that has no meaning inside raw JSON.\n\t\t\t\tbold: false,\n\t\t\t\titalic: false,\n\t\t\t\tstrike: false,\n\t\t\t\tcode: false,\n\t\t\t\theading: false,\n\t\t\t\tbulletList: false,\n\t\t\t\torderedList: false,\n\t\t\t\tblockquote: false,\n\t\t\t\thorizontalRule: false,\n\t\t\t}),\n\t\t\tPlaceholder.configure({\n\t\t\t\tplaceholder: config.placeholder ?? '{\\n \\n}',\n\t\t\t}),\n\t\t\tJsonHighlightExtension,\n\t\t\tSendShortcutExtension.configure({\n\t\t\t\tonSend: config.onSend,\n\t\t\t\tsendShortcut: config.sendShortcut,\n\t\t\t\textraShortcuts: config.shortcuts ?? [],\n\t\t\t}),\n\t\t\t...(config.maxCharacters\n\t\t\t\t? [CharacterCount.configure({ limit: config.maxCharacters })]\n\t\t\t\t: []),\n\t\t];\n\t}\n\n\tconst hasRichPaste = config.features?.richPaste ?? false;\n\tconst hasRichTypography = config.features?.richTypography ?? false;\n\n\t// When allowedMarks is specified only those marks are registered in the schema.\n\t// This disables rendering, keyboard shortcuts AND paste-preservation for the\n\t// excluded marks — all three come for free when the extension is absent.\n\tconst allowedMarks = config.features?.allowedMarks;\n\tconst isMark = (m: 'bold' | 'italic' | 'strike' | 'underline' | 'code') =>\n\t\t!allowedMarks || allowedMarks.includes(m);\n\n\t// Soft line break. Shift-Enter inserts a <br> inside the current block\n\t// (matches Gmail); plain Enter still splits the block into a new paragraph\n\t// via StarterKit's default. HardBreak is registered standalone — like Link\n\t// and Underline above — instead of through StarterKit, so we can bind ONLY\n\t// Shift-Enter here and leave Mod-Enter free for the send shortcut.\n\tconst softBreak = HardBreak.extend({\n\t\taddKeyboardShortcuts() {\n\t\t\treturn {\n\t\t\t\t'Shift-Enter': () => this.editor.commands.setHardBreak(),\n\t\t\t};\n\t\t},\n\t});\n\n\t// Paragraph that preserves a zero block-margin from the source (Gmail-style).\n\t// Most sources (ChatGPT, typed text) use plain <p> → no margin attr → the\n\t// editor/viewer default 1em margin provides the gap. Google-Docs-style\n\t// content uses margin:0 paragraphs and a separate blank-line paragraph for\n\t// spacing; we keep that margin:0 so the blank line — not stacked margins —\n\t// provides a single-line gap, exactly like Gmail. The paste pipeline also\n\t// sets margin:'0' on every paragraph when a paste contains blank-line\n\t// paragraphs (see applyParagraphSpacing), so spacing comes from EITHER the\n\t// margin OR the blank line, never both (no double gap).\n\tconst isZeroLen = (v: string) =>\n\t\tv === '0' || v === '0px' || v === '0pt' || v === '0em';\n\tconst ParagraphWithMargin = Paragraph.extend({\n\t\taddAttributes() {\n\t\t\treturn {\n\t\t\t\t...(this.parent?.() ?? {}),\n\t\t\t\tmargin: {\n\t\t\t\t\tdefault: null,\n\t\t\t\t\tparseHTML: (el: HTMLElement) =>\n\t\t\t\t\t\tisZeroLen(el.style.marginTop) && isZeroLen(el.style.marginBottom)\n\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\trenderHTML: (attrs: { margin?: string | null }) =>\n\t\t\t\t\t\tattrs.margin === '0' ? { style: 'margin: 0px' } : {},\n\t\t\t\t},\n\t\t\t};\n\t\t},\n\t});\n\n\tconst base = [\n\t\t// Exclude Link and Underline from StarterKit — TipTap v3 bundles both.\n\t\t// Without this, two copies of each are registered and the StarterKit copy's\n\t\t// click handler calls window.open even when openOnClick: false is set.\n\t\tStarterKit.configure({\n\t\t\tlink: false,\n\t\t\tunderline: false,\n\t\t\thardBreak: false,\n\t\t\tparagraph: false,\n\t\t\tbold: isMark('bold') ? {} : false,\n\t\t\titalic: isMark('italic') ? {} : false,\n\t\t\tstrike: isMark('strike') ? {} : false,\n\t\t\tcode: isMark('code') ? {} : false,\n\t\t}),\n\t\tParagraphWithMargin,\n\t\tsoftBreak,\n\t\t...(isMark('underline') ? [Underline] : []),\n\t\t// Extend Link to strip addPasteRules() and addInputRules() so pasting a\n\t\t// URL never creates a hyperlink regardless of autolink/linkOnPaste values.\n\t\tLink.extend({\n\t\t\taddPasteRules: () => [],\n\t\t\taddInputRules: () => [],\n\t\t}).configure({\n\t\t\topenOnClick: false,\n\t\t\tautolink: false,\n\t\t\tlinkOnPaste: false,\n\t\t\t// Block javascript:/data:/vbscript: hrefs. TipTap keeps the href\n\t\t\t// attribute verbatim, so scheme validation must live here.\n\t\t\tisAllowedUri: (url) => isAllowedLinkUrl(url),\n\t\t\tHTMLAttributes: {\n\t\t\t\trel: 'noopener noreferrer',\n\t\t\t\tclass: 'bik-link',\n\t\t\t},\n\t\t}),\n\t\tTextStyle,\n\t\tPlaceholder.configure({\n\t\t\tplaceholder: config.placeholder ?? 'Type a message...',\n\t\t}),\n\t\t// Consumer paste callback runs first. If it returns true the event is\n\t\t// consumed and neither PlainClipboardExtension nor the editor's default\n\t\t// paste handling will run for that event.\n\t\t...(config.onPaste\n\t\t\t? [PasteExtension.configure({ onPaste: config.onPaste })]\n\t\t\t: []),\n\t\tPasteNormalizationExtension.configure({\n\t\t\tpreserveMarks: hasRichPaste,\n\t\t\t// Only email + signature (richPaste) keep the rich HTML paste pipeline.\n\t\t\t// Every other channel (WhatsApp, IG, FB, comments) forces plain-text\n\t\t\t// paste for BOTH Cmd/Ctrl+V and Cmd/Ctrl+Shift+V — no formatting.\n\t\t\tplainOnly: !hasRichPaste,\n\t\t}),\n\t\tSendShortcutExtension.configure({\n\t\t\tonSend: config.onSend,\n\t\t\tsendShortcut: config.sendShortcut,\n\t\t\textraShortcuts: config.shortcuts ?? [],\n\t\t}),\n\t\tVariableDecorationExtension,\n\t\t// Strip HTML tags from typed text.\n\t\t// Non-email (WhatsApp, IG, private note): strip ALL tags.\n\t\t// Email (richPaste): strip only dangerous tags (script, iframe, form, etc.)\n\t\t// while preserving legitimate email tags (h1, table, div, etc.).\n\t\tHtmlTagStripExtension.configure({ stripAll: !hasRichPaste }),\n\t\t...(config.maxCharacters\n\t\t\t? [CharacterCount.configure({ limit: config.maxCharacters })]\n\t\t\t: []),\n\t\t...(config.characterLimit\n\t\t\t? [\n\t\t\t\t\tCharacterLimitExtension.configure({\n\t\t\t\t\t\tlimit: config.characterLimit,\n\t\t\t\t\t\thard: config.characterLimitHard,\n\t\t\t\t\t}),\n\t\t\t ]\n\t\t\t: []),\n\t\t// Always register SectionDividerNode so the custom <div data-section-divider>\n\t\t// node is part of the schema in every editor instance. This means imperative\n\t\t// callers (setBodyAndSections / setSectionContent) work even when no\n\t\t// `sections` prop was provided at mount time.\n\t\tSectionDividerNode,\n\t];\n\n\tconst mentionExtensions = [\n\t\t...(config.mentions?.agents\n\t\t\t? [\n\t\t\t\t\tbuildAgentMentionExtension(\n\t\t\t\t\t\tconfig.mentions.agents,\n\t\t\t\t\t\tconfig.onMentionSelected,\n\t\t\t\t\t\tconfig.renderMentionItem,\n\t\t\t\t\t\tconfig.renderMentionDropdown,\n\t\t\t\t\t\tconfig.removeMentionTriggerOnDismiss,\n\t\t\t\t\t\tconfig.renderMentionChipIcon,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t\t...(config.mentions?.teams\n\t\t\t? [\n\t\t\t\t\tbuildTeamMentionExtension(\n\t\t\t\t\t\tconfig.mentions.teams,\n\t\t\t\t\t\tconfig.onMentionSelected,\n\t\t\t\t\t\tconfig.renderMentionItem,\n\t\t\t\t\t\tconfig.renderMentionDropdown,\n\t\t\t\t\t\tconfig.removeMentionTriggerOnDismiss,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t\t...(config.slashCommands\n\t\t\t? [\n\t\t\t\t\tbuildSlashCommandExtension(\n\t\t\t\t\t\tconfig.slashCommands,\n\t\t\t\t\t\tconfig.onSlashCommandSelected,\n\t\t\t\t\t\tconfig.renderSlashCommandItem,\n\t\t\t\t\t\tconfig.renderSlashCommandDropdown,\n\t\t\t\t\t),\n\t\t\t ]\n\t\t\t: []),\n\t];\n\n\tconst richExtensions = hasRichTypography\n\t\t? [\n\t\t\t\tColor,\n\t\t\t\tHighlight.configure({ multicolor: true }),\n\t\t\t\tFontFamily,\n\t\t\t\tFontSizeExtension,\n\t\t\t\tTextAlign.configure({ types: ['heading', 'paragraph'] }),\n\t\t\t\tSubscript,\n\t\t\t\tSuperscript,\n\t\t\t\tImage,\n\t\t ]\n\t\t: [Color];\n\n\treturn [...base, ...mentionExtensions, ...richExtensions];\n}\n"],"names":["buildExtensions","config","StarterKit","Placeholder","JsonHighlightExtension","SendShortcutExtension","CharacterCount","hasRichPaste","hasRichTypography","allowedMarks","isMark","m","softBreak","HardBreak","isZeroLen","v","ParagraphWithMargin","Paragraph","el","attrs","base","Underline","Link","url","isAllowedLinkUrl","TextStyle","PasteExtension","PasteNormalizationExtension","VariableDecorationExtension","HtmlTagStripExtension","CharacterLimitExtension","SectionDividerNode","mentionExtensions","buildAgentMentionExtension","buildTeamMentionExtension","buildSlashCommandExtension","richExtensions","Color","Highlight","FontFamily","FontSizeExtension","TextAlign","Subscript","Superscript","Image"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FO,SAASA,GAAgBC,GAAyB;AAIxD,MAAIA,EAAO,UAAU;AACpB,WAAO;AAAA,MACNC,EAAW,UAAU;AAAA,QACpB,MAAM;AAAA,QACN,WAAW;AAAA;AAAA;AAAA,QAGX,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,aAAa;AAAA,QACb,YAAY;AAAA,QACZ,gBAAgB;AAAA,MAAA,CAChB;AAAA,MACDC,EAAY,UAAU;AAAA,QACrB,aAAaF,EAAO,eAAe;AAAA;AAAA;AAAA,MAAA,CACnC;AAAA,MACDG;AAAA,MACAC,EAAsB,UAAU;AAAA,QAC/B,QAAQJ,EAAO;AAAA,QACf,cAAcA,EAAO;AAAA,QACrB,gBAAgBA,EAAO,aAAa,CAAA;AAAA,MAAC,CACrC;AAAA,MACD,GAAIA,EAAO,gBACR,CAACK,EAAe,UAAU,EAAE,OAAOL,EAAO,cAAA,CAAe,CAAC,IAC1D,CAAA;AAAA,IAAC;AAIN,QAAMM,IAAeN,EAAO,UAAU,aAAa,IAC7CO,IAAoBP,EAAO,UAAU,kBAAkB,IAKvDQ,IAAeR,EAAO,UAAU,cAChCS,IAAS,CAACC,MACf,CAACF,KAAgBA,EAAa,SAASE,CAAC,GAOnCC,IAAYC,EAAU,OAAO;AAAA,IAClC,uBAAuB;AACtB,aAAO;AAAA,QACN,eAAe,MAAM,KAAK,OAAO,SAAS,aAAA;AAAA,MAAa;AAAA,IAEzD;AAAA,EAAA,CACA,GAWKC,IAAY,CAACC,MAClBA,MAAM,OAAOA,MAAM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,EAAO;AAAA,MAAA;AAAA,IACR,IAEA,CAAA;AAAA,EAAC,GAGCmC,IAAiB5B,IACpB;AAAA,IACA6B;AAAA,IACAC,EAAU,UAAU,EAAE,YAAY,IAAM;AAAA,IACxCC;AAAA,IACAC;AAAA,IACAC,EAAU,UAAU,EAAE,OAAO,CAAC,WAAW,WAAW,GAAG;AAAA,IACvDC;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA,IAEA,CAACP,CAAK;AAET,SAAO,CAAC,GAAGjB,GAAM,GAAGY,GAAmB,GAAGI,CAAc;AACzD;"}
@@ -22,7 +22,7 @@ const C = ({
22
22
  "path",
23
23
  {
24
24
  d: "M9.3332 4.66659L11.3332 6.66658M3.3332 3.99992V6.66658M12.6665 9.33325V11.9999M6.66653 1.33325V2.66659M4.66653 5.33325H1.99987M13.9999 10.6666H11.3332M7.3332 1.99992H5.99987M14.4265 2.42659L13.5732 1.57325C13.4982 1.49746 13.4089 1.4373 13.3105 1.39624C13.2121 1.35518 13.1065 1.33404 12.9999 1.33404C12.8932 1.33404 12.7877 1.35518 12.6893 1.39624C12.5908 1.4373 12.5015 1.49746 12.4265 1.57325L1.5732 12.4266C1.49741 12.5016 1.43725 12.5909 1.39619 12.6893C1.35513 12.7877 1.33398 12.8933 1.33398 12.9999C1.33398 13.1066 1.35513 13.2121 1.39619 13.3105C1.43725 13.4089 1.49741 13.4982 1.5732 13.5733L2.42653 14.4266C2.50108 14.5032 2.59022 14.5641 2.6887 14.6057C2.78717 14.6472 2.89298 14.6687 2.99987 14.6687C3.10676 14.6687 3.21256 14.6472 3.31104 14.6057C3.40951 14.5641 3.49865 14.5032 3.5732 14.4266L14.4265 3.57325C14.5031 3.4987 14.564 3.40956 14.6056 3.31109C14.6472 3.21262 14.6686 3.10681 14.6686 2.99992C14.6686 2.89303 14.6472 2.78722 14.6056 2.68875C14.564 2.59028 14.5031 2.50113 14.4265 2.42659Z",
25
- stroke: "currentColor",
25
+ stroke: "#616161",
26
26
  strokeWidth: 1.5,
27
27
  strokeLinecap: "round",
28
28
  strokeLinejoin: "round"
@@ -1 +1 @@
1
- {"version":3,"file":"WandSparkles.js","sources":["../../../../src/icons/BIK AI specific/WandSparkles.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgWandSparkles = ({\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_758_122311)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"M9.3332 4.66659L11.3332 6.66658M3.3332 3.99992V6.66658M12.6665 9.33325V11.9999M6.66653 1.33325V2.66659M4.66653 5.33325H1.99987M13.9999 10.6666H11.3332M7.3332 1.99992H5.99987M14.4265 2.42659L13.5732 1.57325C13.4982 1.49746 13.4089 1.4373 13.3105 1.39624C13.2121 1.35518 13.1065 1.33404 12.9999 1.33404C12.8932 1.33404 12.7877 1.35518 12.6893 1.39624C12.5908 1.4373 12.5015 1.49746 12.4265 1.57325L1.5732 12.4266C1.49741 12.5016 1.43725 12.5909 1.39619 12.6893C1.35513 12.7877 1.33398 12.8933 1.33398 12.9999C1.33398 13.1066 1.35513 13.2121 1.39619 13.3105C1.43725 13.4089 1.49741 13.4982 1.5732 13.5733L2.42653 14.4266C2.50108 14.5032 2.59022 14.5641 2.6887 14.6057C2.78717 14.6472 2.89298 14.6687 2.99987 14.6687C3.10676 14.6687 3.21256 14.6472 3.31104 14.6057C3.40951 14.5641 3.49865 14.5032 3.5732 14.4266L14.4265 3.57325C14.5031 3.4987 14.564 3.40956 14.6056 3.31109C14.6472 3.21262 14.6686 3.10681 14.6686 2.99992C14.6686 2.89303 14.6472 2.78722 14.6056 2.68875C14.564 2.59028 14.5031 2.50113 14.4265 2.42659Z\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_758_122311\">\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 SvgWandSparkles;\n"],"names":["SvgWandSparkles","size","color","rest","props","jsxs","jsx"],"mappings":";AAMA,MAAMA,IAAkB,CAAC;AAAA,EACxB,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,EAAC,KAAA,EAAE,UAAS,0BACX,UAAA,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,QAAO;AAAA,YACP,aAAa;AAAA,YACb,eAAc;AAAA,YACd,gBAAe;AAAA,UAAA;AAAA,QAAA,GAEjB;AAAA,QACA,gBAAAA,EAAC,QAAA,EACA,UAAA,gBAAAA,EAAC,YAAA,EAAS,IAAG,oBACZ,UAAA,gBAAAA,EAAC,QAAA,EAAK,OAAO,IAAI,QAAQ,IAAI,MAAK,SAAQ,GAC3C,EAAA,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH;"}
1
+ {"version":3,"file":"WandSparkles.js","sources":["../../../../src/icons/BIK AI specific/WandSparkles.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgWandSparkles = ({\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_758_122311)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"M9.3332 4.66659L11.3332 6.66658M3.3332 3.99992V6.66658M12.6665 9.33325V11.9999M6.66653 1.33325V2.66659M4.66653 5.33325H1.99987M13.9999 10.6666H11.3332M7.3332 1.99992H5.99987M14.4265 2.42659L13.5732 1.57325C13.4982 1.49746 13.4089 1.4373 13.3105 1.39624C13.2121 1.35518 13.1065 1.33404 12.9999 1.33404C12.8932 1.33404 12.7877 1.35518 12.6893 1.39624C12.5908 1.4373 12.5015 1.49746 12.4265 1.57325L1.5732 12.4266C1.49741 12.5016 1.43725 12.5909 1.39619 12.6893C1.35513 12.7877 1.33398 12.8933 1.33398 12.9999C1.33398 13.1066 1.35513 13.2121 1.39619 13.3105C1.43725 13.4089 1.49741 13.4982 1.5732 13.5733L2.42653 14.4266C2.50108 14.5032 2.59022 14.5641 2.6887 14.6057C2.78717 14.6472 2.89298 14.6687 2.99987 14.6687C3.10676 14.6687 3.21256 14.6472 3.31104 14.6057C3.40951 14.5641 3.49865 14.5032 3.5732 14.4266L14.4265 3.57325C14.5031 3.4987 14.564 3.40956 14.6056 3.31109C14.6472 3.21262 14.6686 3.10681 14.6686 2.99992C14.6686 2.89303 14.6472 2.78722 14.6056 2.68875C14.564 2.59028 14.5031 2.50113 14.4265 2.42659Z\"\n\t\t\t\t\tstroke=\"#616161\"\n\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_758_122311\">\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 SvgWandSparkles;\n"],"names":["SvgWandSparkles","size","color","rest","props","jsxs","jsx"],"mappings":";AAMA,MAAMA,IAAkB,CAAC;AAAA,EACxB,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,EAAC,KAAA,EAAE,UAAS,0BACX,UAAA,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,QAAO;AAAA,YACP,aAAa;AAAA,YACb,eAAc;AAAA,YACd,gBAAe;AAAA,UAAA;AAAA,QAAA,GAEjB;AAAA,QACA,gBAAAA,EAAC,QAAA,EACA,UAAA,gBAAAA,EAAC,YAAA,EAAS,IAAG,oBACZ,UAAA,gBAAAA,EAAC,QAAA,EAAK,OAAO,IAAI,QAAQ,IAAI,MAAK,SAAQ,GAC3C,EAAA,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.867-beta.0",
3
+ "version": "0.0.867",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -82,7 +82,6 @@
82
82
  "@tiptap/extension-placeholder": "^3.22.5",
83
83
  "@tiptap/extension-subscript": "^3.22.5",
84
84
  "@tiptap/extension-superscript": "^3.22.5",
85
- "@tiptap/extension-table": "^3.23.6",
86
85
  "@tiptap/extension-text-align": "^3.22.5",
87
86
  "@tiptap/extension-text-style": "^3.22.5",
88
87
  "@tiptap/extension-underline": "^3.22.5",
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../node_modules/@tiptap/core/dist/index.js"),n=require("@tiptap/extension-table"),r=["style","width","height","align","valign","bgcolor"],i=e=>Object.fromEntries(e.map(t=>[t,{default:null,parseHTML:l=>l.getAttribute(t),renderHTML:l=>l[t]?{[t]:l[t]}:{}}])),s=n.Table.extend({addAttributes(){return{...this.parent?.()??{},...i([...r,"cellpadding","cellspacing","border"])}},renderHTML({HTMLAttributes:e}){return["table",a.mergeAttributes(this.options.HTMLAttributes,e),["tbody",0]]}}).configure({resizable:!1}),o=n.TableRow.extend({addAttributes(){return{...this.parent?.()??{},...i(r)}}}),d=n.TableCell.extend({addAttributes(){return{...this.parent?.()??{},...i(r)}}}),u=n.TableHeader.extend({addAttributes(){return{...this.parent?.()??{},...i(r)}}}),b=a.Node.create({name:"styledBlock",group:"block",content:"block+",defining:!0,priority:40,addAttributes(){return i(r)},parseHTML(){return[{tag:"div",getAttrs:e=>{const t=e;return Array.from(t.attributes).some(l=>l.name.startsWith("data-"))?!1:t.hasAttribute("style")||t.hasAttribute("align")?null:!1}}]},renderHTML({HTMLAttributes:e}){return["div",a.mergeAttributes(e),0]}}),c=a.Extension.create({name:"emailInlineStyle",addGlobalAttributes(){return[{types:["textStyle","image","link"],attributes:{emailStyle:{default:null,parseHTML:e=>e.getAttribute("style"),renderHTML:e=>e.emailStyle?{style:e.emailStyle}:{}}}}]}}),m=()=>[s,o,d,u,b,c];exports.EmailInlineStyleExtension=c;exports.EmailTable=s;exports.EmailTableCell=d;exports.EmailTableHeader=u;exports.EmailTableRow=o;exports.StyledBlockNode=b;exports.buildEmailLayoutExtensions=m;
2
- //# sourceMappingURL=EmailLayoutExtensions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailLayoutExtensions.js","sources":["../../../../../src/editor/extensions/emailLayout/EmailLayoutExtensions.ts"],"sourcesContent":["import { Extension, mergeAttributes, Node } from '@tiptap/core';\nimport {\n\tTable,\n\tTableCell,\n\tTableHeader,\n\tTableRow,\n} from '@tiptap/extension-table';\n\n/**\n * Lets the email editor hold email-safe layout HTML without flattening it.\n *\n * Transactional email (order cards, receipts) is built the only way email\n * clients render reliably: nested tables and divs carrying their layout as\n * inline styles. The rich-text schema has no idea what to do with that — it\n * has no table node, so `<table>` collapses to paragraphs, and every layout\n * `<div>` collapses the same way. Measured on an order card: 24 inline styles\n * in, 1 out, two tables and thirteen divs reduced to nine paragraphs.\n *\n * This adds exactly what is needed to keep that markup intact, and nothing\n * that changes how the editor behaves for anyone typing in it:\n *\n * - table / tr / td / th, from TipTap's own table extension, with the source's\n * presentational attributes (style, width, align, ...) carried through and\n * TipTap's own sizing markup (colgroup, min-width) left out — an email table\n * sizes itself; resizing handles have no meaning here.\n * - a styled `div` block, so layout containers keep their border, padding and\n * background instead of becoming paragraphs.\n * - the raw `style` attribute preserved on spans, images and links, which the\n * default marks reduce to the handful of properties they understand.\n *\n * Email only. Chat channels never carry this markup, and their editors are not\n * touched by it.\n */\n\n// Presentational attributes email markup relies on. Only what is read back\n// out is kept; the schema never invents any.\nconst PASSTHROUGH = ['style', 'width', 'height', 'align', 'valign', 'bgcolor'];\n\nconst passthroughAttributes = (names: string[]) =>\n\tObject.fromEntries(\n\t\tnames.map((name) => [\n\t\t\tname,\n\t\t\t{\n\t\t\t\tdefault: null,\n\t\t\t\tparseHTML: (el: HTMLElement) => el.getAttribute(name),\n\t\t\t\trenderHTML: (attrs: Record<string, string | null>) =>\n\t\t\t\t\tattrs[name] ? { [name]: attrs[name] } : {},\n\t\t\t},\n\t\t]),\n\t);\n\n/** `<table>` that renders as it came in: its own attributes, no colgroup. */\nexport const EmailTable = Table.extend({\n\taddAttributes() {\n\t\treturn {\n\t\t\t...(this.parent?.() ?? {}),\n\t\t\t...passthroughAttributes([\n\t\t\t\t...PASSTHROUGH,\n\t\t\t\t'cellpadding',\n\t\t\t\t'cellspacing',\n\t\t\t\t'border',\n\t\t\t]),\n\t\t};\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [\n\t\t\t'table',\n\t\t\tmergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n\t\t\t['tbody', 0],\n\t\t];\n\t},\n}).configure({ resizable: false });\n\nexport const EmailTableRow = TableRow.extend({\n\taddAttributes() {\n\t\treturn {\n\t\t\t...(this.parent?.() ?? {}),\n\t\t\t...passthroughAttributes(PASSTHROUGH),\n\t\t};\n\t},\n});\n\nexport const EmailTableCell = TableCell.extend({\n\taddAttributes() {\n\t\treturn {\n\t\t\t...(this.parent?.() ?? {}),\n\t\t\t...passthroughAttributes(PASSTHROUGH),\n\t\t};\n\t},\n});\n\nexport const EmailTableHeader = TableHeader.extend({\n\taddAttributes() {\n\t\treturn {\n\t\t\t...(this.parent?.() ?? {}),\n\t\t\t...passthroughAttributes(PASSTHROUGH),\n\t\t};\n\t},\n});\n\n/**\n * A `div` that keeps its presentation. Parsed at a lower priority than the\n * section divider, which is also a div and must keep winning its own markup.\n */\nexport const StyledBlockNode = Node.create({\n\tname: 'styledBlock',\n\tgroup: 'block',\n\tcontent: 'block+',\n\tdefining: true,\n\tpriority: 40,\n\taddAttributes() {\n\t\treturn passthroughAttributes(PASSTHROUGH);\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: 'div',\n\t\t\t\tgetAttrs: (el) => {\n\t\t\t\t\tconst element = el as HTMLElement;\n\t\t\t\t\t// Section dividers, and any other div carrying data-* semantics,\n\t\t\t\t\t// belong to their own nodes.\n\t\t\t\t\tif (\n\t\t\t\t\t\tArray.from(element.attributes).some((a) =>\n\t\t\t\t\t\t\ta.name.startsWith('data-'),\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t// A bare div adds nothing a paragraph does not; let it flatten.\n\t\t\t\t\treturn element.hasAttribute('style') || element.hasAttribute('align')\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: false;\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn ['div', mergeAttributes(HTMLAttributes), 0];\n\t},\n});\n\n/**\n * The full `style` string on spans, images and links. The default marks read\n * only the properties they model (color, font-size, ...) and drop the rest —\n * padding, border-radius, display — which is exactly what a status pill or a\n * button-styled link is made of.\n */\nexport const EmailInlineStyleExtension = Extension.create({\n\tname: 'emailInlineStyle',\n\taddGlobalAttributes() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttypes: ['textStyle', 'image', 'link'],\n\t\t\t\tattributes: {\n\t\t\t\t\temailStyle: {\n\t\t\t\t\t\tdefault: null,\n\t\t\t\t\t\tparseHTML: (el: HTMLElement) => el.getAttribute('style'),\n\t\t\t\t\t\trenderHTML: (attrs: { emailStyle?: string | null }) =>\n\t\t\t\t\t\t\tattrs.emailStyle ? { style: attrs.emailStyle } : {},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t},\n});\n\nexport const buildEmailLayoutExtensions = () => [\n\tEmailTable,\n\tEmailTableRow,\n\tEmailTableCell,\n\tEmailTableHeader,\n\tStyledBlockNode,\n\tEmailInlineStyleExtension,\n];\n"],"names":["PASSTHROUGH","passthroughAttributes","names","name","el","attrs","EmailTable","Table","HTMLAttributes","mergeAttributes","EmailTableRow","TableRow","EmailTableCell","TableCell","EmailTableHeader","TableHeader","StyledBlockNode","Node","element","a","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B,EAAsBD,CAAW,CACzC,EACA,WAAY,CACX,MAAO,CACN,CACC,IAAK,MACL,SAAWI,GAAO,CACjB,MAAMc,EAAUd,EAGhB,OACC,MAAM,KAAKc,EAAQ,UAAU,EAAE,KAAMC,GACpCA,EAAE,KAAK,WAAW,OAAO,CAAA,EAGnB,GAGDD,EAAQ,aAAa,OAAO,GAAKA,EAAQ,aAAa,OAAO,EACjE,KACA,EACJ,CAAA,CACD,CAEF,EACA,WAAW,CAAE,eAAAV,GAAkB,CAC9B,MAAO,CAAC,MAAOC,EAAAA,gBAAgBD,CAAc,EAAG,CAAC,CAClD,CACD,CAAC,EAQYY,EAA4BC,EAAAA,UAAU,OAAO,CACzD,KAAM,mBACN,qBAAsB,CACrB,MAAO,CACN,CACC,MAAO,CAAC,YAAa,QAAS,MAAM,EACpC,WAAY,CACX,WAAY,CACX,QAAS,KACT,UAAYjB,GAAoBA,EAAG,aAAa,OAAO,EACvD,WAAaC,GACZA,EAAM,WAAa,CAAE,MAAOA,EAAM,YAAe,CAAA,CAAC,CACpD,CACD,CACD,CAEF,CACD,CAAC,EAEYiB,EAA6B,IAAM,CAC/ChB,EACAI,EACAE,EACAE,EACAE,EACAI,CACD"}
@@ -1,19 +0,0 @@
1
- import { Extension, Node } from '@tiptap/core';
2
- /** `<table>` that renders as it came in: its own attributes, no colgroup. */
3
- export declare const EmailTable: Node<import('@tiptap/extension-table').TableOptions, any>;
4
- export declare const EmailTableRow: Node<import('@tiptap/extension-table').TableRowOptions, any>;
5
- export declare const EmailTableCell: Node<import('@tiptap/extension-table').TableCellOptions, any>;
6
- export declare const EmailTableHeader: Node<import('@tiptap/extension-table').TableHeaderOptions, any>;
7
- /**
8
- * A `div` that keeps its presentation. Parsed at a lower priority than the
9
- * section divider, which is also a div and must keep winning its own markup.
10
- */
11
- export declare const StyledBlockNode: Node<any, any>;
12
- /**
13
- * The full `style` string on spans, images and links. The default marks read
14
- * only the properties they model (color, font-size, ...) and drop the rest —
15
- * padding, border-radius, display — which is exactly what a status pill or a
16
- * button-styled link is made of.
17
- */
18
- export declare const EmailInlineStyleExtension: Extension<any, any>;
19
- export declare const buildEmailLayoutExtensions: () => (Node<import('@tiptap/extension-table').TableOptions, any> | Node<import('@tiptap/extension-table').TableRowOptions, any> | Node<any, any> | Extension<any, any>)[];
@@ -1,110 +0,0 @@
1
- import { mergeAttributes as i, Node as n, Extension as s } from "../../../node_modules/@tiptap/core/dist/index.js";
2
- import { Table as o, TableRow as d, TableCell as u, TableHeader as b } from "@tiptap/extension-table";
3
- const l = ["style", "width", "height", "align", "valign", "bgcolor"], a = (t) => Object.fromEntries(
4
- t.map((e) => [
5
- e,
6
- {
7
- default: null,
8
- parseHTML: (r) => r.getAttribute(e),
9
- renderHTML: (r) => r[e] ? { [e]: r[e] } : {}
10
- }
11
- ])
12
- ), c = o.extend({
13
- addAttributes() {
14
- return {
15
- ...this.parent?.() ?? {},
16
- ...a([
17
- ...l,
18
- "cellpadding",
19
- "cellspacing",
20
- "border"
21
- ])
22
- };
23
- },
24
- renderHTML({ HTMLAttributes: t }) {
25
- return [
26
- "table",
27
- i(this.options.HTMLAttributes, t),
28
- ["tbody", 0]
29
- ];
30
- }
31
- }).configure({ resizable: !1 }), m = d.extend({
32
- addAttributes() {
33
- return {
34
- ...this.parent?.() ?? {},
35
- ...a(l)
36
- };
37
- }
38
- }), p = u.extend({
39
- addAttributes() {
40
- return {
41
- ...this.parent?.() ?? {},
42
- ...a(l)
43
- };
44
- }
45
- }), g = b.extend({
46
- addAttributes() {
47
- return {
48
- ...this.parent?.() ?? {},
49
- ...a(l)
50
- };
51
- }
52
- }), y = n.create({
53
- name: "styledBlock",
54
- group: "block",
55
- content: "block+",
56
- defining: !0,
57
- priority: 40,
58
- addAttributes() {
59
- return a(l);
60
- },
61
- parseHTML() {
62
- return [
63
- {
64
- tag: "div",
65
- getAttrs: (t) => {
66
- const e = t;
67
- return Array.from(e.attributes).some(
68
- (r) => r.name.startsWith("data-")
69
- ) ? !1 : e.hasAttribute("style") || e.hasAttribute("align") ? null : !1;
70
- }
71
- }
72
- ];
73
- },
74
- renderHTML({ HTMLAttributes: t }) {
75
- return ["div", i(t), 0];
76
- }
77
- }), T = s.create({
78
- name: "emailInlineStyle",
79
- addGlobalAttributes() {
80
- return [
81
- {
82
- types: ["textStyle", "image", "link"],
83
- attributes: {
84
- emailStyle: {
85
- default: null,
86
- parseHTML: (t) => t.getAttribute("style"),
87
- renderHTML: (t) => t.emailStyle ? { style: t.emailStyle } : {}
88
- }
89
- }
90
- }
91
- ];
92
- }
93
- }), f = () => [
94
- c,
95
- m,
96
- p,
97
- g,
98
- y,
99
- T
100
- ];
101
- export {
102
- T as EmailInlineStyleExtension,
103
- c as EmailTable,
104
- p as EmailTableCell,
105
- g as EmailTableHeader,
106
- m as EmailTableRow,
107
- y as StyledBlockNode,
108
- f as buildEmailLayoutExtensions
109
- };
110
- //# sourceMappingURL=EmailLayoutExtensions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailLayoutExtensions.js","sources":["../../../../../src/editor/extensions/emailLayout/EmailLayoutExtensions.ts"],"sourcesContent":["import { Extension, mergeAttributes, Node } from '@tiptap/core';\nimport {\n\tTable,\n\tTableCell,\n\tTableHeader,\n\tTableRow,\n} from '@tiptap/extension-table';\n\n/**\n * Lets the email editor hold email-safe layout HTML without flattening it.\n *\n * Transactional email (order cards, receipts) is built the only way email\n * clients render reliably: nested tables and divs carrying their layout as\n * inline styles. The rich-text schema has no idea what to do with that — it\n * has no table node, so `<table>` collapses to paragraphs, and every layout\n * `<div>` collapses the same way. Measured on an order card: 24 inline styles\n * in, 1 out, two tables and thirteen divs reduced to nine paragraphs.\n *\n * This adds exactly what is needed to keep that markup intact, and nothing\n * that changes how the editor behaves for anyone typing in it:\n *\n * - table / tr / td / th, from TipTap's own table extension, with the source's\n * presentational attributes (style, width, align, ...) carried through and\n * TipTap's own sizing markup (colgroup, min-width) left out — an email table\n * sizes itself; resizing handles have no meaning here.\n * - a styled `div` block, so layout containers keep their border, padding and\n * background instead of becoming paragraphs.\n * - the raw `style` attribute preserved on spans, images and links, which the\n * default marks reduce to the handful of properties they understand.\n *\n * Email only. Chat channels never carry this markup, and their editors are not\n * touched by it.\n */\n\n// Presentational attributes email markup relies on. Only what is read back\n// out is kept; the schema never invents any.\nconst PASSTHROUGH = ['style', 'width', 'height', 'align', 'valign', 'bgcolor'];\n\nconst passthroughAttributes = (names: string[]) =>\n\tObject.fromEntries(\n\t\tnames.map((name) => [\n\t\t\tname,\n\t\t\t{\n\t\t\t\tdefault: null,\n\t\t\t\tparseHTML: (el: HTMLElement) => el.getAttribute(name),\n\t\t\t\trenderHTML: (attrs: Record<string, string | null>) =>\n\t\t\t\t\tattrs[name] ? { [name]: attrs[name] } : {},\n\t\t\t},\n\t\t]),\n\t);\n\n/** `<table>` that renders as it came in: its own attributes, no colgroup. */\nexport const EmailTable = Table.extend({\n\taddAttributes() {\n\t\treturn {\n\t\t\t...(this.parent?.() ?? {}),\n\t\t\t...passthroughAttributes([\n\t\t\t\t...PASSTHROUGH,\n\t\t\t\t'cellpadding',\n\t\t\t\t'cellspacing',\n\t\t\t\t'border',\n\t\t\t]),\n\t\t};\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [\n\t\t\t'table',\n\t\t\tmergeAttributes(this.options.HTMLAttributes, HTMLAttributes),\n\t\t\t['tbody', 0],\n\t\t];\n\t},\n}).configure({ resizable: false });\n\nexport const EmailTableRow = TableRow.extend({\n\taddAttributes() {\n\t\treturn {\n\t\t\t...(this.parent?.() ?? {}),\n\t\t\t...passthroughAttributes(PASSTHROUGH),\n\t\t};\n\t},\n});\n\nexport const EmailTableCell = TableCell.extend({\n\taddAttributes() {\n\t\treturn {\n\t\t\t...(this.parent?.() ?? {}),\n\t\t\t...passthroughAttributes(PASSTHROUGH),\n\t\t};\n\t},\n});\n\nexport const EmailTableHeader = TableHeader.extend({\n\taddAttributes() {\n\t\treturn {\n\t\t\t...(this.parent?.() ?? {}),\n\t\t\t...passthroughAttributes(PASSTHROUGH),\n\t\t};\n\t},\n});\n\n/**\n * A `div` that keeps its presentation. Parsed at a lower priority than the\n * section divider, which is also a div and must keep winning its own markup.\n */\nexport const StyledBlockNode = Node.create({\n\tname: 'styledBlock',\n\tgroup: 'block',\n\tcontent: 'block+',\n\tdefining: true,\n\tpriority: 40,\n\taddAttributes() {\n\t\treturn passthroughAttributes(PASSTHROUGH);\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: 'div',\n\t\t\t\tgetAttrs: (el) => {\n\t\t\t\t\tconst element = el as HTMLElement;\n\t\t\t\t\t// Section dividers, and any other div carrying data-* semantics,\n\t\t\t\t\t// belong to their own nodes.\n\t\t\t\t\tif (\n\t\t\t\t\t\tArray.from(element.attributes).some((a) =>\n\t\t\t\t\t\t\ta.name.startsWith('data-'),\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t// A bare div adds nothing a paragraph does not; let it flatten.\n\t\t\t\t\treturn element.hasAttribute('style') || element.hasAttribute('align')\n\t\t\t\t\t\t? null\n\t\t\t\t\t\t: false;\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn ['div', mergeAttributes(HTMLAttributes), 0];\n\t},\n});\n\n/**\n * The full `style` string on spans, images and links. The default marks read\n * only the properties they model (color, font-size, ...) and drop the rest —\n * padding, border-radius, display — which is exactly what a status pill or a\n * button-styled link is made of.\n */\nexport const EmailInlineStyleExtension = Extension.create({\n\tname: 'emailInlineStyle',\n\taddGlobalAttributes() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttypes: ['textStyle', 'image', 'link'],\n\t\t\t\tattributes: {\n\t\t\t\t\temailStyle: {\n\t\t\t\t\t\tdefault: null,\n\t\t\t\t\t\tparseHTML: (el: HTMLElement) => el.getAttribute('style'),\n\t\t\t\t\t\trenderHTML: (attrs: { emailStyle?: string | null }) =>\n\t\t\t\t\t\t\tattrs.emailStyle ? { style: attrs.emailStyle } : {},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t},\n});\n\nexport const buildEmailLayoutExtensions = () => [\n\tEmailTable,\n\tEmailTableRow,\n\tEmailTableCell,\n\tEmailTableHeader,\n\tStyledBlockNode,\n\tEmailInlineStyleExtension,\n];\n"],"names":["PASSTHROUGH","passthroughAttributes","names","name","el","attrs","EmailTable","Table","HTMLAttributes","mergeAttributes","EmailTableRow","TableRow","EmailTableCell","TableCell","EmailTableHeader","TableHeader","StyledBlockNode","Node","element","a","EmailInlineStyleExtension","Extension","buildEmailLayoutExtensions"],"mappings":";;AAoCA,MAAMA,IAAc,CAAC,SAAS,SAAS,UAAU,SAAS,UAAU,SAAS,GAEvEC,IAAwB,CAACC,MAC9B,OAAO;AAAA,EACNA,EAAM,IAAI,CAACC,MAAS;AAAA,IACnBA;AAAA,IACA;AAAA,MACC,SAAS;AAAA,MACT,WAAW,CAACC,MAAoBA,EAAG,aAAaD,CAAI;AAAA,MACpD,YAAY,CAACE,MACZA,EAAMF,CAAI,IAAI,EAAE,CAACA,CAAI,GAAGE,EAAMF,CAAI,MAAM,CAAA;AAAA,IAAC;AAAA,EAC3C,CACA;AACF,GAGYG,IAAaC,EAAM,OAAO;AAAA,EACtC,gBAAgB;AACf,WAAO;AAAA,MACN,GAAI,KAAK,SAAA,KAAc,CAAA;AAAA,MACvB,GAAGN,EAAsB;AAAA,QACxB,GAAGD;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACA;AAAA,IAAA;AAAA,EAEH;AAAA,EACA,WAAW,EAAE,gBAAAQ,KAAkB;AAC9B,WAAO;AAAA,MACN;AAAA,MACAC,EAAgB,KAAK,QAAQ,gBAAgBD,CAAc;AAAA,MAC3D,CAAC,SAAS,CAAC;AAAA,IAAA;AAAA,EAEb;AACD,CAAC,EAAE,UAAU,EAAE,WAAW,IAAO,GA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