@lowdefy/blocks-tiptap 0.0.0-experimental-20260428103147

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.
@@ -0,0 +1,128 @@
1
+ /* Wrapper: the EditorContent div with border/background/focus styling.
2
+ Antd v6 uses CSS-in-JS so the `.ant-input` class is not a global
3
+ stylesheet class — we replicate the input look using antd's theme
4
+ CSS variables (--ant-color-*, --ant-border-radius) so the block
5
+ tracks the active theme without depending on cssinjs. */
6
+ :global(.tiptap-wrapper) {
7
+ border: 1px solid var(--ant-color-border, #d9d9d9);
8
+ border-radius: var(--ant-border-radius, 6px);
9
+ background: var(--ant-color-bg-container, #fff);
10
+ color: var(--ant-color-text, rgba(0, 0, 0, 0.88));
11
+ transition:
12
+ border-color 0.2s,
13
+ box-shadow 0.2s,
14
+ background 0.2s;
15
+ padding: 0;
16
+ }
17
+
18
+ :global(.tiptap-wrapper):hover {
19
+ border-color: var(--ant-color-primary-hover, #4096ff);
20
+ }
21
+
22
+ :global(.tiptap-wrapper):focus-within {
23
+ border-color: var(--ant-color-primary, #1677ff);
24
+ box-shadow: 0 0 0 2px var(--ant-color-primary-bg, rgba(22, 119, 255, 0.1));
25
+ outline: none;
26
+ }
27
+
28
+ :global(.tiptap-wrapper-borderless) {
29
+ border-color: transparent;
30
+ background: transparent;
31
+ }
32
+
33
+ :global(.tiptap-wrapper-borderless):hover,
34
+ :global(.tiptap-wrapper-borderless):focus-within {
35
+ border-color: transparent;
36
+ box-shadow: none;
37
+ }
38
+
39
+ :global(.tiptap-wrapper-error) {
40
+ border-color: var(--ant-color-error, #ff4d4f);
41
+ }
42
+
43
+ :global(.tiptap-wrapper-error):hover {
44
+ border-color: var(--ant-color-error-hover, var(--ant-color-error, #ff4d4f));
45
+ }
46
+
47
+ :global(.tiptap-wrapper-error):focus-within {
48
+ border-color: var(--ant-color-error, #ff4d4f);
49
+ box-shadow: 0 0 0 2px var(--ant-color-error-bg, rgba(255, 77, 79, 0.1));
50
+ }
51
+
52
+ :global(.tiptap-wrapper-warning) {
53
+ border-color: var(--ant-color-warning, #faad14);
54
+ }
55
+
56
+ :global(.tiptap-wrapper-warning):hover {
57
+ border-color: var(--ant-color-warning-hover, var(--ant-color-warning, #faad14));
58
+ }
59
+
60
+ :global(.tiptap-wrapper-warning):focus-within {
61
+ border-color: var(--ant-color-warning, #faad14);
62
+ box-shadow: 0 0 0 2px var(--ant-color-warning-bg, rgba(250, 173, 20, 0.1));
63
+ }
64
+
65
+ :global(.tiptap-wrapper-disabled) {
66
+ background: var(--ant-color-bg-container-disabled, rgba(0, 0, 0, 0.04));
67
+ color: var(--ant-color-text-disabled, rgba(0, 0, 0, 0.25));
68
+ cursor: not-allowed;
69
+ }
70
+
71
+ :global(.tiptap-wrapper-disabled):hover {
72
+ border-color: var(--ant-color-border, #d9d9d9);
73
+ }
74
+
75
+ :global(.tiptap-wrapper-disabled) :global(.tiptap.ProseMirror) {
76
+ cursor: not-allowed;
77
+ }
78
+
79
+ /* ProseMirror editable — sits inside the wrapper. */
80
+ :global(.tiptap.ProseMirror) {
81
+ padding: 8px;
82
+ outline: none;
83
+ }
84
+
85
+ :global(.tiptap) :global(p) {
86
+ margin: 0;
87
+ }
88
+
89
+ :global(.tiptap) :global(p.is-editor-empty):first-child::before {
90
+ color: var(--ant-color-text-placeholder, rgba(0, 0, 0, 0.25));
91
+ content: attr(data-placeholder);
92
+ float: left;
93
+ height: 0;
94
+ pointer-events: none;
95
+ }
96
+
97
+ :global(.tiptap-popover) {
98
+ background: rgba(0, 0, 0, 0.85);
99
+ color: var(--ant-color-text-light-solid, #fff);
100
+ border-radius: var(--ant-border-radius, 8px);
101
+ padding: 4px;
102
+ margin: -4px;
103
+ display: flex;
104
+ }
105
+
106
+ :global(.tiptap-icon) {
107
+ border-radius: var(--ant-border-radius-sm, 4px);
108
+ display: flex;
109
+ width: 16px;
110
+ height: 16px;
111
+ justify-content: center;
112
+ align-items: center;
113
+ color: var(--ant-color-text-light-solid, #fff);
114
+ }
115
+
116
+ :global(.tiptap-icon.disabled) {
117
+ pointer-events: none;
118
+ }
119
+
120
+ :global(.tiptap-icon):hover {
121
+ background: var(--ant-color-icon-hover, rgba(0, 0, 0, 0.75));
122
+ color: var(--ant-color-text-light-solid, #fff);
123
+ cursor: pointer;
124
+ }
125
+
126
+ :global(.tiptap-icon) + :global(.tiptap-icon) {
127
+ margin-left: 4px;
128
+ }
package/dist/blocks.js ADDED
@@ -0,0 +1,16 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export { default as TiptapInput } from './blocks/TiptapInput/TiptapInput.js';
16
+ export { default as TiptapMentionInput } from './blocks/TiptapMentionInput/TiptapMentionInput.js';
package/dist/e2e.js ADDED
@@ -0,0 +1,16 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export { default as TiptapInput } from './blocks/TiptapInput/e2e.js';
16
+ export { default as TiptapMentionInput } from './blocks/TiptapMentionInput/e2e.js';
package/dist/metas.js ADDED
@@ -0,0 +1,16 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export { default as TiptapInput } from './blocks/TiptapInput/meta.js';
16
+ export { default as TiptapMentionInput } from './blocks/TiptapMentionInput/meta.js';
package/dist/types.js ADDED
@@ -0,0 +1,17 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { extractBlockTypes } from '@lowdefy/block-utils';
16
+ import * as metas from './metas.js';
17
+ export default extractBlockTypes(metas);
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@lowdefy/blocks-tiptap",
3
+ "version": "0.0.0-experimental-20260428103147",
4
+ "license": "Apache-2.0",
5
+ "description": "Lowdefy TipTap rich-text editor blocks.",
6
+ "homepage": "https://lowdefy.com",
7
+ "keywords": [
8
+ "lowdefy",
9
+ "lowdefy blocks",
10
+ "tiptap",
11
+ "rich-text",
12
+ "wysiwyg",
13
+ "lowdefy plugin"
14
+ ],
15
+ "bugs": {
16
+ "url": "https://github.com/lowdefy/lowdefy/issues"
17
+ },
18
+ "contributors": [
19
+ {
20
+ "name": "Sam Tolmay",
21
+ "url": "https://github.com/SamTolmay"
22
+ },
23
+ {
24
+ "name": "Gerrie van Wyk",
25
+ "url": "https://github.com/Gervwyk"
26
+ }
27
+ ],
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/lowdefy/lowdefy.git"
31
+ },
32
+ "type": "module",
33
+ "exports": {
34
+ "./*": "./dist/*",
35
+ "./blocks": "./dist/blocks.js",
36
+ "./metas": "./dist/metas.js",
37
+ "./e2e": "./dist/e2e.js",
38
+ "./types": "./dist/types.js"
39
+ },
40
+ "files": [
41
+ "dist/*"
42
+ ],
43
+ "dependencies": {
44
+ "@lowdefy/block-utils": "0.0.0-experimental-20260428103147",
45
+ "@lowdefy/blocks-antd": "0.0.0-experimental-20260428103147",
46
+ "@lowdefy/helpers": "0.0.0-experimental-20260428103147",
47
+ "@tiptap/core": "2.27.2",
48
+ "@tiptap/extension-file-handler": "2.27.2",
49
+ "@tiptap/extension-highlight": "2.27.2",
50
+ "@tiptap/extension-image": "2.27.2",
51
+ "@tiptap/extension-link": "2.27.2",
52
+ "@tiptap/extension-mention": "2.27.2",
53
+ "@tiptap/extension-placeholder": "2.27.2",
54
+ "@tiptap/extension-table": "2.27.2",
55
+ "@tiptap/extension-table-cell": "2.27.2",
56
+ "@tiptap/extension-table-header": "2.27.2",
57
+ "@tiptap/extension-table-row": "2.27.2",
58
+ "@tiptap/pm": "2.27.2",
59
+ "@tiptap/react": "2.27.2",
60
+ "@tiptap/starter-kit": "2.27.2",
61
+ "react-icons": "5.6.0",
62
+ "tippy.js": "6.3.7",
63
+ "turndown": "7.2.0"
64
+ },
65
+ "peerDependencies": {
66
+ "react": ">=18",
67
+ "react-dom": ">=18"
68
+ },
69
+ "devDependencies": {
70
+ "@lowdefy/block-dev-e2e": "0.0.0-experimental-20260428103147",
71
+ "@lowdefy/e2e-utils": "0.0.0-experimental-20260428103147",
72
+ "@playwright/test": "1.50.1",
73
+ "@swc/cli": "0.8.0",
74
+ "@swc/core": "1.15.18",
75
+ "copyfiles": "2.4.1"
76
+ },
77
+ "publishConfig": {
78
+ "access": "public"
79
+ },
80
+ "scripts": {
81
+ "build": "swc src --out-dir dist --config-file ../../../../.swcrc --cli-config-file ../../../../.swc-cli.json && pnpm copyfiles",
82
+ "clean": "rm -rf dist",
83
+ "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
84
+ "e2e": "playwright test --config e2e/playwright.config.js",
85
+ "e2e:ui": "playwright test --config e2e/playwright.config.js --ui"
86
+ }
87
+ }