@bigfootai/bigfoot-types 3.7.9 → 3.7.11

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 (3) hide show
  1. package/editor.js +8 -6
  2. package/editor.ts +5 -6
  3. package/package.json +1 -1
package/editor.js CHANGED
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.bigfootSchema = void 0;
4
7
  const prosemirror_model_1 = require("prosemirror-model");
5
8
  const prosemirror_schema_basic_1 = require("prosemirror-schema-basic");
6
9
  const prosemirror_schema_list_1 = require("prosemirror-schema-list");
10
+ const orderedmap_1 = __importDefault(require("orderedmap"));
7
11
  const tag = {
8
12
  attrs: {
9
13
  tagId: { default: null },
@@ -85,10 +89,8 @@ exports.bigfootSchema = new prosemirror_model_1.Schema({
85
89
  nodes: (0, prosemirror_schema_list_1.addListNodes)(prosemirror_schema_basic_1.schema.spec.nodes, 'paragraph block*', 'block')
86
90
  .addToEnd('checklist', checklist)
87
91
  .addToEnd('checklistItem', checklistItem),
88
- //@ts-expect-error Not sure why this is throwing an error, but will revisit
89
- marks: {
90
- ...prosemirror_schema_basic_1.schema.spec.marks,
91
- tag,
92
- strong,
93
- },
92
+ marks: orderedmap_1.default
93
+ .from(prosemirror_schema_basic_1.schema.spec.marks)
94
+ .addToEnd('tag', tag)
95
+ .addToEnd('strong', strong),
94
96
  });
package/editor.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { MarkSpec, NodeSpec, Schema } from 'prosemirror-model';
2
2
  import { schema } from 'prosemirror-schema-basic';
3
3
  import { addListNodes } from 'prosemirror-schema-list';
4
+ import orderedMap from 'orderedmap';
4
5
 
5
6
  const tag: MarkSpec = {
6
7
  attrs: {
@@ -97,10 +98,8 @@ export const bigfootSchema = new Schema({
97
98
  nodes: addListNodes(schema.spec.nodes, 'paragraph block*', 'block')
98
99
  .addToEnd('checklist', checklist)
99
100
  .addToEnd('checklistItem', checklistItem),
100
- //@ts-expect-error Not sure why this is throwing an error, but will revisit
101
- marks: {
102
- ...schema.spec.marks,
103
- tag,
104
- strong,
105
- },
101
+ marks: orderedMap
102
+ .from(schema.spec.marks)
103
+ .addToEnd('tag', tag)
104
+ .addToEnd('strong', strong),
106
105
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "3.7.9",
4
+ "version": "3.7.11",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",