@synertech/ui 0.39.0 → 0.39.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.
@@ -0,0 +1 @@
1
+ 'use strict';require('@mdxeditor/editor/style.css');var editor=require('@mdxeditor/editor'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var T="\xC9crivez en Markdown...",C=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(editor.UndoRedo,{}),jsxRuntime.jsx(editor.BlockTypeSelect,{}),jsxRuntime.jsx(editor.BoldItalicUnderlineToggles,{}),jsxRuntime.jsx(editor.CodeToggle,{}),jsxRuntime.jsx(editor.CreateLink,{}),jsxRuntime.jsx(editor.ListsToggle,{}),jsxRuntime.jsx(editor.InsertThematicBreak,{})]}),L=[editor.headingsPlugin(),editor.listsPlugin(),editor.quotePlugin(),editor.linkPlugin(),editor.linkDialogPlugin(),editor.codeBlockPlugin({defaultCodeBlockLanguage:""}),editor.thematicBreakPlugin(),editor.markdownShortcutPlugin(),editor.toolbarPlugin({toolbarContents:C})],r=react.forwardRef(({value:e,onChange:t,placeholder:n=T},d)=>jsxRuntime.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden bg-white dark:bg-gray-800",children:jsxRuntime.jsx(editor.MDXEditor,{ref:d,markdown:e,onChange:t,placeholder:n,contentEditableClassName:"prose prose-sm dark:prose-invert max-w-none p-3 min-h-[16rem] focus:outline-none",plugins:L})}));r.displayName="MarkdownEditor";exports.MarkdownEditor=r;
@@ -0,0 +1,15 @@
1
+ import * as react from 'react';
2
+ import { MDXEditorMethods } from '@mdxeditor/editor';
3
+ import { a as MarkdownEditorProps } from './types-99-Ej5og.cjs';
4
+
5
+ /**
6
+ * Markdown editor for `<HelpButton markdown editable>`.
7
+ *
8
+ * Published from `@synertech/ui/markdown-editor`, never from the main entry.
9
+ * `@mdxeditor/editor` is an optional peer dependency, and bundlers resolve any
10
+ * reference to it at build time — even a dynamic `import()` — so reaching it
11
+ * from the main entry breaks the build of every app that did not install it.
12
+ */
13
+ declare const MarkdownEditor: react.ForwardRefExoticComponent<MarkdownEditorProps & react.RefAttributes<MDXEditorMethods>>;
14
+
15
+ export { MarkdownEditor, MarkdownEditorProps };
@@ -0,0 +1,15 @@
1
+ import * as react from 'react';
2
+ import { MDXEditorMethods } from '@mdxeditor/editor';
3
+ import { a as MarkdownEditorProps } from './types-99-Ej5og.js';
4
+
5
+ /**
6
+ * Markdown editor for `<HelpButton markdown editable>`.
7
+ *
8
+ * Published from `@synertech/ui/markdown-editor`, never from the main entry.
9
+ * `@mdxeditor/editor` is an optional peer dependency, and bundlers resolve any
10
+ * reference to it at build time — even a dynamic `import()` — so reaching it
11
+ * from the main entry breaks the build of every app that did not install it.
12
+ */
13
+ declare const MarkdownEditor: react.ForwardRefExoticComponent<MarkdownEditorProps & react.RefAttributes<MDXEditorMethods>>;
14
+
15
+ export { MarkdownEditor, MarkdownEditorProps };
@@ -0,0 +1 @@
1
+ import'@mdxeditor/editor/style.css';import {headingsPlugin,listsPlugin,quotePlugin,linkPlugin,linkDialogPlugin,codeBlockPlugin,thematicBreakPlugin,markdownShortcutPlugin,toolbarPlugin,MDXEditor,UndoRedo,BlockTypeSelect,BoldItalicUnderlineToggles,CodeToggle,CreateLink,ListsToggle,InsertThematicBreak}from'@mdxeditor/editor';import {forwardRef}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var T="\xC9crivez en Markdown...",C=()=>jsxs(Fragment,{children:[jsx(UndoRedo,{}),jsx(BlockTypeSelect,{}),jsx(BoldItalicUnderlineToggles,{}),jsx(CodeToggle,{}),jsx(CreateLink,{}),jsx(ListsToggle,{}),jsx(InsertThematicBreak,{})]}),L=[headingsPlugin(),listsPlugin(),quotePlugin(),linkPlugin(),linkDialogPlugin(),codeBlockPlugin({defaultCodeBlockLanguage:""}),thematicBreakPlugin(),markdownShortcutPlugin(),toolbarPlugin({toolbarContents:C})],r=forwardRef(({value:e,onChange:t,placeholder:n=T},d)=>jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden bg-white dark:bg-gray-800",children:jsx(MDXEditor,{ref:d,markdown:e,onChange:t,placeholder:n,contentEditableClassName:"prose prose-sm dark:prose-invert max-w-none p-3 min-h-[16rem] focus:outline-none",plugins:L})}));r.displayName="MarkdownEditor";export{r as MarkdownEditor};
@@ -0,0 +1,15 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ /** Props `HelpButton` passes to the Markdown editor it is given. */
4
+ interface MarkdownEditorProps {
5
+ value: string;
6
+ onChange: (markdown: string) => void;
7
+ placeholder?: string;
8
+ }
9
+ /**
10
+ * Any component accepting {@link MarkdownEditorProps}. The stock one is
11
+ * `MarkdownEditor` from `@synertech/ui/markdown-editor`.
12
+ */
13
+ type MarkdownEditorComponent = ComponentType<MarkdownEditorProps>;
14
+
15
+ export type { MarkdownEditorComponent as M, MarkdownEditorProps as a };
@@ -0,0 +1,15 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ /** Props `HelpButton` passes to the Markdown editor it is given. */
4
+ interface MarkdownEditorProps {
5
+ value: string;
6
+ onChange: (markdown: string) => void;
7
+ placeholder?: string;
8
+ }
9
+ /**
10
+ * Any component accepting {@link MarkdownEditorProps}. The stock one is
11
+ * `MarkdownEditor` from `@synertech/ui/markdown-editor`.
12
+ */
13
+ type MarkdownEditorComponent = ComponentType<MarkdownEditorProps>;
14
+
15
+ export type { MarkdownEditorComponent as M, MarkdownEditorProps as a };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synertech/ui",
3
- "version": "0.39.0",
3
+ "version": "0.39.1",
4
4
  "type": "module",
5
5
  "description": "Synertech UI component library",
6
6
  "main": "./dist/index.cjs",
@@ -17,6 +17,16 @@
17
17
  "default": "./dist/index.cjs"
18
18
  }
19
19
  },
20
+ "./markdown-editor": {
21
+ "import": {
22
+ "types": "./dist/markdown-editor.d.ts",
23
+ "default": "./dist/markdown-editor.js"
24
+ },
25
+ "require": {
26
+ "types": "./dist/markdown-editor.d.cts",
27
+ "default": "./dist/markdown-editor.cjs"
28
+ }
29
+ },
20
30
  "./styles.css": "./dist/styles.css"
21
31
  },
22
32
  "bin": {
@@ -31,7 +41,7 @@
31
41
  "*.css"
32
42
  ],
33
43
  "scripts": {
34
- "build": "tsup",
44
+ "build": "tsup && node scripts/check-bundle-boundary.mjs",
35
45
  "dev": "tsup --watch",
36
46
  "typecheck": "tsc -p tsconfig.json --noEmit",
37
47
  "lint": "eslint src/",