@tnd028/strapi-plugin-tiptap-editor 0.0.1 → 0.0.2

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/_chunks/{Alignment-qMOzO-n2.mjs → Alignment-BTrqlTTh.mjs} +1 -1
  2. package/dist/_chunks/{Alignment-B0f2-LO0.js → Alignment-hS-tTWuJ.js} +1 -1
  3. package/dist/_chunks/{Blockquote-9wBGDz3L.mjs → Blockquote-DJUK1-BE.mjs} +1 -1
  4. package/dist/_chunks/{Blockquote-DeGUfK27.js → Blockquote-xNUeALuh.js} +1 -1
  5. package/dist/_chunks/{Bold-C-0g6Ayd.mjs → Bold-ByaAbROo.mjs} +1 -1
  6. package/dist/_chunks/{Bold-ClnPsPHt.js → Bold-CueKtObk.js} +1 -1
  7. package/dist/_chunks/{ColorAndHighlight-t1Ui5tcL.mjs → ColorAndHighlight-D53O4qn1.mjs} +6 -2
  8. package/dist/_chunks/{ColorAndHighlight-BMmtoSpj.js → ColorAndHighlight-DW64XLWJ.js} +6 -2
  9. package/dist/_chunks/CustomCard-DnOBubyS.mjs +151 -0
  10. package/dist/_chunks/CustomCard-pj8tTTbU.js +153 -0
  11. package/dist/_chunks/{Emoji-C-LQZ4Z3.js → Emoji-CEoQDS_x.js} +1 -1
  12. package/dist/_chunks/{Emoji-Bm1_vSh5.mjs → Emoji-CSN4sPHu.mjs} +1 -1
  13. package/dist/_chunks/{Heading-BDJqd1Qw.js → Heading-DMpM8l4P.js} +1 -1
  14. package/dist/_chunks/{Heading-BycRob5M.mjs → Heading-DV6F-wwl.mjs} +1 -1
  15. package/dist/_chunks/{HorizontalRule-CJlDmdma.js → HorizontalRule-BkDBP3Sn.js} +1 -1
  16. package/dist/_chunks/{HorizontalRule-CzQCeC3b.mjs → HorizontalRule-duJS5mkv.mjs} +1 -1
  17. package/dist/_chunks/{Iframe-DCBWSb0v.mjs → Iframe-BrjBTqYD.mjs} +1 -1
  18. package/dist/_chunks/{Iframe-Dyn_2cMB.js → Iframe-jTxffChk.js} +1 -1
  19. package/dist/_chunks/{ImagePlaceholder-DtrSuhf_.mjs → ImagePlaceholder-CYDho-h0.mjs} +1 -1
  20. package/dist/_chunks/{ImagePlaceholder-C14kojd5.js → ImagePlaceholder-Da68VBcm.js} +1 -1
  21. package/dist/_chunks/{Italic-BfpKX0KX.mjs → Italic-C0EqNpkt.mjs} +1 -1
  22. package/dist/_chunks/{Italic-DdhVL78v.js → Italic-DxsFIMhE.js} +1 -1
  23. package/dist/_chunks/{Link-DUV5Ybep.mjs → Link-CIkiGBxD.mjs} +1 -1
  24. package/dist/_chunks/{Link-BuYDqSqo.js → Link-u4PGWt-U.js} +1 -1
  25. package/dist/_chunks/{Lists-DsKxj3MD.mjs → Lists-B6BSkd5d.mjs} +1 -1
  26. package/dist/_chunks/{Lists-BKopoFR6.js → Lists-Bv_GF1oJ.js} +1 -1
  27. package/dist/_chunks/{Redo-1mEX1yOd.js → Redo-DUNTAtjb.js} +1 -1
  28. package/dist/_chunks/{Redo-Ca3VQxSe.mjs → Redo-De5pQoO6.mjs} +1 -1
  29. package/dist/_chunks/{SearchAndReplace-DzNdbTWJ.js → SearchAndReplace-DtSE0ubu.js} +1 -1
  30. package/dist/_chunks/{SearchAndReplace-DmU5DlWv.mjs → SearchAndReplace-QP8H8yFv.mjs} +1 -1
  31. package/dist/_chunks/{Strikethrough-BygxCHak.mjs → Strikethrough-BsanR8PL.mjs} +1 -1
  32. package/dist/_chunks/{Strikethrough-DQfR4OFk.js → Strikethrough-DoetuFNk.js} +1 -1
  33. package/dist/_chunks/{Table-DLaqBAbz.js → Table-B5VeLc9S.js} +1 -1
  34. package/dist/_chunks/{Table-BhbZ2Blv.mjs → Table-DevGt3tV.mjs} +1 -1
  35. package/dist/_chunks/{TiptapEditorInput-vfLsCt1p.js → TiptapEditorInput-CArezP4p.js} +96 -30
  36. package/dist/_chunks/{TiptapEditorInput-BDE09h5-.mjs → TiptapEditorInput-ChH1R_k4.mjs} +96 -30
  37. package/dist/_chunks/{Undo-BuT4OkoE.js → Undo-Bp_GQXYz.js} +1 -1
  38. package/dist/_chunks/{Undo-PL5n4axf.mjs → Undo-D7dSauIG.mjs} +1 -1
  39. package/dist/_chunks/{index-ku90UbIF.mjs → index-2RQ7z9sc.mjs} +9 -3
  40. package/dist/_chunks/{index-wYDv8vsJ.js → index-B6IeUCyh.js} +9 -3
  41. package/dist/admin/index.js +1 -1
  42. package/dist/admin/index.mjs +1 -1
  43. package/dist/admin/src/components/editor/partials/ToolbarButtons.d.ts +1 -0
  44. package/dist/admin/src/components/editor/toolbars/CustomCard.d.ts +4 -0
  45. package/dist/admin/src/types.d.ts +1 -1
  46. package/dist/server/index.js +10 -4
  47. package/dist/server/index.mjs +10 -4
  48. package/package.json +2 -2
@@ -1034,11 +1034,17 @@ const colors = styled.css`
1034
1034
  --tiptap-color-body: ${theme.colors.neutral800};
1035
1035
  --tiptap-color-heading: ${theme.colors.neutral900};
1036
1036
  --tiptap-color-muted: ${theme.colors.neutral500};
1037
+ --tiptap-color-muted-2: ${theme.colors.neutral600};
1037
1038
  --tiptap-color-border: ${theme.colors.neutral200};
1038
1039
  --tiptap-color-bg: ${theme.colors.neutral0};
1039
1040
  --tiptap-color-code-bg: ${theme.colors.neutral100};
1040
1041
  --tiptap-color-primary: ${theme.colors.primary600};
1041
1042
  --tiptap-color-ring: ${theme.colors.primary200};
1043
+
1044
+ /* Speaker card helpers */
1045
+ --tiptap-color-danger: ${theme.colors.danger500};
1046
+ --tiptap-color-desc-bg: ${theme.colors.primary700 ?? theme.colors.primary600};
1047
+ --tiptap-color-desc-fg: ${theme.colors.neutral0};
1042
1048
  }
1043
1049
  `}
1044
1050
  `;
@@ -1307,11 +1313,11 @@ const index = {
1307
1313
  * @param app - The Strapi administration application instance.
1308
1314
  */
1309
1315
  async register(app) {
1310
- console.log("Registering Tiptap Editor plugin (tiptap)...");
1316
+ console.log("Registering Tiptap Editor plugin (Tiptap)...");
1311
1317
  app.customFields.register({
1312
1318
  name: "tiptap",
1313
1319
  pluginId: PLUGIN_ID,
1314
- type: "json",
1320
+ type: "richtext",
1315
1321
  intlLabel: {
1316
1322
  id: `${PLUGIN_ID}.tiptap.label`,
1317
1323
  defaultMessage: "Tiptap Editor"
@@ -1322,7 +1328,7 @@ const index = {
1322
1328
  },
1323
1329
  icon: PluginIcon,
1324
1330
  components: {
1325
- Input: async () => Promise.resolve().then(() => require("./TiptapEditorInput-vfLsCt1p.js")).then((n) => n.TiptapEditorInput)
1331
+ Input: async () => Promise.resolve().then(() => require("./TiptapEditorInput-CArezP4p.js")).then((n) => n.TiptapEditorInput)
1326
1332
  },
1327
1333
  options: {
1328
1334
  base: [
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("../_chunks/index-wYDv8vsJ.js");
3
+ const index = require("../_chunks/index-B6IeUCyh.js");
4
4
  exports.default = index.index;
5
5
  exports.defaultTheme = index.clonedDefaultTheme;
6
6
  exports.setPluginConfig = index.setPluginConfig;
@@ -1,4 +1,4 @@
1
- import { i, c, s } from "../_chunks/index-ku90UbIF.mjs";
1
+ import { i, c, s } from "../_chunks/index-2RQ7z9sc.mjs";
2
2
  export {
3
3
  i as default,
4
4
  c as defaultTheme,
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const ToolbarDefinitions: {
3
+ customCard: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("./ToolbarButton").ToolbarButtonProps & import("react").RefAttributes<HTMLButtonElement>>>;
3
4
  heading: import("react").LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
4
5
  bold: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("./ToolbarButton").ToolbarButtonProps & import("react").RefAttributes<HTMLButtonElement>>>;
5
6
  italic: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("./ToolbarButton").ToolbarButtonProps & import("react").RefAttributes<HTMLButtonElement>>>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ToolbarButtonProps } from "../partials/ToolbarButton";
3
+ declare const CustomCardToolbar: import("react").ForwardRefExoticComponent<ToolbarButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
4
+ export { CustomCardToolbar };
@@ -2,7 +2,7 @@
2
2
  import { JSONContent } from "@tiptap/core";
3
3
  import type { InputProps, FieldValue } from '@strapi/strapi/admin';
4
4
  export type TiptapJSONInputProps = Readonly<InputProps & FieldValue & {
5
- value?: JSONContent | JSONContent[] | null;
5
+ value?: string | JSONContent | JSONContent[] | null;
6
6
  labelAction?: React.ReactNode;
7
7
  attribute: {
8
8
  options: {};
@@ -1,10 +1,16 @@
1
1
  "use strict";
2
+ const strapi = {
3
+ name: "tiptap-editor"
4
+ };
5
+ const pluginPkg = {
6
+ strapi
7
+ };
2
8
  const index = {
3
- register: ({ strapi }) => {
4
- strapi.customFields.register({
9
+ register: ({ strapi: strapi2 }) => {
10
+ strapi2.customFields.register({
5
11
  name: "tiptap",
6
- plugin: "tiptap-editor",
7
- type: "json",
12
+ plugin: pluginPkg.strapi.name,
13
+ type: "richtext",
8
14
  inputSize: {
9
15
  default: 12,
10
16
  isResizable: true
@@ -1,9 +1,15 @@
1
+ const strapi = {
2
+ name: "tiptap-editor"
3
+ };
4
+ const pluginPkg = {
5
+ strapi
6
+ };
1
7
  const index = {
2
- register: ({ strapi }) => {
3
- strapi.customFields.register({
8
+ register: ({ strapi: strapi2 }) => {
9
+ strapi2.customFields.register({
4
10
  name: "tiptap",
5
- plugin: "tiptap-editor",
6
- type: "json",
11
+ plugin: pluginPkg.strapi.name,
12
+ type: "richtext",
7
13
  inputSize: {
8
14
  default: 12,
9
15
  isResizable: true
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.1",
2
+ "version": "0.0.2",
3
3
  "keywords": [],
4
4
  "type": "commonjs",
5
5
  "exports": {
@@ -113,4 +113,4 @@
113
113
  },
114
114
  "description": "Tiptap editor for Strapi 5",
115
115
  "license": "MIT"
116
- }
116
+ }