@burdenoff/microfe-product 2026.626.2 → 2026.720.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.
Files changed (38) hide show
  1. package/dist/product/pages/ContentPageViewPage.js +42 -43
  2. package/dist/product/pages/ContentPageViewPage.js.map +1 -1
  3. package/dist/product/pages/ProductViewPage.js +88 -87
  4. package/dist/product/pages/ProductViewPage.js.map +1 -1
  5. package/dist/product-management/modules/content-pages/components/ContentPageForm.js +341 -473
  6. package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +8 -10
  8. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  9. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +201 -168
  10. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
  11. package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js +1 -0
  12. package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js.map +1 -1
  13. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +37 -34
  14. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
  15. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +183 -138
  16. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  17. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +250 -252
  18. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  19. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +72 -72
  20. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  21. package/dist/product-management/modules/products/components/ProductForm.js +490 -492
  22. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  23. package/dist/product-management/modules/products/hooks/useProducts.js +20 -7
  24. package/dist/product-management/modules/products/hooks/useProducts.js.map +1 -1
  25. package/dist/product-management/modules/products/pages/ProductDetailPage.js +130 -129
  26. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  27. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +195 -203
  28. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  29. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +88 -87
  30. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  31. package/dist/shared/components/MarkdownEditor.js +161 -0
  32. package/dist/shared/components/MarkdownEditor.js.map +1 -0
  33. package/dist/shared/components/index.js +1 -0
  34. package/package.json +2 -2
  35. package/dist/node_modules/dompurify/dist/purify.es.js +0 -555
  36. package/dist/node_modules/dompurify/dist/purify.es.js.map +0 -1
  37. package/dist/shared/utils/renderMarkdown.js +0 -8
  38. package/dist/shared/utils/renderMarkdown.js.map +0 -1
@@ -0,0 +1,161 @@
1
+ import { useCallback as e, useRef as t, useState as n } from "react";
2
+ import { Bold as r, Code as i, Eye as a, EyeOff as o, Heading as s, Italic as c, Link as l, List as u, ListOrdered as d, Quote as f } from "lucide-react";
3
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
4
+ import { Markdown as h } from "@burdenoff/fe-libs/shared/components";
5
+ //#region src/shared/components/MarkdownEditor.tsx
6
+ var g = [
7
+ {
8
+ label: "Bold",
9
+ icon: r,
10
+ prefix: "**",
11
+ suffix: "**",
12
+ placeholder: "bold text"
13
+ },
14
+ {
15
+ label: "Italic",
16
+ icon: c,
17
+ prefix: "*",
18
+ suffix: "*",
19
+ placeholder: "italic text"
20
+ },
21
+ {
22
+ label: "Heading",
23
+ icon: s,
24
+ prefix: "## ",
25
+ suffix: "",
26
+ placeholder: "Heading",
27
+ block: !0
28
+ },
29
+ {
30
+ label: "Bullet List",
31
+ icon: u,
32
+ prefix: "- ",
33
+ suffix: "",
34
+ placeholder: "list item",
35
+ block: !0
36
+ },
37
+ {
38
+ label: "Numbered List",
39
+ icon: d,
40
+ prefix: "1. ",
41
+ suffix: "",
42
+ placeholder: "list item",
43
+ block: !0
44
+ },
45
+ {
46
+ label: "Link",
47
+ icon: l,
48
+ prefix: "[",
49
+ suffix: "](url)",
50
+ placeholder: "link text"
51
+ },
52
+ {
53
+ label: "Code Block",
54
+ icon: i,
55
+ prefix: "```\n",
56
+ suffix: "\n```",
57
+ placeholder: "code",
58
+ block: !0
59
+ },
60
+ {
61
+ label: "Quote",
62
+ icon: f,
63
+ prefix: "> ",
64
+ suffix: "",
65
+ placeholder: "quote text",
66
+ block: !0
67
+ }
68
+ ];
69
+ function _({ id: r, value: i, onChange: s, label: c, placeholder: l, disabled: u, error: d, rows: f = 6, minHeight: _ = 160, className: v = "", showToolbar: y = !0 }) {
70
+ let b = t(null), [x, S] = n(!1), C = e((e) => {
71
+ let t = b.current;
72
+ if (!t) return;
73
+ let { selectionStart: n, selectionEnd: r } = t, a = i.substring(n, r) || e.placeholder, o;
74
+ o = e.block && n > 0 && i[n - 1] !== "\n" ? `\n${e.prefix}${a}${e.suffix}` : `${e.prefix}${a}${e.suffix}`;
75
+ let c = i.substring(0, n), l = i.substring(r);
76
+ s(c + o + l);
77
+ let u = n + o.indexOf(a), d = u + a.length;
78
+ requestAnimationFrame(() => {
79
+ t.focus(), t.setSelectionRange(u, d);
80
+ });
81
+ }, [i, s]);
82
+ return /* @__PURE__ */ m("div", {
83
+ className: `space-y-1.5 ${v}`,
84
+ children: [
85
+ c && /* @__PURE__ */ p("label", {
86
+ htmlFor: r,
87
+ className: "block text-sm font-medium text-text-primary",
88
+ children: c
89
+ }),
90
+ /* @__PURE__ */ m("div", {
91
+ className: "border border-default rounded-lg overflow-hidden",
92
+ children: [y && /* @__PURE__ */ m("div", {
93
+ className: "flex items-center justify-between bg-bg-sunken px-2 py-1.5 border-b border-border-seam",
94
+ children: [/* @__PURE__ */ p("div", {
95
+ className: "flex items-center gap-0.5",
96
+ children: g.map((e) => {
97
+ let t = e.icon;
98
+ return /* @__PURE__ */ p("button", {
99
+ type: "button",
100
+ title: e.label,
101
+ onClick: () => C(e),
102
+ disabled: u || x,
103
+ className: "\n inline-flex items-center justify-center\n w-8 h-8\n rounded\n text-text-secondary\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-150\n disabled:opacity-50 disabled:cursor-not-allowed\n ",
104
+ children: /* @__PURE__ */ p(t, { size: 16 })
105
+ }, e.label);
106
+ })
107
+ }), /* @__PURE__ */ m("div", {
108
+ className: "flex items-center gap-1",
109
+ children: [/* @__PURE__ */ m("button", {
110
+ type: "button",
111
+ onClick: () => S(!1),
112
+ className: `
113
+ inline-flex items-center gap-1.5 px-3 py-1 rounded text-xs font-medium
114
+ transition-all duration-150
115
+ ${x ? "text-text-tertiary hover:text-text-secondary" : "bg-surface text-text-primary shadow-sm"}
116
+ `,
117
+ children: [/* @__PURE__ */ p(o, { size: 14 }), "Edit"]
118
+ }), /* @__PURE__ */ m("button", {
119
+ type: "button",
120
+ onClick: () => S(!0),
121
+ className: `
122
+ inline-flex items-center gap-1.5 px-3 py-1 rounded text-xs font-medium
123
+ transition-all duration-150
124
+ ${x ? "bg-surface text-text-primary shadow-sm" : "text-text-tertiary hover:text-text-secondary"}
125
+ `,
126
+ children: [/* @__PURE__ */ p(a, { size: 14 }), "Preview"]
127
+ })]
128
+ })]
129
+ }), /* @__PURE__ */ m("div", {
130
+ className: "relative",
131
+ children: [!x && /* @__PURE__ */ p("textarea", {
132
+ ref: b,
133
+ id: r,
134
+ value: i,
135
+ onChange: (e) => s(e.target.value),
136
+ rows: f,
137
+ disabled: u,
138
+ placeholder: l,
139
+ className: "\n w-full px-4 py-3\n bg-surface\n text-text-primary\n placeholder:text-text-tertiary\n focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\n disabled:bg-bg-sunken disabled:cursor-not-allowed\n font-mono text-sm\n resize-y\n transition-all duration-200\n ",
140
+ style: { minHeight: _ }
141
+ }), x && /* @__PURE__ */ p("div", {
142
+ className: "\n w-full px-4 py-3\n bg-surface\n text-text-primary\n overflow-y-auto\n prose prose-sm max-w-none\n ",
143
+ style: { minHeight: _ },
144
+ children: i ? /* @__PURE__ */ p(h, { children: i }) : /* @__PURE__ */ p("p", {
145
+ className: "text-text-tertiary italic",
146
+ children: "Nothing to preview yet."
147
+ })
148
+ })]
149
+ })]
150
+ }),
151
+ d && /* @__PURE__ */ p("p", {
152
+ className: "text-sm text-[var(--color-status-error)] mt-1",
153
+ children: d
154
+ })
155
+ ]
156
+ });
157
+ }
158
+ //#endregion
159
+ export { _ as MarkdownEditor };
160
+
161
+ //# sourceMappingURL=MarkdownEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownEditor.js","names":[],"sources":["../../../src/shared/components/MarkdownEditor.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport {\n Bold,\n Italic,\n Link,\n Code,\n List,\n ListOrdered,\n Heading,\n Quote,\n Eye,\n EyeOff,\n} from 'lucide-react';\nimport { Markdown } from '@burdenoff/fe-libs/shared/components';\n\ninterface MarkdownEditorProps {\n id?: string;\n value: string;\n onChange: (value: string) => void;\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n error?: string;\n rows?: number;\n minHeight?: number;\n className?: string;\n showToolbar?: boolean;\n}\n\ntype ToolbarAction = {\n label: string;\n icon: React.ComponentType<{ size?: number }>;\n prefix: string;\n suffix: string;\n placeholder: string;\n block?: boolean;\n};\n\nconst TOOLBAR_ACTIONS: ToolbarAction[] = [\n { label: 'Bold', icon: Bold, prefix: '**', suffix: '**', placeholder: 'bold text' },\n { label: 'Italic', icon: Italic, prefix: '*', suffix: '*', placeholder: 'italic text' },\n {\n label: 'Heading',\n icon: Heading,\n prefix: '## ',\n suffix: '',\n placeholder: 'Heading',\n block: true,\n },\n {\n label: 'Bullet List',\n icon: List,\n prefix: '- ',\n suffix: '',\n placeholder: 'list item',\n block: true,\n },\n {\n label: 'Numbered List',\n icon: ListOrdered,\n prefix: '1. ',\n suffix: '',\n placeholder: 'list item',\n block: true,\n },\n {\n label: 'Link',\n icon: Link,\n prefix: '[',\n suffix: '](url)',\n placeholder: 'link text',\n },\n {\n label: 'Code Block',\n icon: Code,\n prefix: '```\\n',\n suffix: '\\n```',\n placeholder: 'code',\n block: true,\n },\n {\n label: 'Quote',\n icon: Quote,\n prefix: '> ',\n suffix: '',\n placeholder: 'quote text',\n block: true,\n },\n];\n\nexport function MarkdownEditor({\n id,\n value,\n onChange,\n label,\n placeholder,\n disabled,\n error,\n rows = 6,\n minHeight = 160,\n className = '',\n showToolbar = true,\n}: MarkdownEditorProps) {\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const [showPreview, setShowPreview] = useState(false);\n\n const insertMarkdown = useCallback(\n (action: ToolbarAction) => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n const { selectionStart, selectionEnd } = textarea;\n const selectedText = value.substring(selectionStart, selectionEnd);\n const textToWrap = selectedText || action.placeholder;\n\n let insertion: string;\n if (action.block && selectionStart > 0 && value[selectionStart - 1] !== '\\n') {\n insertion = `\\n${action.prefix}${textToWrap}${action.suffix}`;\n } else {\n insertion = `${action.prefix}${textToWrap}${action.suffix}`;\n }\n\n const before = value.substring(0, selectionStart);\n const after = value.substring(selectionEnd);\n const newValue = before + insertion + after;\n\n onChange(newValue);\n\n const prefixLen = insertion.indexOf(textToWrap);\n const newCursorStart = selectionStart + prefixLen;\n const newCursorEnd = newCursorStart + textToWrap.length;\n\n requestAnimationFrame(() => {\n textarea.focus();\n textarea.setSelectionRange(newCursorStart, newCursorEnd);\n });\n },\n [value, onChange]\n );\n\n const toolbarButtonClassName = `\n inline-flex items-center justify-center\n w-8 h-8\n rounded\n text-text-secondary\n hover:bg-bg-sunken hover:text-text-primary\n transition-all duration-150\n disabled:opacity-50 disabled:cursor-not-allowed\n `;\n\n return (\n <div className={`space-y-1.5 ${className}`}>\n {label && (\n <label htmlFor={id} className=\"block text-sm font-medium text-text-primary\">\n {label}\n </label>\n )}\n\n <div className=\"border border-default rounded-lg overflow-hidden\">\n {showToolbar && (\n <div className=\"flex items-center justify-between bg-bg-sunken px-2 py-1.5 border-b border-border-seam\">\n <div className=\"flex items-center gap-0.5\">\n {TOOLBAR_ACTIONS.map((action) => {\n const IconComponent = action.icon;\n return (\n <button\n key={action.label}\n type=\"button\"\n title={action.label}\n onClick={() => insertMarkdown(action)}\n disabled={disabled || showPreview}\n className={toolbarButtonClassName}\n >\n <IconComponent size={16} />\n </button>\n );\n })}\n </div>\n\n <div className=\"flex items-center gap-1\">\n <button\n type=\"button\"\n onClick={() => setShowPreview(false)}\n className={`\n inline-flex items-center gap-1.5 px-3 py-1 rounded text-xs font-medium\n transition-all duration-150\n ${\n !showPreview\n ? 'bg-surface text-text-primary shadow-sm'\n : 'text-text-tertiary hover:text-text-secondary'\n }\n `}\n >\n <EyeOff size={14} />\n Edit\n </button>\n <button\n type=\"button\"\n onClick={() => setShowPreview(true)}\n className={`\n inline-flex items-center gap-1.5 px-3 py-1 rounded text-xs font-medium\n transition-all duration-150\n ${\n showPreview\n ? 'bg-surface text-text-primary shadow-sm'\n : 'text-text-tertiary hover:text-text-secondary'\n }\n `}\n >\n <Eye size={14} />\n Preview\n </button>\n </div>\n </div>\n )}\n\n <div className=\"relative\">\n {!showPreview && (\n <textarea\n ref={textareaRef}\n id={id}\n value={value}\n onChange={(e) => onChange(e.target.value)}\n rows={rows}\n disabled={disabled}\n placeholder={placeholder}\n className=\"\n w-full px-4 py-3\n bg-surface\n text-text-primary\n placeholder:text-text-tertiary\n focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\n disabled:bg-bg-sunken disabled:cursor-not-allowed\n font-mono text-sm\n resize-y\n transition-all duration-200\n \"\n style={{ minHeight }}\n />\n )}\n\n {showPreview && (\n <div\n className=\"\n w-full px-4 py-3\n bg-surface\n text-text-primary\n overflow-y-auto\n prose prose-sm max-w-none\n \"\n style={{ minHeight }}\n >\n {value ? (\n <Markdown>{value}</Markdown>\n ) : (\n <p className=\"text-text-tertiary italic\">Nothing to preview yet.</p>\n )}\n </div>\n )}\n </div>\n </div>\n\n {error && <p className=\"text-sm text-[var(--color-status-error)] mt-1\">{error}</p>}\n </div>\n );\n}\n"],"mappings":";;;;;AAsCA,IAAM,IAAmC;CACvC;EAAE,OAAO;EAAQ,MAAM;EAAM,QAAQ;EAAM,QAAQ;EAAM,aAAa;EAAa;CACnF;EAAE,OAAO;EAAU,MAAM;EAAQ,QAAQ;EAAK,QAAQ;EAAK,aAAa;EAAe;CACvF;EACE,OAAO;EACP,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,OAAO;EACR;CACD;EACE,OAAO;EACP,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,OAAO;EACR;CACD;EACE,OAAO;EACP,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,OAAO;EACR;CACD;EACE,OAAO;EACP,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,aAAa;EACd;CACD;EACE,OAAO;EACP,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,OAAO;EACR;CACD;EACE,OAAO;EACP,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,OAAO;EACR;CACF;AAED,SAAgB,EAAe,EAC7B,OACA,UACA,aACA,UACA,gBACA,aACA,UACA,UAAO,GACP,eAAY,KACZ,eAAY,IACZ,iBAAc,MACQ;CACtB,IAAM,IAAc,EAA4B,KAAK,EAC/C,CAAC,GAAa,KAAkB,EAAS,GAAM,EAE/C,IAAiB,GACpB,MAA0B;EACzB,IAAM,IAAW,EAAY;AAC7B,MAAI,CAAC,EAAU;EAEf,IAAM,EAAE,mBAAgB,oBAAiB,GAEnC,IADe,EAAM,UAAU,GAAgB,EAClC,IAAgB,EAAO,aAEtC;AACJ,EAGE,IAHE,EAAO,SAAS,IAAiB,KAAK,EAAM,IAAiB,OAAO,OAC1D,KAAK,EAAO,SAAS,IAAa,EAA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MACD;MACG;MACP,WAAW,MAAM,EAAS,EAAE,OAAO,MAAM;MACnC;MACI;MACG;MACb,WAAU;MAWV,OAAO,EAAE,cAAW;MACpB,CAAA,EAGH,KACC,kBAAC,OAAD;MACE,WAAU;MAOV,OAAO,EAAE,cAAW;gBAEnB,IACC,kBAAC,GAAD,EAAA,UAAW,GAAiB,CAAA,GAE5B,kBAAC,KAAD;OAAG,WAAU;iBAA4B;OAA2B,CAAA;MAElE,CAAA,CAEJ;OACF;;GAEL,KAAS,kBAAC,KAAD;IAAG,WAAU;cAAiD;IAAU,CAAA;GAC9E"}
@@ -3,3 +3,4 @@ import "../../product-management/shared/components/feedback/ErrorState.js";
3
3
  import "../../product-management/modules/products/components/ProductStatusBadge.js";
4
4
  import "../../product-management/shared/components/input/SearchInput.js";
5
5
  import "../../product-management/shared/components/feedback/EmptyState.js";
6
+ import "./MarkdownEditor.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-product",
3
- "version": "2026.626.2",
3
+ "version": "2026.720.1",
4
4
  "description": "Product management microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@apollo/client": "^3.12.0",
44
- "@burdenoff/fe-libs": "2026.625.5",
44
+ "@burdenoff/fe-libs": "2026.720.3",
45
45
  "@tanstack/react-query": "^5.90.16",
46
46
  "@xmldom/xmldom": "0.8.13",
47
47
  "ajv": "8.20.0",