@liveblocks/react-tiptap 0.0.1 → 2.8.3-tiptap2
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/dist/LiveblocksExtension.js +206 -0
- package/dist/LiveblocksExtension.js.map +1 -0
- package/dist/LiveblocksExtension.mjs +204 -0
- package/dist/LiveblocksExtension.mjs.map +1 -0
- package/dist/classnames.js +8 -0
- package/dist/classnames.js.map +1 -0
- package/dist/classnames.mjs +6 -0
- package/dist/classnames.mjs.map +1 -0
- package/dist/comments/AnchoredThreads.js +178 -0
- package/dist/comments/AnchoredThreads.js.map +1 -0
- package/dist/comments/AnchoredThreads.mjs +176 -0
- package/dist/comments/AnchoredThreads.mjs.map +1 -0
- package/dist/comments/CommentsExtension.js +224 -0
- package/dist/comments/CommentsExtension.js.map +1 -0
- package/dist/comments/CommentsExtension.mjs +222 -0
- package/dist/comments/CommentsExtension.mjs.map +1 -0
- package/dist/comments/FloatingComposer.js +100 -0
- package/dist/comments/FloatingComposer.js.map +1 -0
- package/dist/comments/FloatingComposer.mjs +97 -0
- package/dist/comments/FloatingComposer.mjs.map +1 -0
- package/dist/comments/FloatingThreads.js +159 -0
- package/dist/comments/FloatingThreads.js.map +1 -0
- package/dist/comments/FloatingThreads.mjs +156 -0
- package/dist/comments/FloatingThreads.mjs.map +1 -0
- package/dist/index.d.mts +78 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -0
- package/dist/mentions/Avatar.js +53 -0
- package/dist/mentions/Avatar.js.map +1 -0
- package/dist/mentions/Avatar.mjs +51 -0
- package/dist/mentions/Avatar.mjs.map +1 -0
- package/dist/mentions/Mention.js +24 -0
- package/dist/mentions/Mention.js.map +1 -0
- package/dist/mentions/Mention.mjs +22 -0
- package/dist/mentions/Mention.mjs.map +1 -0
- package/dist/mentions/MentionExtension.js +222 -0
- package/dist/mentions/MentionExtension.js.map +1 -0
- package/dist/mentions/MentionExtension.mjs +220 -0
- package/dist/mentions/MentionExtension.mjs.map +1 -0
- package/dist/mentions/MentionsList.js +123 -0
- package/dist/mentions/MentionsList.js.map +1 -0
- package/dist/mentions/MentionsList.mjs +119 -0
- package/dist/mentions/MentionsList.mjs.map +1 -0
- package/dist/types.js +33 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +24 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils.js +47 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +43 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/version-history/HistoryVersionPreview.js +79 -0
- package/dist/version-history/HistoryVersionPreview.js.map +1 -0
- package/dist/version-history/HistoryVersionPreview.mjs +77 -0
- package/dist/version-history/HistoryVersionPreview.mjs.map +1 -0
- package/dist/version.js +10 -0
- package/dist/version.js.map +1 -0
- package/dist/version.mjs +6 -0
- package/dist/version.mjs.map +1 -0
- package/package.json +77 -1
- package/src/styles/constants.css +9 -0
- package/src/styles/index.css +250 -0
- package/src/styles/utils.css +6 -0
- package/styles.css +1 -0
- package/styles.css.d.ts +1 -0
- package/styles.css.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HistoryVersionPreview.mjs","sources":["../../src/version-history/HistoryVersionPreview.tsx"],"sourcesContent":["import type { HistoryVersion } from \"@liveblocks/core\";\nimport { useHistoryVersionData } from \"@liveblocks/react\";\nimport { useOverrides } from \"@liveblocks/react-ui\";\nimport {\n Button,\n List,\n RestoreIcon,\n SpinnerIcon,\n User,\n} from \"@liveblocks/react-ui/_private\";\nimport type { Content, Editor } from \"@tiptap/react\";\nimport { EditorContent, useEditor } from \"@tiptap/react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport React, {\n forwardRef,\n useCallback,\n useEffect,\n} from \"react\";\nimport { yXmlFragmentToProseMirrorRootNode } from \"y-prosemirror\";\nimport { applyUpdate, Doc } from \"yjs\";\n\nimport { classNames } from \"../classnames\";\n\nconst AUTHORS_TRUNCATE = 3;\n\nexport interface HistoryVersionPreviewProps\n extends ComponentPropsWithoutRef<\"div\"> {\n version: HistoryVersion;\n editor: Editor;\n onVersionRestore?: (version: HistoryVersion) => void;\n}\n\n/**\n * Displays a specific version of the current TipTap document.\n *\n * @example\n * <HistoryVersionPreview version={version} />\n */\nexport const HistoryVersionPreview = forwardRef<\n HTMLDivElement,\n HistoryVersionPreviewProps\n>(({ version, editor: parentEditor, onVersionRestore, className, ...props }, forwardedRef) => {\n const $ = useOverrides();\n const { isLoading, data, error } = useHistoryVersionData(version.id);\n\n const previewEditor = useEditor({\n // ignore extensions, only get marks/nodes\n editable: false,\n extensions: parentEditor.extensionManager.extensions.filter((e) => e.type !== \"extension\"),\n });\n useEffect(() => {\n if (data && previewEditor) {\n const doc = new Doc();\n applyUpdate(doc, data);\n const root = doc.getXmlFragment(\"default\") // TODO: lookup field\n const node = yXmlFragmentToProseMirrorRootNode(root, parentEditor.schema);\n previewEditor.commands.setContent(node.toJSON() as Content)\n }\n }, [data, previewEditor, parentEditor]);\n const restore = useCallback(() => {\n parentEditor.commands.setContent(previewEditor?.getJSON() ?? \"\");\n onVersionRestore?.(version);\n }, [onVersionRestore, parentEditor, previewEditor, version]);\n\n return (\n <div\n {...props}\n className={classNames(\n \"lb-root lb-history-version-preview lb-tiptap-version-preview\",\n className\n )}\n ref={forwardedRef}\n >\n {isLoading ? (\n <div className=\"lb-loading lb-history-version-preview-loading\">\n <SpinnerIcon />\n </div>\n ) : error ? (\n <div className=\"lb-error lb-history-version-preview-error\">\n {$.HISTORY_VERSION_PREVIEW_ERROR(error)}\n </div>\n ) : (\n <div className=\"lb-history-version-preview-content lb-tiptap-editor-container lb-tiptap-version-preview-editor-container\">\n\n <EditorContent editor={previewEditor} />\n </div>\n )}\n <div className=\"lb-history-version-preview-footer\">\n <span className=\"lb-history-version-preview-authors\">\n {$.HISTORY_VERSION_PREVIEW_AUTHORS_LIST(\n <List\n values={version.authors.map((author) => (\n <User key={author.id} userId={author.id} replaceSelf />\n ))}\n formatRemaining={$.LIST_REMAINING_USERS}\n truncate={AUTHORS_TRUNCATE}\n locale={$.locale}\n />\n )}\n </span>\n <div className=\"lb-history-version-preview-actions\">\n <Button\n onClick={restore}\n disabled={!data}\n variant=\"primary\"\n size=\"large\"\n className=\"lb-history-version-preview-action\"\n >\n <RestoreIcon className=\"lb-button-icon\" />\n <span className=\"lb-button-label\">\n {$.HISTORY_VERSION_PREVIEW_RESTORE}\n </span>\n </Button>\n </div>\n </div>\n </div>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;AAuBA,MAAM,gBAAmB,GAAA,CAAA,CAAA;AAeZ,MAAA,qBAAA,GAAwB,UAGnC,CAAA,CAAC,EAAE,OAAA,EAAS,MAAQ,EAAA,YAAA,EAAc,gBAAkB,EAAA,SAAA,EAAA,GAAc,KAAM,EAAA,EAAG,YAAiB,KAAA;AAC5F,EAAA,MAAM,IAAI,YAAa,EAAA,CAAA;AACvB,EAAA,MAAM,EAAE,SAAW,EAAA,IAAA,EAAM,OAAU,GAAA,qBAAA,CAAsB,QAAQ,EAAE,CAAA,CAAA;AAEnE,EAAA,MAAM,gBAAgB,SAAU,CAAA;AAAA,IAE9B,QAAU,EAAA,KAAA;AAAA,IACV,UAAA,EAAY,aAAa,gBAAiB,CAAA,UAAA,CAAW,OAAO,CAAC,CAAA,KAAM,CAAE,CAAA,IAAA,KAAS,WAAW,CAAA;AAAA,GAC1F,CAAA,CAAA;AACD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,QAAQ,aAAe,EAAA;AACzB,MAAM,MAAA,GAAA,GAAM,IAAI,GAAI,EAAA,CAAA;AACpB,MAAA,WAAA,CAAY,KAAK,IAAI,CAAA,CAAA;AACrB,MAAM,MAAA,IAAA,GAAO,GAAI,CAAA,cAAA,CAAe,SAAS,CAAA,CAAA;AACzC,MAAA,MAAM,IAAO,GAAA,iCAAA,CAAkC,IAAM,EAAA,Y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+
const PKG_FORMAT = typeof "cjs" === "string" && "cjs";
|
|
6
|
+
|
|
7
|
+
exports.PKG_FORMAT = PKG_FORMAT;
|
|
8
|
+
exports.PKG_NAME = PKG_NAME;
|
|
9
|
+
exports.PKG_VERSION = PKG_VERSION;
|
|
10
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../src/version.ts"],"sourcesContent":["declare const __VERSION__: string;\ndeclare const ROLLUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react-tiptap\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof ROLLUP_FORMAT === \"string\" && ROLLUP_FORMAT;\n"],"names":[],"mappings":";;AAGO,MAAM,QAAW,GAAA,2BAAA;AACX,MAAA,WAAA,GAAc,OAAO,eAAA,KAAgB,QAAY,IAAA,gBAAA;AACjD,MAAA,UAAA,GAAa,OAAO,KAAA,KAAkB,QAAY,IAAA;;;;;;"}
|
package/dist/version.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../src/version.ts"],"sourcesContent":["declare const __VERSION__: string;\ndeclare const ROLLUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react-tiptap\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof ROLLUP_FORMAT === \"string\" && ROLLUP_FORMAT;\n"],"names":[],"mappings":"AAGO,MAAM,QAAW,GAAA,2BAAA;AACX,MAAA,WAAA,GAAc,OAAO,eAAA,KAAgB,QAAY,IAAA,gBAAA;AACjD,MAAA,UAAA,GAAa,OAAO,KAAA,KAAkB,QAAY,IAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,88 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/react-tiptap",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.8.3-tiptap2",
|
|
4
4
|
"description": "A tiptap react plugin to enable collaboration, comments, live cursors, and more.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "commonjs",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"module": "./dist/index.mjs",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"./styles.css": {
|
|
22
|
+
"types": "./styles.css.d.ts",
|
|
23
|
+
"default": "./styles.css"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
7
26
|
"files": [
|
|
27
|
+
"dist/**",
|
|
28
|
+
"**/*.css",
|
|
29
|
+
"**/*.css.d.ts",
|
|
30
|
+
"**/*.css.map",
|
|
8
31
|
"README.md"
|
|
9
32
|
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"dev": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript --watch",
|
|
35
|
+
"build": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
36
|
+
"format": "eslint --fix src/; stylelint --fix src/styles/; prettier --write src/",
|
|
37
|
+
"lint": "eslint src/; stylelint src/styles/",
|
|
38
|
+
"lint:package": "publint --strict && attw --pack",
|
|
39
|
+
"start": "npm run dev",
|
|
40
|
+
"test": "jest --silent --verbose --color=always",
|
|
41
|
+
"test:watch": "jest --silent --verbose --color=always --watch"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@floating-ui/react-dom": "^2.1.2",
|
|
45
|
+
"@liveblocks/client": "2.8.3-tiptap2",
|
|
46
|
+
"@liveblocks/core": "2.8.3-tiptap2",
|
|
47
|
+
"@liveblocks/react": "2.8.3-tiptap2",
|
|
48
|
+
"@liveblocks/react-ui": "2.8.3-tiptap2",
|
|
49
|
+
"@liveblocks/yjs": "2.8.3-tiptap2",
|
|
50
|
+
"@tiptap/core": "^2.7.2",
|
|
51
|
+
"@tiptap/react": "^2.7.2",
|
|
52
|
+
"@tiptap/suggestion": "^2.7.2",
|
|
53
|
+
"use-sync-external-store": "^1.2.2",
|
|
54
|
+
"y-prosemirror": "^1.2.12",
|
|
55
|
+
"yjs": "^13.6.18"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@tiptap/extension-collaboration": "^2.7.2",
|
|
59
|
+
"@tiptap/extension-collaboration-cursor": "^2.7.2",
|
|
60
|
+
"@tiptap/pm": "^2.7.2",
|
|
61
|
+
"@tiptap/react": "^2.7.2",
|
|
62
|
+
"@tiptap/suggestion": "^2.7.2",
|
|
63
|
+
"react": "^16.14.0 || ^17 || ^18",
|
|
64
|
+
"react-dom": "^16.14.0 || ^17 || ^18"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@liveblocks/eslint-config": "*",
|
|
68
|
+
"@liveblocks/jest-config": "*",
|
|
69
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
70
|
+
"@rollup/plugin-replace": "^5.0.5",
|
|
71
|
+
"@rollup/plugin-typescript": "^11.1.2",
|
|
72
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
73
|
+
"@types/use-sync-external-store": "^0.0.6",
|
|
74
|
+
"eslint-plugin-react": "^7.33.2",
|
|
75
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
76
|
+
"msw": "^0.27.1",
|
|
77
|
+
"rollup": "^3.28.0",
|
|
78
|
+
"rollup-plugin-dts": "^5.3.1",
|
|
79
|
+
"rollup-plugin-esbuild": "^5.0.0",
|
|
80
|
+
"rollup-plugin-preserve-directives": "^0.2.0",
|
|
81
|
+
"stylelint": "^15.10.2",
|
|
82
|
+
"stylelint-config-standard": "^34.0.0",
|
|
83
|
+
"stylelint-order": "^6.0.3",
|
|
84
|
+
"stylelint-plugin-logical-css": "^0.13.2"
|
|
85
|
+
},
|
|
10
86
|
"sideEffects": false,
|
|
11
87
|
"bugs": {
|
|
12
88
|
"url": "https://github.com/liveblocks/liveblocks/issues"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
$lb-elevation-list-padding: 4px;
|
|
2
|
+
$lb-tiptap-anchored-threads-shadow:
|
|
3
|
+
0 0 0 1px rgb(0 0 0 / 4%),
|
|
4
|
+
0 2px 6px rgb(0 0 0 / 4%),
|
|
5
|
+
0 6px 20px rgb(0 0 0 / 6%);
|
|
6
|
+
$lb-tiptap-anchored-threads-active-shadow:
|
|
7
|
+
0 0 0 1px rgb(0 0 0 / 4%),
|
|
8
|
+
0 2px 6px rgb(0 0 0 / 8%),
|
|
9
|
+
0 8px 26px rgb(0 0 0 / 12%);
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
@import "./utils";
|
|
2
|
+
@import "./constants";
|
|
3
|
+
|
|
4
|
+
/*************************************
|
|
5
|
+
* Suggestions *
|
|
6
|
+
*************************************/
|
|
7
|
+
|
|
8
|
+
.lb-tiptap-suggestions-list {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
list-style: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/*************************************
|
|
15
|
+
* Mention suggestions *
|
|
16
|
+
*************************************/
|
|
17
|
+
|
|
18
|
+
.lb-tiptap-mention-suggestions {
|
|
19
|
+
--lb-tiptap-mention-suggestion-avatar-size: 1.25rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.lb-tiptap-mention-suggestion {
|
|
23
|
+
padding: calc(0.375 * var(--lb-spacing)) calc(0.625 * var(--lb-spacing));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.lb-tiptap-mention-suggestion-avatar {
|
|
27
|
+
inline-size: var(--lb-tiptap-mention-suggestion-avatar-size);
|
|
28
|
+
margin-inline-start: calc(-0.125 * var(--lb-spacing));
|
|
29
|
+
margin-inline-end: calc(0.5 * var(--lb-spacing));
|
|
30
|
+
margin-block: calc(0.125 * var(--lb-spacing));
|
|
31
|
+
background: var(--lb-foreground-subtle);
|
|
32
|
+
color: var(--lb-foreground-moderate);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/*************************************
|
|
36
|
+
* Elevation lists *
|
|
37
|
+
*************************************/
|
|
38
|
+
|
|
39
|
+
.lb-tiptap-suggestions {
|
|
40
|
+
padding: $lb-elevation-list-padding;
|
|
41
|
+
animation-duration: var(--lb-transition-duration);
|
|
42
|
+
animation-timing-function: var(--lb-transition-easing);
|
|
43
|
+
will-change: transform, opacity;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.lb-tiptap-suggestions-list-item {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
padding: calc(0.25 * var(--lb-spacing)) calc(0.5 * var(--lb-spacing));
|
|
50
|
+
border-radius: calc(var(--lb-radius) - 0.75 * $lb-elevation-list-padding);
|
|
51
|
+
color: var(--lb-foreground-secondary);
|
|
52
|
+
outline: none;
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
user-select: none;
|
|
56
|
+
transition-property: background, color, opacity;
|
|
57
|
+
scroll-margin-block: $lb-elevation-list-padding;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:is(.lb-tiptap-suggestions-list-item) {
|
|
61
|
+
&:where([data-highlighted], [data-selected]) {
|
|
62
|
+
background: var(--lb-foreground-subtle);
|
|
63
|
+
transition-duration: calc(var(--lb-transition-duration) / 2);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:where(:disabled, [data-disabled]) {
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/*************************************
|
|
73
|
+
* Floating animations *
|
|
74
|
+
*************************************/
|
|
75
|
+
|
|
76
|
+
:is(.lb-tiptap-suggestions) {
|
|
77
|
+
&:where([data-side="top"]) {
|
|
78
|
+
animation-name: lb-animation-slide-up;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:where([data-side="bottom"]) {
|
|
82
|
+
animation-name: lb-animation-slide-down;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:where([data-state="closed"]) {
|
|
86
|
+
animation-name: lb-animation-disappear;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media (prefers-reduced-motion) {
|
|
91
|
+
.lb-tiptap-suggestions:where(:not([data-state="closed"])) {
|
|
92
|
+
animation-name: lb-animation-appear;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/*************************************
|
|
97
|
+
* Mention *
|
|
98
|
+
*************************************/
|
|
99
|
+
|
|
100
|
+
.lb-tiptap-mention {
|
|
101
|
+
padding: 0.1em 0.3em;
|
|
102
|
+
border-radius: calc(0.675 * var(--lb-radius));
|
|
103
|
+
background: var(--lb-accent-subtle);
|
|
104
|
+
color: var(--lb-accent);
|
|
105
|
+
box-decoration-break: clone;
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
|
|
108
|
+
@include invisible-selection;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.lb-mention-selected {
|
|
112
|
+
background: var(--lb-accent);
|
|
113
|
+
color: var(--lb-accent-foreground);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/*************************************
|
|
117
|
+
* Thread mark *
|
|
118
|
+
*************************************/
|
|
119
|
+
|
|
120
|
+
:where(.lb-tiptap-thread-mark:not([data-orphan="true"])) {
|
|
121
|
+
background: var(--lb-accent-subtle);
|
|
122
|
+
color: var(--lb-foreground);
|
|
123
|
+
outline: none;
|
|
124
|
+
font-weight: 500;
|
|
125
|
+
transition-property: color, text-decoration-color;
|
|
126
|
+
text-decoration-line: underline;
|
|
127
|
+
text-decoration-color: var(--lb-foreground-moderate);
|
|
128
|
+
text-underline-offset: 2px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:where(
|
|
132
|
+
.lb-tiptap-thread-mark:not([data-orphan="true"])
|
|
133
|
+
.lb-tiptap-thread-mark-selected
|
|
134
|
+
) {
|
|
135
|
+
color: var(--lb-accent);
|
|
136
|
+
text-decoration-line: underline;
|
|
137
|
+
text-decoration-color: var(--lb-accent-moderate);
|
|
138
|
+
text-underline-offset: 2px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/*************************************
|
|
142
|
+
* Anchored threads *
|
|
143
|
+
*************************************/
|
|
144
|
+
|
|
145
|
+
.lb-tiptap-anchored-threads {
|
|
146
|
+
--lb-tiptap-anchored-threads-gap: 1.25rem;
|
|
147
|
+
--lb-tiptap-anchored-threads-active-thread-offset: -0.75rem;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.lb-tiptap-anchored-threads-thread-container {
|
|
151
|
+
transition-duration: calc(var(--lb-transition-duration) * 2);
|
|
152
|
+
transition-property: transform;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@media (prefers-reduced-motion) {
|
|
156
|
+
.lb-tiptap-anchored-threads-thread-container {
|
|
157
|
+
transition-duration: 0s;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.lb-tiptap-anchored-threads-thread {
|
|
162
|
+
position: relative;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
border-radius: var(--lb-radius);
|
|
165
|
+
background: var(--lb-dynamic-background);
|
|
166
|
+
box-shadow: $lb-tiptap-anchored-threads-shadow;
|
|
167
|
+
transition-property: background, box-shadow;
|
|
168
|
+
|
|
169
|
+
&::after {
|
|
170
|
+
content: "";
|
|
171
|
+
position: absolute;
|
|
172
|
+
inset: 0;
|
|
173
|
+
z-index: 1;
|
|
174
|
+
border-radius: inherit;
|
|
175
|
+
box-shadow: var(--lb-inset-shadow);
|
|
176
|
+
pointer-events: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:where([data-state="active"]) {
|
|
180
|
+
box-shadow: $lb-tiptap-anchored-threads-active-shadow;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/*************************************
|
|
185
|
+
* Floating components *
|
|
186
|
+
*************************************/
|
|
187
|
+
|
|
188
|
+
.lb-tiptap-floating {
|
|
189
|
+
--lb-tiptap-floating-size: 350px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/*************************************
|
|
193
|
+
* Floating threads *
|
|
194
|
+
*************************************/
|
|
195
|
+
|
|
196
|
+
.lb-tiptap-floating-threads-thread {
|
|
197
|
+
inline-size: var(--lb-tiptap-floating-size);
|
|
198
|
+
|
|
199
|
+
&:where(:not(:last-of-type)) {
|
|
200
|
+
border-block-end: 1px solid var(--lb-foreground-subtle);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/*************************************
|
|
205
|
+
* Floating composer *
|
|
206
|
+
*************************************/
|
|
207
|
+
|
|
208
|
+
.lb-tiptap-floating-composer {
|
|
209
|
+
inline-size: var(--lb-tiptap-floating-size);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.lb-tiptap-active-selection {
|
|
213
|
+
background: var(--lb-selection, rgb(0 0 255 / 20%));
|
|
214
|
+
pointer-events: none;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/*************************************
|
|
218
|
+
* Collab Cursors *
|
|
219
|
+
*************************************/
|
|
220
|
+
|
|
221
|
+
/* Give a remote user a caret */
|
|
222
|
+
/* stylelint-disable-next-line selector-class-pattern */
|
|
223
|
+
.collaboration-cursor__caret {
|
|
224
|
+
position: relative;
|
|
225
|
+
margin-inline-start: -1px;
|
|
226
|
+
margin-inline-end: -1px;
|
|
227
|
+
border-inline-start: 1px solid #0d0d0d;
|
|
228
|
+
border-inline-end: 1px solid #0d0d0d;
|
|
229
|
+
word-break: normal;
|
|
230
|
+
pointer-events: none;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* Render the username above the caret */
|
|
234
|
+
/* stylelint-disable-next-line selector-class-pattern */
|
|
235
|
+
.collaboration-cursor__label {
|
|
236
|
+
position: absolute;
|
|
237
|
+
inset-inline-start: -1px;
|
|
238
|
+
inset-block-start: -1.4em;
|
|
239
|
+
padding: 2px 6px;
|
|
240
|
+
border-radius: 6px;
|
|
241
|
+
border-end-start-radius: 0;
|
|
242
|
+
color: #fff;
|
|
243
|
+
font-weight: 600;
|
|
244
|
+
font-style: normal;
|
|
245
|
+
font-size: 14px;
|
|
246
|
+
line-height: normal;
|
|
247
|
+
white-space: nowrap;
|
|
248
|
+
pointer-events: none;
|
|
249
|
+
user-select: none;
|
|
250
|
+
}
|
package/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.lb-tiptap-suggestions-list{margin:0;padding:0;list-style:none}.lb-tiptap-mention-suggestions{--lb-tiptap-mention-suggestion-avatar-size:1.25rem}.lb-tiptap-mention-suggestion{padding:calc(.375*var(--lb-spacing))calc(.625*var(--lb-spacing))}.lb-tiptap-mention-suggestion-avatar{inline-size:var(--lb-tiptap-mention-suggestion-avatar-size);margin-inline-start:calc(-.125*var(--lb-spacing));margin-inline-end:calc(.5*var(--lb-spacing));margin-block:calc(.125*var(--lb-spacing));background:var(--lb-foreground-subtle);color:var(--lb-foreground-moderate)}.lb-tiptap-suggestions{animation-duration:var(--lb-transition-duration);animation-timing-function:var(--lb-transition-easing);will-change:transform,opacity;padding:4px}.lb-tiptap-suggestions-list-item{padding:calc(.25*var(--lb-spacing))calc(.5*var(--lb-spacing));border-radius:calc(var(--lb-radius) - .75*4px);color:var(--lb-foreground-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;align-items:center;scroll-margin-block:4px;font-size:.875rem;transition-property:background,color,opacity;display:flex}.lb-tiptap-suggestions-list-item:where([data-highlighted],[data-selected]){background:var(--lb-foreground-subtle);transition-duration:calc(var(--lb-transition-duration)/2)}.lb-tiptap-suggestions-list-item:where(:disabled,[data-disabled]){opacity:.5;cursor:not-allowed}.lb-tiptap-suggestions:where([data-side=top]){animation-name:lb-animation-slide-up}.lb-tiptap-suggestions:where([data-side=bottom]){animation-name:lb-animation-slide-down}.lb-tiptap-suggestions:where([data-state=closed]){animation-name:lb-animation-disappear}.lb-tiptap-mention{border-radius:calc(.675*var(--lb-radius));background:var(--lb-accent-subtle);color:var(--lb-accent);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:.1em .3em;font-weight:500}.lb-tiptap-mention::selection{background:0 0}.lb-tiptap-mention ::selection{background:0 0}.lb-mention-selected{background:var(--lb-accent);color:var(--lb-accent-foreground)}:where(.lb-tiptap-thread-mark:not([data-orphan=true])){background:var(--lb-accent-subtle);color:var(--lb-foreground);text-decoration-line:underline;-webkit-text-decoration-color:var(--lb-foreground-moderate);text-decoration-color:var(--lb-foreground-moderate);text-underline-offset:2px;outline:none;font-weight:500;transition-property:color,text-decoration-color}:where(.lb-tiptap-thread-mark:not([data-orphan=true]) .lb-tiptap-thread-mark-selected){color:var(--lb-accent);text-decoration-line:underline;-webkit-text-decoration-color:var(--lb-accent-moderate);text-decoration-color:var(--lb-accent-moderate);text-underline-offset:2px}.lb-tiptap-anchored-threads{--lb-tiptap-anchored-threads-gap:1.25rem;--lb-tiptap-anchored-threads-active-thread-offset:-.75rem}.lb-tiptap-anchored-threads-thread-container{transition-duration:calc(var(--lb-transition-duration)*2);transition-property:transform}.lb-tiptap-anchored-threads-thread{border-radius:var(--lb-radius);background:var(--lb-dynamic-background);transition-property:background,box-shadow;position:relative;overflow:hidden;box-shadow:0 0 0 1px #0000000a,0 2px 6px #0000000a,0 6px 20px #0000000f}.lb-tiptap-anchored-threads-thread:after{content:"";z-index:1;border-radius:inherit;box-shadow:var(--lb-inset-shadow);pointer-events:none;position:absolute;inset:0}.lb-tiptap-anchored-threads-thread:where([data-state=active]){box-shadow:0 0 0 1px #0000000a,0 2px 6px #00000014,0 8px 26px #0000001f}.lb-tiptap-floating{--lb-tiptap-floating-size:350px}.lb-tiptap-floating-threads-thread{inline-size:var(--lb-tiptap-floating-size)}.lb-tiptap-floating-threads-thread:where(:not(:last-of-type)){border-block-end:1px solid var(--lb-foreground-subtle)}.lb-tiptap-floating-composer{inline-size:var(--lb-tiptap-floating-size)}.lb-tiptap-active-selection{background:var(--lb-selection,#00f3);pointer-events:none}.collaboration-cursor__caret{word-break:normal;pointer-events:none;border-inline:1px solid #0d0d0d;margin-inline:-1px;position:relative}.collaboration-cursor__label{border-radius:6px;color:#fff;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none;border-end-start-radius:0;padding:2px 6px;font-size:14px;font-style:normal;font-weight:600;line-height:normal;position:absolute;inset-block-start:-1.4em;inset-inline-start:-1px}@media (prefers-reduced-motion){.lb-tiptap-suggestions:where(:not([data-state=closed])){animation-name:lb-animation-appear}.lb-tiptap-anchored-threads-thread-container{transition-duration:0s}}
|
package/styles.css.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module "@liveblocks/react-tiptap/styles.css";
|
package/styles.css.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/styles/src/styles/index.css","src/styles/src/styles/utils.css"],"names":[],"mappings":"AAOA,4BAAA,QAAA,CAAA,SAAA,CAAA,eAAA,CAUA,+BAAA,kDAAA,CAIA,8BAAA,gEAAA,CAIA,qCAAA,2DAAA,CAAA,iDAAA,CAAA,4CAAA,CAAA,yCAAA,CAAA,sCAAA,CAAA,mCAAA,CAaA,uBAAA,gDAAA,CAAA,qDAAA,CAAA,6BAAA,CAAA,WAAA,CAOA,iCAAA,6DAAA,CAAA,8CAAA,CAAA,oCAAA,CAAA,cAAA,CAAA,wBAAA,CAAA,gBAAA,CAAA,YAAA,CAAA,kBAAA,CAAA,uBAAA,CAAA,iBAAA,CAAA,4CAAA,CAAA,YAAA,CAeE,2EAAA,sCAAA,CA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n/*************************************\n * Suggestions *\n *************************************/\n\n.lb-tiptap-suggestions-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n/*************************************\n * Mention suggestions *\n *************************************/\n\n.lb-tiptap-mention-suggestions {\n --lb-tiptap-mention-suggestion-avatar-size: 1.25rem;\n}\n\n.lb-tiptap-mention-suggestion {\n padding: calc(0.375 * var(--lb-spacing)) calc(0.625 * var(--lb-spacing));\n}\n\n.lb-tiptap-mention-suggestion-avatar {\n inline-size: var(--lb-tiptap-mention-suggestion-avatar-size);\n margin-inline-start: calc(-0.125 * var(--lb-spacing));\n margin-inline-end: calc(0.5 * var(--lb-spacing));\n margin-block: calc(0.125 * var(--lb-spacing));\n background: var(--lb-foreground-subtle);\n color: var(--lb-foreground-moderate);\n}\n\n/*************************************\n * Elevation lists *\n *************************************/\n\n.lb-tiptap-suggestions {\n padding: $lb-elevation-list-padding;\n animation-duration: var(--lb-transition-duration);\n animation-timing-function: var(--lb-transition-easing);\n will-change: transform, opacity;\n}\n\n.lb-tiptap-suggestions-list-item {\n display: flex;\n align-items: center;\n padding: calc(0.25 * var(--lb-spacing)) calc(0.5 * var(--lb-spacing));\n border-radius: calc(var(--lb-radius) - 0.75 * $lb-elevation-list-padding);\n color: var(--lb-foreground-secondary);\n outline: none;\n font-size: 0.875rem;\n cursor: pointer;\n user-select: none;\n transition-property: background, color, opacity;\n scroll-margin-block: $lb-elevation-list-padding;\n}\n\n:is(.lb-tiptap-suggestions-list-item) {\n &:where([data-highlighted], [data-selected]) {\n background: var(--lb-foreground-subtle);\n transition-duration: calc(var(--lb-transition-duration) / 2);\n }\n\n &:where(:disabled, [data-disabled]) {\n opacity: 0.5;\n cursor: not-allowed;\n }\n}\n\n/*************************************\n * Floating animations *\n *************************************/\n\n:is(.lb-tiptap-suggestions) {\n &:where([data-side=\"top\"]) {\n animation-name: lb-animation-slide-up;\n }\n\n &:where([data-side=\"bottom\"]) {\n animation-name: lb-animation-slide-down;\n }\n\n &:where([data-state=\"closed\"]) {\n animation-name: lb-animation-disappear;\n }\n}\n\n@media (prefers-reduced-motion) {\n .lb-tiptap-suggestions:where(:not([data-state=\"closed\"])) {\n animation-name: lb-animation-appear;\n }\n}\n\n/*************************************\n * Mention *\n *************************************/\n\n.lb-tiptap-mention {\n padding: 0.1em 0.3em;\n border-radius: calc(0.675 * var(--lb-radius));\n background: var(--lb-accent-subtle);\n color: var(--lb-accent);\n box-decoration-break: clone;\n font-weight: 500;\n\n @include invisible-selection;\n}\n\n.lb-mention-selected {\n background: var(--lb-accent);\n color: var(--lb-accent-foreground);\n}\n\n/*************************************\n * Thread mark *\n *************************************/\n\n:where(.lb-tiptap-thread-mark:not([data-orphan=\"true\"])) {\n background: var(--lb-accent-subtle);\n color: var(--lb-foreground);\n outline: none;\n font-weight: 500;\n transition-property: color, text-decoration-color;\n text-decoration-line: underline;\n text-decoration-color: var(--lb-foreground-moderate);\n text-underline-offset: 2px;\n}\n\n:where(\n .lb-tiptap-thread-mark:not([data-orphan=\"true\"])\n .lb-tiptap-thread-mark-selected\n ) {\n color: var(--lb-accent);\n text-decoration-line: underline;\n text-decoration-color: var(--lb-accent-moderate);\n text-underline-offset: 2px;\n}\n\n/*************************************\n * Anchored threads *\n *************************************/\n\n.lb-tiptap-anchored-threads {\n --lb-tiptap-anchored-threads-gap: 1.25rem;\n --lb-tiptap-anchored-threads-active-thread-offset: -0.75rem;\n}\n\n.lb-tiptap-anchored-threads-thread-container {\n transition-duration: calc(var(--lb-transition-duration) * 2);\n transition-property: transform;\n}\n\n@media (prefers-reduced-motion) {\n .lb-tiptap-anchored-threads-thread-container {\n transition-duration: 0s;\n }\n}\n\n.lb-tiptap-anchored-threads-thread {\n position: relative;\n overflow: hidden;\n border-radius: var(--lb-radius);\n background: var(--lb-dynamic-background);\n box-shadow: $lb-tiptap-anchored-threads-shadow;\n transition-property: background, box-shadow;\n\n &::after {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: 1;\n border-radius: inherit;\n box-shadow: var(--lb-inset-shadow);\n pointer-events: none;\n }\n\n &:where([data-state=\"active\"]) {\n box-shadow: $lb-tiptap-anchored-threads-active-shadow;\n }\n}\n\n/*************************************\n * Floating components *\n *************************************/\n\n.lb-tiptap-floating {\n --lb-tiptap-floating-size: 350px;\n}\n\n/*************************************\n * Floating threads *\n *************************************/\n\n.lb-tiptap-floating-threads-thread {\n inline-size: var(--lb-tiptap-floating-size);\n\n &:where(:not(:last-of-type)) {\n border-block-end: 1px solid var(--lb-foreground-subtle);\n }\n}\n\n/*************************************\n * Floating composer *\n *************************************/\n\n.lb-tiptap-floating-composer {\n inline-size: var(--lb-tiptap-floating-size);\n}\n\n.lb-tiptap-active-selection {\n background: var(--lb-selection, rgb(0 0 255 / 20%));\n pointer-events: none;\n}\n\n/*************************************\n * Collab Cursors *\n *************************************/\n\n/* Give a remote user a caret */\n/* stylelint-disable-next-line selector-class-pattern */\n.collaboration-cursor__caret {\n position: relative;\n margin-inline-start: -1px;\n margin-inline-end: -1px;\n border-inline-start: 1px solid #0d0d0d;\n border-inline-end: 1px solid #0d0d0d;\n word-break: normal;\n pointer-events: none;\n}\n\n/* Render the username above the caret */\n/* stylelint-disable-next-line selector-class-pattern */\n.collaboration-cursor__label {\n position: absolute;\n inset-inline-start: -1px;\n inset-block-start: -1.4em;\n padding: 2px 6px;\n border-radius: 6px;\n border-end-start-radius: 0;\n color: #fff;\n font-weight: 600;\n font-style: normal;\n font-size: 14px;\n line-height: normal;\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n}\n","@mixin invisible-selection {\n &::selection,\n *::selection {\n background: transparent;\n }\n}\n"]}
|