@ditojs/admin 2.36.2 → 2.38.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/admin",
3
- "version": "2.36.2",
3
+ "version": "2.38.0",
4
4
  "type": "module",
5
5
  "description": "Dito.js Admin is a schema based admin interface for Dito.js Server, featuring auto-generated views and forms and built with Vue.js",
6
6
  "repository": "https://github.com/ditojs/dito/tree/master/packages/admin",
@@ -39,54 +39,55 @@
39
39
  "not ie_mob > 0"
40
40
  ],
41
41
  "dependencies": {
42
- "@ditojs/ui": "^2.36.2",
43
- "@ditojs/utils": "^2.36.0",
44
- "@kyvg/vue3-notification": "^3.4.0",
42
+ "@ditojs/ui": "^2.38.0",
43
+ "@ditojs/utils": "^2.38.0",
44
+ "@kyvg/vue3-notification": "^3.4.1",
45
45
  "@lk77/vue3-color": "^3.0.6",
46
- "@tiptap/core": "^2.9.1",
47
- "@tiptap/extension-blockquote": "^2.9.1",
48
- "@tiptap/extension-bold": "^2.9.1",
49
- "@tiptap/extension-bullet-list": "^2.9.1",
50
- "@tiptap/extension-code": "^2.9.1",
51
- "@tiptap/extension-code-block": "^2.9.1",
52
- "@tiptap/extension-document": "^2.9.1",
53
- "@tiptap/extension-hard-break": "^2.9.1",
54
- "@tiptap/extension-heading": "^2.9.1",
55
- "@tiptap/extension-history": "^2.9.1",
56
- "@tiptap/extension-horizontal-rule": "^2.9.1",
57
- "@tiptap/extension-italic": "^2.9.1",
58
- "@tiptap/extension-link": "^2.9.1",
59
- "@tiptap/extension-list-item": "^2.9.1",
60
- "@tiptap/extension-ordered-list": "^2.9.1",
61
- "@tiptap/extension-paragraph": "^2.9.1",
62
- "@tiptap/extension-strike": "^2.9.1",
63
- "@tiptap/extension-subscript": "^2.9.1",
64
- "@tiptap/extension-superscript": "^2.9.1",
65
- "@tiptap/extension-text": "^2.9.1",
66
- "@tiptap/extension-text-style": "^2.9.1",
67
- "@tiptap/extension-underline": "^2.9.1",
68
- "@tiptap/pm": "^2.9.1",
69
- "@tiptap/vue-3": "^2.9.1",
70
- "@vueuse/integrations": "^11.1.0",
46
+ "@tiptap/core": "^2.10.2",
47
+ "@tiptap/extension-blockquote": "^2.10.2",
48
+ "@tiptap/extension-bold": "^2.10.2",
49
+ "@tiptap/extension-bullet-list": "^2.10.2",
50
+ "@tiptap/extension-code": "^2.10.2",
51
+ "@tiptap/extension-code-block": "^2.10.2",
52
+ "@tiptap/extension-document": "^2.10.2",
53
+ "@tiptap/extension-hard-break": "^2.10.2",
54
+ "@tiptap/extension-heading": "^2.10.2",
55
+ "@tiptap/extension-history": "^2.10.2",
56
+ "@tiptap/extension-horizontal-rule": "^2.10.2",
57
+ "@tiptap/extension-italic": "^2.10.2",
58
+ "@tiptap/extension-link": "^2.10.2",
59
+ "@tiptap/extension-list-item": "^2.10.2",
60
+ "@tiptap/extension-ordered-list": "^2.10.2",
61
+ "@tiptap/extension-paragraph": "^2.10.2",
62
+ "@tiptap/extension-strike": "^2.10.2",
63
+ "@tiptap/extension-subscript": "^2.10.2",
64
+ "@tiptap/extension-superscript": "^2.10.2",
65
+ "@tiptap/extension-text": "^2.10.2",
66
+ "@tiptap/extension-text-style": "^2.10.2",
67
+ "@tiptap/extension-underline": "^2.10.2",
68
+ "@tiptap/pm": "^2.10.2",
69
+ "@tiptap/vue-3": "^2.10.2",
70
+ "@vueuse/integrations": "^11.3.0",
71
71
  "codeflask": "^1.4.1",
72
72
  "filesize": "^10.1.6",
73
73
  "filesize-parser": "^1.5.1",
74
- "focus-trap": "^7.6.0",
75
- "nanoid": "^5.0.7",
76
- "sortablejs": "^1.15.3",
74
+ "focus-trap": "^7.6.2",
75
+ "nanoid": "^5.0.8",
76
+ "sortablejs": "^1.15.4",
77
77
  "tinycolor2": "^1.6.0",
78
78
  "tippy.js": "^6.3.7",
79
- "type-fest": "^4.26.1",
80
- "vue": "^3.5.12",
79
+ "tiptap-footnotes": "^2.0.3",
80
+ "type-fest": "^4.28.0",
81
+ "vue": "^3.5.13",
81
82
  "vue-multiselect": "^3.1.0",
82
83
  "vue-router": "^4.4.5",
83
84
  "vue-upload-component": "^3.1.17"
84
85
  },
85
86
  "devDependencies": {
86
- "@ditojs/build": "^2.36.2",
87
- "typescript": "^5.6.3",
88
- "vite": "^5.4.10"
87
+ "@ditojs/build": "^2.38.0",
88
+ "typescript": "^5.7.2",
89
+ "vite": "^5.4.11"
89
90
  },
90
91
  "types": "types",
91
- "gitHead": "1fe383dfcdd9f856f324450d60c081be51071cf9"
92
+ "gitHead": "5e64e0bf42e2a526e58c10710ddb2ae14288ffae"
92
93
  }
@@ -3,17 +3,15 @@
3
3
  display: flex;
4
4
 
5
5
  > * {
6
- flex: 1 0 auto;
6
+ flex: 0 0 auto;
7
7
  display: flex;
8
8
  }
9
9
  }
10
10
 
11
- .dito-layout-vertical {
12
- flex-direction: column;
11
+ .dito-layout-horizontal {
12
+ gap: $form-spacing;
13
13
  }
14
14
 
15
- .dito-layout-horizontal {
16
- > :not(:first-child) {
17
- padding-left: $form-spacing;
18
- }
15
+ .dito-layout-vertical {
16
+ flex-direction: column;
19
17
  }
@@ -52,6 +52,8 @@ import { HorizontalRule } from '@tiptap/extension-horizontal-rule'
52
52
  import { OrderedList } from '@tiptap/extension-ordered-list'
53
53
  import { BulletList } from '@tiptap/extension-bullet-list'
54
54
  import { ListItem } from '@tiptap/extension-list-item'
55
+ // Footnotes:
56
+ import { Footnotes, FootnoteReference, Footnote } from 'tiptap-footnotes'
55
57
  // TODO:
56
58
  // import { Image } from '@tiptap/extension-image'
57
59
  // import { Mention } from '@tiptap/extension-mention'
@@ -139,7 +141,10 @@ export default DitoTypeComponent.register('markup', {
139
141
  toolButtons() {
140
142
  return this.getButtons('tools', {
141
143
  undo: true,
142
- redo: true
144
+ redo: true,
145
+ footnotes: {
146
+ command: 'addFootnote'
147
+ }
143
148
  })
144
149
  },
145
150
 
@@ -341,7 +346,10 @@ export default DitoTypeComponent.register('markup', {
341
346
  } = this.schema
342
347
  return [
343
348
  // Essentials:
344
- Document,
349
+ tools.footnotes
350
+ ? Document.extend({ content: 'block+ footnotes?' })
351
+ : Document,
352
+
345
353
  Text,
346
354
  Paragraph, // button can be controlled, but node needs to be on.
347
355
 
@@ -364,6 +372,10 @@ export default DitoTypeComponent.register('markup', {
364
372
  (nodes.orderedList || nodes.bulletList) && ListItem,
365
373
  nodes.bulletList && BulletList,
366
374
  nodes.orderedList && OrderedList,
375
+
376
+ // Footnotes:
377
+ ...(tools.footnotes ? [Footnotes, Footnote, FootnoteReference] : []),
378
+
367
379
  // TODO:
368
380
  // nodes.todoList && TodoItem,
369
381
  // nodes.todoList && TodoList,
@@ -625,12 +637,23 @@ const LinkWithTitle = Link.extend({
625
637
 
626
638
  blockquote {
627
639
  border-left: 3px solid $color-lighter;
628
- padding-left: 1rem;
640
+ padding-left: 1em;
629
641
  font-style: italic;
630
642
 
631
643
  p {
632
644
  margin: 0;
633
645
  }
634
646
  }
647
+
648
+ ol.footnotes {
649
+ margin-top: 1em;
650
+ padding: 1em 0;
651
+ list-style-type: decimal;
652
+ padding-left: 2em;
653
+
654
+ &:has(li) {
655
+ border-top: 1px solid $color-light;
656
+ }
657
+ }
635
658
  }
636
659
  </style>