@bigfootai/bigfoot-types 3.8.3 → 3.8.5

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 +9 -9
  2. package/editor.ts +9 -9
  3. package/package.json +2 -2
package/editor.js CHANGED
@@ -48,21 +48,21 @@ const tag = {
48
48
  const checklist = {
49
49
  content: 'checklistItem+',
50
50
  group: 'block',
51
- attrs: { taskListId: { default: (0, uuid_1.v4)() } },
51
+ attrs: { editorGroupId: { default: (0, uuid_1.v4)() } },
52
52
  //@ts-expect-error Not sure why this is throwing an error, but will revisit
53
53
  toDOM: (node) => [
54
54
  'ul',
55
55
  {
56
- 'data-task-parent-id': node?.attrs?.taskListId,
56
+ 'data-editor-group-id': node?.attrs?.editorGroupId,
57
57
  },
58
58
  0,
59
59
  ],
60
60
  parseDOM: [
61
61
  {
62
- tag: 'ul.checklist[data-task-parent-id]',
62
+ tag: 'ul.checklist[data-editor-group-id]',
63
63
  getAttrs(dom) {
64
64
  return {
65
- taskListId: dom.getAttribute('data-tag-id'),
65
+ editorGroupId: dom.getAttribute('data-editor-group-id'),
66
66
  };
67
67
  },
68
68
  },
@@ -70,14 +70,14 @@ const checklist = {
70
70
  };
71
71
  const checklistItem = {
72
72
  content: 'text*',
73
- attrs: { checked: { default: false }, taskId: { default: (0, uuid_1.v4)() } },
73
+ attrs: { checked: { default: false }, editorId: { default: (0, uuid_1.v4)() } },
74
74
  //@ts-expect-error Not sure why this is throwing an error, but will revisit
75
75
  toDOM: (node) => [
76
76
  [
77
77
  'li',
78
78
  {
79
79
  'data-checked': node?.attrs?.checked ? true : false,
80
- 'data-task-id': node?.attrs?.taskId,
80
+ 'data-editor-id': node?.attrs?.editorId,
81
81
  },
82
82
  ],
83
83
  [
@@ -92,11 +92,11 @@ const checklistItem = {
92
92
  ],
93
93
  parseDOM: [
94
94
  {
95
- tag: 'li[data-checked][data-task-id]',
95
+ tag: 'li[data-checked][data-editor-id]',
96
96
  getAttrs(dom) {
97
97
  return {
98
- checked: dom.getAttribute('data-checked') === 'true',
99
- taskId: dom.getAttribute('data-task-id'),
98
+ checked: dom.getAttribute('data-checked'),
99
+ editorId: dom.getAttribute('data-editor-id'),
100
100
  };
101
101
  },
102
102
  },
package/editor.ts CHANGED
@@ -53,21 +53,21 @@ const tag: MarkSpec = {
53
53
  const checklist: NodeSpec = {
54
54
  content: 'checklistItem+',
55
55
  group: 'block',
56
- attrs: { taskListId: { default: uuidv4() } },
56
+ attrs: { editorGroupId: { default: uuidv4() } },
57
57
  //@ts-expect-error Not sure why this is throwing an error, but will revisit
58
58
  toDOM: (node: NodeSpec) => [
59
59
  'ul',
60
60
  {
61
- 'data-task-parent-id': node?.attrs?.taskListId,
61
+ 'data-editor-group-id': node?.attrs?.editorGroupId,
62
62
  },
63
63
  0,
64
64
  ],
65
65
  parseDOM: [
66
66
  {
67
- tag: 'ul.checklist[data-task-parent-id]',
67
+ tag: 'ul.checklist[data-editor-group-id]',
68
68
  getAttrs(dom: HTMLElement) {
69
69
  return {
70
- taskListId: dom.getAttribute('data-tag-id'),
70
+ editorGroupId: dom.getAttribute('data-editor-group-id'),
71
71
  };
72
72
  },
73
73
  },
@@ -76,14 +76,14 @@ const checklist: NodeSpec = {
76
76
 
77
77
  const checklistItem: NodeSpec = {
78
78
  content: 'text*',
79
- attrs: { checked: { default: false }, taskId: { default: uuidv4() } },
79
+ attrs: { checked: { default: false }, editorId: { default: uuidv4() } },
80
80
  //@ts-expect-error Not sure why this is throwing an error, but will revisit
81
81
  toDOM: (node: NodeSpec) => [
82
82
  [
83
83
  'li',
84
84
  {
85
85
  'data-checked': node?.attrs?.checked ? true : false,
86
- 'data-task-id': node?.attrs?.taskId,
86
+ 'data-editor-id': node?.attrs?.editorId,
87
87
  },
88
88
  ],
89
89
  [
@@ -98,11 +98,11 @@ const checklistItem: NodeSpec = {
98
98
  ],
99
99
  parseDOM: [
100
100
  {
101
- tag: 'li[data-checked][data-task-id]',
101
+ tag: 'li[data-checked][data-editor-id]',
102
102
  getAttrs(dom: HTMLElement) {
103
103
  return {
104
- checked: dom.getAttribute('data-checked') === 'true',
105
- taskId: dom.getAttribute('data-task-id'),
104
+ checked: dom.getAttribute('data-checked'),
105
+ editorId: dom.getAttribute('data-editor-id'),
106
106
  };
107
107
  },
108
108
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "3.8.3",
4
+ "version": "3.8.5",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "orderedmap": "^2.1.1",
18
- "prosemirror-model": "^1.19.4",
18
+ "prosemirror-model": "^1.19.3",
19
19
  "prosemirror-schema-basic": "^1.2.2",
20
20
  "prosemirror-schema-list": "^1.3.0",
21
21
  "uuid": "^9.0.1"