tiptapify 0.3.3 → 0.3.4

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 (35) hide show
  1. package/README.md +1 -0
  2. package/dist/tiptapify.css +1 -1
  3. package/dist/tiptapify.mjs +15750 -15398
  4. package/dist/tiptapify.umd.js +64 -64
  5. package/index.d.ts +95 -0
  6. package/package.json +2 -1
  7. package/src/components/ImageBubbleMenu.vue +16 -7
  8. package/src/components/MenuBubble.vue +45 -7
  9. package/src/components/SkinScope.test.ts +74 -0
  10. package/src/components/SkinScope.vue +18 -0
  11. package/src/components/Tiptapify.skin.test.ts +186 -0
  12. package/src/components/Tiptapify.vue +115 -21
  13. package/src/components/Toolbar/Index.vue +43 -62
  14. package/src/components/Toolbar/Items.test.ts +58 -2
  15. package/src/components/Toolbar/Items.vue +93 -7
  16. package/src/components/UI/TiptapifyDialog.test.ts +132 -0
  17. package/src/components/UI/TiptapifyDialog.vue +90 -40
  18. package/src/composables/useTiptapifyConfig.test.ts +25 -2
  19. package/src/composables/useTiptapifyConfig.ts +21 -2
  20. package/src/constants/defaults.ts +2 -1
  21. package/src/extensions/components/alignment/menu/Button.vue +21 -17
  22. package/src/extensions/components/list/bullet/Button.vue +20 -16
  23. package/src/extensions/components/list/styles/ListStyleButton.vue +25 -25
  24. package/src/extensions/components/style/heading/Button.vue +33 -29
  25. package/src/index.test.ts +88 -0
  26. package/src/index.ts +15 -0
  27. package/src/skins/__fixtures__/skin-baseline.json +805 -0
  28. package/src/skins/builtins.ts +81 -0
  29. package/src/skins/menu.css +87 -0
  30. package/src/skins/menu.ts +10 -0
  31. package/src/skins/registry.test.ts +180 -0
  32. package/src/skins/registry.ts +132 -0
  33. package/src/skins/tokens.reachability.test.ts +43 -0
  34. package/src/skins/tokens.ts +92 -0
  35. package/src/types/editor.ts +99 -0
@@ -11,6 +11,105 @@ export type variantFieldTypes = 'outlined' | 'plain' | 'filled' | 'solo' | 'solo
11
11
 
12
12
  export type TiptapifyFooterAlignment = 'start' | 'center' | 'end'
13
13
 
14
+ // The skin of the editor chrome: 'default' is the classic look, 'pastel' is the quiet 0.3.3 look
15
+ export type TiptapifySkin = 'default' | 'pastel'
16
+
17
+ // Structural variants a token cannot express (component markup, vuetify prop bindings).
18
+ // The shape decides which skin rule sets apply; the tokens paint them.
19
+ export type TiptapifyShape = {
20
+ // VToolbar elevation 1 + no inner hairline vs flat + tinted bar
21
+ toolbar?: 'raised' | 'flat'
22
+ // toolbar sections as raised boxes vs plain flex runs
23
+ groups?: 'box' | 'flat'
24
+ // native vuetify buttons vs ghost buttons with a neutral pressed state
25
+ buttons?: 'vuetify' | 'quiet'
26
+ // bubble menu: VCard + divided VBtnGroup vs flat row of quiet buttons
27
+ bubble?: 'card' | 'flat'
28
+ // divider under the title, elevated close, field defaults vs soft card, text close, outlined defaults
29
+ dialog?: 'classic' | 'soft'
30
+ // dropdown menus: vuetify list vs the light padded card
31
+ menu?: 'vuetify' | 'soft'
32
+ }
33
+
34
+ // The shape after resolution: every key set (missing keys fall back to classic)
35
+ export type ResolvedShape = Required<TiptapifyShape>
36
+
37
+ export type TiptapifySkinColors = {
38
+ toolbarBg: string
39
+ toolbarBorderBottom: string
40
+ toolbarFg: string
41
+ groupBg: string
42
+ groupShadow: string
43
+ dividerColor: string
44
+ buttonFg: string
45
+ buttonHoverBg: string
46
+ buttonHoverFg: string
47
+ buttonActiveBg: string
48
+ buttonActiveHoverBg: string
49
+ bubbleBg: string
50
+ bubbleBorder: string
51
+ bubbleShadow: string
52
+ menuBorder: string
53
+ menuShadow: string
54
+ menuItemActiveBg: string
55
+ dialogShadow: string
56
+ frameBg: string
57
+ frameShadow: string
58
+ frameBorder: string
59
+ imageBg: string
60
+ imageOutline: string
61
+ imageOutlineHover: string
62
+ handleBg: string
63
+ handleBgHover: string
64
+ handleBorder: string
65
+ handleShadow: string
66
+ }
67
+
68
+ export type TiptapifySkinMetrics = {
69
+ itemsPadding: string
70
+ itemsGap: string
71
+ itemsRowGap: string
72
+ groupGap: string
73
+ groupHeight: string
74
+ groupRadius: string
75
+ dividerWidth: string
76
+ dividerHeight: string
77
+ buttonRadius: string
78
+ bubbleRadius: string
79
+ bubblePadding: string
80
+ bubbleGap: string
81
+ menuListPadding: string
82
+ menuRadius: string
83
+ menuItemRadius: string
84
+ menuItemPadding: string
85
+ menuItemMinHeight: string
86
+ dialogRadius: string
87
+ dialogHeaderPadding: string
88
+ dialogContentPadding: string
89
+ dialogActionsPadding: string
90
+ dialogTitleSize: string
91
+ dialogTitleWeight: string
92
+ dialogFieldRadius: string
93
+ dialogActionBtnMinHeight: string
94
+ dialogActionBtnRadius: string
95
+ dialogGridGap: string
96
+ imageRadius: string
97
+ handleRadius: string
98
+ }
99
+
100
+ // A skin as data: token overrides + shape flags, inheriting from a registered skin
101
+ export type TiptapifySkinConfig = TiptapifyShape & {
102
+ name?: string
103
+ // registered skin name; implicit 'default'
104
+ extends?: string
105
+ colors?: Partial<TiptapifySkinColors>
106
+ metrics?: Partial<TiptapifySkinMetrics>
107
+ }
108
+
109
+ // The `skin` prop: a registered name (string) or an inline object; inline objects
110
+ // resolve through the same chain and never enter the global registry
111
+ export type TiptapifySkinInput = string | TiptapifySkinConfig
112
+
14
113
  export type TiptapifyAiMode = 'insert' | 'replace' | 'append'
15
114
 
16
115
  export type TiptapifyAiPromptExample = {