@burdenoff/microfe-support 2026.1115.1 → 2026.1118.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/support/components/careers/RichTextEditor.js +31 -31
- package/dist/support/components/careers/RichTextEditor.js.map +1 -1
- package/package.json +1 -1
- package/dist/_virtual/_rolldown/runtime.js +0 -6
- package/dist/node_modules/@tiptap/core/dist/index.js +0 -3491
- package/dist/node_modules/@tiptap/core/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -44
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
- package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +0 -12
- package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -75
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -73
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -78
- package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -157
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -11
- package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -50
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -70
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -49
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -70
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -389
- package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -967
- package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -46
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -6
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -55
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -14
- package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +0 -72
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -457
- package/dist/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/react/dist/index.js +0 -332
- package/dist/node_modules/@tiptap/react/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -28
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +0 -298
- package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
- package/dist/node_modules/linkifyjs/dist/linkify.js +0 -527
- package/dist/node_modules/linkifyjs/dist/linkify.js.map +0 -1
- package/dist/node_modules/orderedmap/dist/index.js +0 -68
- package/dist/node_modules/orderedmap/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js +0 -334
- package/dist/node_modules/prosemirror-commands/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -112
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -168
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-history/dist/index.js +0 -219
- package/dist/node_modules/prosemirror-history/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -51
- package/dist/node_modules/prosemirror-keymap/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +0 -1775
- package/dist/node_modules/prosemirror-model/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -77
- package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-state/dist/index.js +0 -526
- package/dist/node_modules/prosemirror-state/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1204
- package/dist/node_modules/prosemirror-transform/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-view/dist/index.js +0 -3355
- package/dist/node_modules/prosemirror-view/dist/index.js.map +0 -1
- package/dist/node_modules/rope-sequence/dist/index.js +0 -84
- package/dist/node_modules/rope-sequence/dist/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -55
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -53
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -53
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -45
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -11
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -11
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
- package/dist/node_modules/w3c-keyname/index.js +0 -89
- package/dist/node_modules/w3c-keyname/index.js.map +0 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import n from "../../../node_modules/@tiptap/starter-kit/dist/index.js";
|
|
3
|
-
import r from "../../../node_modules/@tiptap/extension-placeholder/dist/index.js";
|
|
4
|
-
import { cn as i } from "../../utils/cn.js";
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
5
2
|
/* empty css */
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { Bold as
|
|
8
|
-
import { jsx as
|
|
3
|
+
import { useEffect as t } from "react";
|
|
4
|
+
import { Bold as n, Italic as r, List as i, ListOrdered as a } from "lucide-react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { EditorContent as c, useEditor as l } from "@tiptap/react";
|
|
7
|
+
import u from "@tiptap/starter-kit";
|
|
8
|
+
import d from "@tiptap/extension-placeholder";
|
|
9
9
|
// src/support/components/careers/RichTextEditor.tsx
|
|
10
10
|
var f = "<p></p>";
|
|
11
|
-
function p({ label:
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
function p({ label: t, active: n, onClick: r, Icon: i }) {
|
|
12
|
+
return /* @__PURE__ */ o("button", {
|
|
13
13
|
type: "button",
|
|
14
|
-
"aria-label":
|
|
15
|
-
"aria-pressed":
|
|
16
|
-
onClick:
|
|
17
|
-
className:
|
|
18
|
-
children: /* @__PURE__ */
|
|
14
|
+
"aria-label": t,
|
|
15
|
+
"aria-pressed": n,
|
|
16
|
+
onClick: r,
|
|
17
|
+
className: e("inline-flex size-7 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-action-secondary-bg hover:text-text-primary", n && "bg-action-secondary-bg text-text-primary"),
|
|
18
|
+
children: /* @__PURE__ */ o(i, { size: 14 })
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
function m({ id:
|
|
22
|
-
let v =
|
|
23
|
-
extensions: [
|
|
21
|
+
function m({ id: e, value: m, onChange: h, placeholder: g, ..._ }) {
|
|
22
|
+
let v = l({
|
|
23
|
+
extensions: [u.configure({
|
|
24
24
|
heading: !1,
|
|
25
25
|
blockquote: !1,
|
|
26
26
|
codeBlock: !1,
|
|
27
27
|
horizontalRule: !1,
|
|
28
28
|
strike: !1,
|
|
29
29
|
code: !1
|
|
30
|
-
}),
|
|
30
|
+
}), d.configure({ placeholder: g ?? "" })],
|
|
31
31
|
content: m || f,
|
|
32
32
|
editorProps: { attributes: {
|
|
33
|
-
...
|
|
33
|
+
...e ? { id: e } : {},
|
|
34
34
|
role: "textbox",
|
|
35
35
|
"aria-multiline": "true",
|
|
36
36
|
..._["aria-required"] ? { "aria-required": "true" } : {},
|
|
@@ -41,41 +41,41 @@ function m({ id: i, value: m, onChange: h, placeholder: g, ..._ }) {
|
|
|
41
41
|
h(t === f ? "" : t);
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
return
|
|
44
|
+
return t(() => {
|
|
45
45
|
if (!v || v.isFocused) return;
|
|
46
46
|
let e = v.getHTML(), t = m || f;
|
|
47
47
|
e !== t && v.commands.setContent(t);
|
|
48
|
-
}, [v, m]), v ? /* @__PURE__ */
|
|
48
|
+
}, [v, m]), v ? /* @__PURE__ */ s("div", {
|
|
49
49
|
className: "w-full rounded-lg border border-border-default bg-bg-surface focus-within:outline-none focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ s("div", {
|
|
51
51
|
className: "flex items-center gap-1 border-b border-border-default px-2 py-1.5",
|
|
52
52
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ o(p, {
|
|
54
54
|
label: "Bold",
|
|
55
55
|
active: v.isActive("bold"),
|
|
56
56
|
onClick: () => v.chain().focus().toggleBold().run(),
|
|
57
|
-
Icon:
|
|
57
|
+
Icon: n
|
|
58
58
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ o(p, {
|
|
60
60
|
label: "Italic",
|
|
61
61
|
active: v.isActive("italic"),
|
|
62
62
|
onClick: () => v.chain().focus().toggleItalic().run(),
|
|
63
|
-
Icon:
|
|
63
|
+
Icon: r
|
|
64
64
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ o(p, {
|
|
66
66
|
label: "Bullet list",
|
|
67
67
|
active: v.isActive("bulletList"),
|
|
68
68
|
onClick: () => v.chain().focus().toggleBulletList().run(),
|
|
69
|
-
Icon:
|
|
69
|
+
Icon: i
|
|
70
70
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ o(p, {
|
|
72
72
|
label: "Numbered list",
|
|
73
73
|
active: v.isActive("orderedList"),
|
|
74
74
|
onClick: () => v.chain().focus().toggleOrderedList().run(),
|
|
75
|
-
Icon:
|
|
75
|
+
Icon: a
|
|
76
76
|
})
|
|
77
77
|
]
|
|
78
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ o(c, {
|
|
79
79
|
editor: v,
|
|
80
80
|
className: "px-4 py-2.5"
|
|
81
81
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.js","names":["StarterKit","Placeholder","
|
|
1
|
+
{"version":3,"file":"RichTextEditor.js","names":["StarterKit","Placeholder","EMPTY_DOC","ToolbarButton","label","active","cn","Icon","RichTextEditor","rest","editor","useEditor","placeholder","value","id","instance","html","useEffect","current","next","Bold","Italic","List","ListOrdered","EditorContent"],"sources":["../../../../src/support/components/careers/RichTextEditor.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { EditorContent, useEditor } from '@tiptap/react';\nimport StarterKit from '@tiptap/starter-kit';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport { Bold, Italic, List, ListOrdered } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport '../../styles/richtext.css';\n\n/**\n * Minimal WYSIWYG editor for admin-authored candidate-facing copy (job\n * assignment description / problem statement). Output is an HTML string —\n * the backend re-sanitizes it to an allowlist before persisting and again\n * before rendering it into a candidate email, so this editor only needs to\n * produce well-formed HTML, not police content itself.\n */\nexport interface RichTextEditorProps {\n id?: string;\n value: string;\n onChange: (html: string) => void;\n placeholder?: string;\n 'aria-required'?: boolean;\n}\n\nconst EMPTY_DOC = '<p></p>';\n\nfunction ToolbarButton({\n label,\n active,\n onClick,\n Icon,\n}: {\n label: string;\n active: boolean;\n onClick: () => void;\n Icon: typeof Bold;\n}) {\n return (\n <button\n type=\"button\"\n aria-label={label}\n aria-pressed={active}\n onClick={onClick}\n className={cn(\n 'inline-flex size-7 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-action-secondary-bg hover:text-text-primary',\n active && 'bg-action-secondary-bg text-text-primary'\n )}\n >\n <Icon size={14} />\n </button>\n );\n}\n\nexport function RichTextEditor({ id, value, onChange, placeholder, ...rest }: RichTextEditorProps) {\n const editor = useEditor({\n extensions: [\n StarterKit.configure({\n heading: false,\n blockquote: false,\n codeBlock: false,\n horizontalRule: false,\n strike: false,\n code: false,\n }),\n Placeholder.configure({ placeholder: placeholder ?? '' }),\n ],\n content: value || EMPTY_DOC,\n editorProps: {\n attributes: {\n ...(id ? { id } : {}),\n role: 'textbox',\n 'aria-multiline': 'true',\n ...(rest['aria-required'] ? { 'aria-required': 'true' } : {}),\n class: 'support-richtext focus:outline-none min-h-24',\n },\n },\n onUpdate: ({ editor: instance }) => {\n const html = instance.getHTML();\n onChange(html === EMPTY_DOC ? '' : html);\n },\n });\n\n // Re-sync the editor's content when the caller resets `value` out from under\n // it (e.g. the \"Add Assignment\" dialog re-opening for a different\n // assignment, or a create/edit form reset) — but never fight the user's own\n // in-progress typing.\n useEffect(() => {\n if (!editor || editor.isFocused) return;\n const current = editor.getHTML();\n const next = value || EMPTY_DOC;\n if (current === next) return;\n editor.commands.setContent(next);\n }, [editor, value]);\n\n if (!editor) return null;\n\n return (\n <div className=\"w-full rounded-lg border border-border-default bg-bg-surface focus-within:outline-none focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary\">\n <div className=\"flex items-center gap-1 border-b border-border-default px-2 py-1.5\">\n <ToolbarButton\n label=\"Bold\"\n active={editor.isActive('bold')}\n onClick={() => editor.chain().focus().toggleBold().run()}\n Icon={Bold}\n />\n <ToolbarButton\n label=\"Italic\"\n active={editor.isActive('italic')}\n onClick={() => editor.chain().focus().toggleItalic().run()}\n Icon={Italic}\n />\n <ToolbarButton\n label=\"Bullet list\"\n active={editor.isActive('bulletList')}\n onClick={() => editor.chain().focus().toggleBulletList().run()}\n Icon={List}\n />\n <ToolbarButton\n label=\"Numbered list\"\n active={editor.isActive('orderedList')}\n onClick={() => editor.chain().focus().toggleOrderedList().run()}\n Icon={ListOrdered}\n />\n </div>\n <EditorContent editor={editor} className=\"px-4 py-2.5\" />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAuBA,IAAME,IAAY;AAElB,SAASC,EAAc,EACrB,UACA,WACA,YACA,WAMC;CACD,OACE,kBAAC,UAAD;EACE,MAAK;EACL,cAAYC;EACZ,gBAAcC;EACL;EACT,WAAWC,EACT,wJACAD,KAAU,0CACZ;EAEA,UAAA,kBAACE,GAAD,EAAM,MAAM,GAAK,CAAA;CACX,CAAA;AAEZ;AAEA,SAAgBC,EAAe,EAAE,OAAI,UAAO,aAAU,gBAAa,GAAGC,KAA6B;CACjG,IAAMC,IAASC,EAAU;EACvB,YAAY,CACVX,EAAW,UAAU;GACnB,SAAS;GACT,YAAY;GAC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D;KACE,OAAM;KACN,QAAQO,EAAO,SAAS,aAAa;KACrC,eAAeA,EAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC,IAAI;KAC9D,MAAMa;IACP,CAAA;GACE;EACL,CAAA,GAAA,kBAACC,GAAD;GAAuB;GAAQ,WAAU;EAAe,CAAA,CACrD;C,KA/Ba;AAiCtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// \0rolldown/runtime.js
|
|
2
|
-
var e = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), t = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
3
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
4
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
5
|
-
});
|
|
6
|
-
export { e as __commonJSMin, t as __require };
|