create-starlight-cms 0.9.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/LICENSE +21 -0
- package/README.md +18 -0
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/bin/index.js +147 -0
- package/package.json +46 -0
- package/template/.nvmrc +1 -0
- package/template/LICENSE +21 -0
- package/template/README.md +68 -0
- package/template/THIRD_PARTY_NOTICES.md +12 -0
- package/template/_gitignore +14 -0
- package/template/astro.config.mjs +26 -0
- package/template/migrations/0001_schema.sql +73 -0
- package/template/migrations/0002_publish_delivery.sql +16 -0
- package/template/package-lock.json.template +9123 -0
- package/template/package.json +89 -0
- package/template/scripts/build-admin.mjs +38 -0
- package/template/scripts/check-linux-bindings.mjs +18 -0
- package/template/scripts/dev.mjs +94 -0
- package/template/src/admin/admin.scss +182 -0
- package/template/src/admin/app.ts +130 -0
- package/template/src/admin/client.tsx +684 -0
- package/template/src/admin/components/tiptap-extension/node-background-extension.ts +150 -0
- package/template/src/admin/components/tiptap-icons/align-center-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/align-justify-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/align-left-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/align-right-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/arrow-left-icon.tsx +24 -0
- package/template/src/admin/components/tiptap-icons/arrow-right-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/ban-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/blockquote-icon.tsx +44 -0
- package/template/src/admin/components/tiptap-icons/bold-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/case-sensitive-icon.tsx +32 -0
- package/template/src/admin/components/tiptap-icons/check-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/chevron-down-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/chevron-up-icon.tsx +22 -0
- package/template/src/admin/components/tiptap-icons/close-icon.tsx +24 -0
- package/template/src/admin/components/tiptap-icons/code-block-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/code2-icon.tsx +32 -0
- package/template/src/admin/components/tiptap-icons/corner-down-left-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/external-link-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/heading-five-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/heading-four-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/heading-icon.tsx +24 -0
- package/template/src/admin/components/tiptap-icons/heading-one-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/heading-six-icon.tsx +30 -0
- package/template/src/admin/components/tiptap-icons/heading-three-icon.tsx +36 -0
- package/template/src/admin/components/tiptap-icons/heading-two-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/highlighter-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/image-plus-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/italic-icon.tsx +24 -0
- package/template/src/admin/components/tiptap-icons/link-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/list-icon.tsx +56 -0
- package/template/src/admin/components/tiptap-icons/list-ordered-icon.tsx +56 -0
- package/template/src/admin/components/tiptap-icons/list-todo-icon.tsx +50 -0
- package/template/src/admin/components/tiptap-icons/moon-star-icon.tsx +30 -0
- package/template/src/admin/components/tiptap-icons/redo2-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/search-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/strike-icon.tsx +28 -0
- package/template/src/admin/components/tiptap-icons/subscript-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/sun-icon.tsx +58 -0
- package/template/src/admin/components/tiptap-icons/superscript-icon.tsx +38 -0
- package/template/src/admin/components/tiptap-icons/trash-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/underline-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/undo2-icon.tsx +26 -0
- package/template/src/admin/components/tiptap-icons/whole-word-icon.tsx +36 -0
- package/template/src/admin/components/tiptap-node/blockquote-node/blockquote-node.scss +37 -0
- package/template/src/admin/components/tiptap-node/code-block-node/code-block-node.scss +54 -0
- package/template/src/admin/components/tiptap-node/heading-node/heading-node.scss +45 -0
- package/template/src/admin/components/tiptap-node/horizontal-rule-node/horizontal-rule-node-extension.ts +14 -0
- package/template/src/admin/components/tiptap-node/horizontal-rule-node/horizontal-rule-node.scss +25 -0
- package/template/src/admin/components/tiptap-node/image-node/image-node.scss +35 -0
- package/template/src/admin/components/tiptap-node/image-upload-node/image-upload-node-extension.ts +161 -0
- package/template/src/admin/components/tiptap-node/image-upload-node/image-upload-node.scss +249 -0
- package/template/src/admin/components/tiptap-node/image-upload-node/image-upload-node.tsx +554 -0
- package/template/src/admin/components/tiptap-node/image-upload-node/index.tsx +1 -0
- package/template/src/admin/components/tiptap-node/list-node/list-node.scss +208 -0
- package/template/src/admin/components/tiptap-node/paragraph-node/paragraph-node.scss +217 -0
- package/template/src/admin/components/tiptap-templates/simple/NOTICE.md +14 -0
- package/template/src/admin/components/tiptap-templates/simple/data/content.json +477 -0
- package/template/src/admin/components/tiptap-templates/simple/simple-editor.scss +97 -0
- package/template/src/admin/components/tiptap-templates/simple/simple-editor.tsx +348 -0
- package/template/src/admin/components/tiptap-templates/simple/theme-toggle.tsx +44 -0
- package/template/src/admin/components/tiptap-ui/blockquote-button/blockquote-button.tsx +122 -0
- package/template/src/admin/components/tiptap-ui/blockquote-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/blockquote-button/use-blockquote.ts +273 -0
- package/template/src/admin/components/tiptap-ui/code-block-button/code-block-button.tsx +122 -0
- package/template/src/admin/components/tiptap-ui/code-block-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/code-block-button/use-code-block.ts +283 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-button/color-highlight-button.scss +49 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-button/color-highlight-button.tsx +170 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-button/use-color-highlight.ts +380 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx +231 -0
- package/template/src/admin/components/tiptap-ui/color-highlight-popover/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui/heading-button/heading-button.tsx +124 -0
- package/template/src/admin/components/tiptap-ui/heading-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/heading-button/use-heading.ts +348 -0
- package/template/src/admin/components/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx +128 -0
- package/template/src/admin/components/tiptap-ui/heading-dropdown-menu/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/heading-dropdown-menu/use-heading-dropdown-menu.ts +132 -0
- package/template/src/admin/components/tiptap-ui/image-upload-button/image-upload-button.tsx +130 -0
- package/template/src/admin/components/tiptap-ui/image-upload-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/image-upload-button/use-image-upload.ts +197 -0
- package/template/src/admin/components/tiptap-ui/link-popover/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/link-popover/link-popover.scss +16 -0
- package/template/src/admin/components/tiptap-ui/link-popover/link-popover.tsx +315 -0
- package/template/src/admin/components/tiptap-ui/link-popover/use-link-popover.ts +297 -0
- package/template/src/admin/components/tiptap-ui/list-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/list-button/list-button.tsx +120 -0
- package/template/src/admin/components/tiptap-ui/list-button/use-list.ts +353 -0
- package/template/src/admin/components/tiptap-ui/list-dropdown-menu/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx +126 -0
- package/template/src/admin/components/tiptap-ui/list-dropdown-menu/use-list-dropdown-menu.ts +220 -0
- package/template/src/admin/components/tiptap-ui/mark-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/mark-button/mark-button.tsx +122 -0
- package/template/src/admin/components/tiptap-ui/mark-button/use-mark.ts +219 -0
- package/template/src/admin/components/tiptap-ui/search-and-replace/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/search-and-replace/search-and-replace.scss +300 -0
- package/template/src/admin/components/tiptap-ui/search-and-replace/search-and-replace.tsx +718 -0
- package/template/src/admin/components/tiptap-ui/search-and-replace/use-search-and-replace.ts +528 -0
- package/template/src/admin/components/tiptap-ui/text-align-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/text-align-button/text-align-button.tsx +144 -0
- package/template/src/admin/components/tiptap-ui/text-align-button/use-text-align.ts +237 -0
- package/template/src/admin/components/tiptap-ui/undo-redo-button/index.tsx +2 -0
- package/template/src/admin/components/tiptap-ui/undo-redo-button/undo-redo-button.tsx +125 -0
- package/template/src/admin/components/tiptap-ui/undo-redo-button/use-undo-redo.ts +200 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/badge-colors.scss +395 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/badge-group.scss +16 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/badge.scss +99 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/badge.tsx +44 -0
- package/template/src/admin/components/tiptap-ui-primitive/badge/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/button/button-colors.scss +613 -0
- package/template/src/admin/components/tiptap-ui-primitive/button/button.scss +390 -0
- package/template/src/admin/components/tiptap-ui-primitive/button/button.tsx +158 -0
- package/template/src/admin/components/tiptap-ui-primitive/button/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/button-group/button-group.scss +89 -0
- package/template/src/admin/components/tiptap-ui-primitive/button-group/button-group.tsx +72 -0
- package/template/src/admin/components/tiptap-ui-primitive/button-group/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/card/card.scss +74 -0
- package/template/src/admin/components/tiptap-ui-primitive/card/card.tsx +79 -0
- package/template/src/admin/components/tiptap-ui-primitive/card/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.scss +152 -0
- package/template/src/admin/components/tiptap-ui-primitive/dropdown-menu/dropdown-menu.tsx +262 -0
- package/template/src/admin/components/tiptap-ui-primitive/dropdown-menu/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/input/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/input/input.scss +41 -0
- package/template/src/admin/components/tiptap-ui-primitive/input/input.tsx +22 -0
- package/template/src/admin/components/tiptap-ui-primitive/input-group/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/input-group/input-group.scss +225 -0
- package/template/src/admin/components/tiptap-ui-primitive/input-group/input-group.tsx +135 -0
- package/template/src/admin/components/tiptap-ui-primitive/popover/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/popover/popover.scss +64 -0
- package/template/src/admin/components/tiptap-ui-primitive/popover/popover.tsx +35 -0
- package/template/src/admin/components/tiptap-ui-primitive/separator/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/separator/separator.scss +23 -0
- package/template/src/admin/components/tiptap-ui-primitive/separator/separator.tsx +28 -0
- package/template/src/admin/components/tiptap-ui-primitive/spacer/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/spacer/spacer.tsx +24 -0
- package/template/src/admin/components/tiptap-ui-primitive/switch/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/switch/switch.scss +86 -0
- package/template/src/admin/components/tiptap-ui-primitive/switch/switch.tsx +29 -0
- package/template/src/admin/components/tiptap-ui-primitive/textarea/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/textarea/textarea.scss +42 -0
- package/template/src/admin/components/tiptap-ui-primitive/textarea/textarea.tsx +16 -0
- package/template/src/admin/components/tiptap-ui-primitive/toolbar/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/toolbar/toolbar.scss +98 -0
- package/template/src/admin/components/tiptap-ui-primitive/toolbar/toolbar.tsx +203 -0
- package/template/src/admin/components/tiptap-ui-primitive/tooltip/index.tsx +1 -0
- package/template/src/admin/components/tiptap-ui-primitive/tooltip/tooltip.scss +43 -0
- package/template/src/admin/components/tiptap-ui-primitive/tooltip/tooltip.tsx +241 -0
- package/template/src/admin/hooks/use-composed-ref.ts +46 -0
- package/template/src/admin/hooks/use-cursor-visibility.ts +69 -0
- package/template/src/admin/hooks/use-element-rect.ts +166 -0
- package/template/src/admin/hooks/use-is-breakpoint.ts +35 -0
- package/template/src/admin/hooks/use-menu-navigation.ts +204 -0
- package/template/src/admin/hooks/use-scrolling.ts +75 -0
- package/template/src/admin/hooks/use-throttled-callback.ts +48 -0
- package/template/src/admin/hooks/use-tiptap-editor.ts +69 -0
- package/template/src/admin/hooks/use-unmount.ts +21 -0
- package/template/src/admin/hooks/use-window-size.ts +93 -0
- package/template/src/admin/html.ts +17 -0
- package/template/src/admin/lib/tiptap-utils.ts +652 -0
- package/template/src/admin/navigation-tree.tsx +82 -0
- package/template/src/admin/preview.ts +73 -0
- package/template/src/admin/styles/_cms-theme.scss +58 -0
- package/template/src/admin/styles/_keyframe-animations.scss +91 -0
- package/template/src/admin/styles/_variables.scss +298 -0
- package/template/src/assets/favicon.svg +1 -0
- package/template/src/assets/logo.svg +1 -0
- package/template/src/astro-env.d.ts +1 -0
- package/template/src/content.config.ts +12 -0
- package/template/src/db/bootstrap.ts +36 -0
- package/template/src/db/client.ts +7 -0
- package/template/src/db/schema.ts +45 -0
- package/template/src/documents/service.ts +178 -0
- package/template/src/documents/validation.ts +9 -0
- package/template/src/env.ts +9 -0
- package/template/src/index.ts +10 -0
- package/template/src/locales.ts +10 -0
- package/template/src/media/service.ts +120 -0
- package/template/src/navigation/service.ts +171 -0
- package/template/src/pages/[locale]/cms-preview-shell.astro +12 -0
- package/template/src/pages/cms-preview-shell.astro +5 -0
- package/template/src/publish/deploy-hook.ts +42 -0
- package/template/src/publish/record.ts +20 -0
- package/template/src/publish/service.ts +135 -0
- package/template/src/scss.d.ts +5 -0
- package/template/src/site.config.ts +7 -0
- package/template/src/sql.d.ts +4 -0
- package/template/src/starlight/cms-origin.ts +4 -0
- package/template/src/starlight/loader.ts +21 -0
- package/template/src/starlight/preview-render.ts +162 -0
- package/template/src/starlight/preview-shell.astro +14 -0
- package/template/src/starlight/render.ts +59 -0
- package/template/src/starlight/schema.ts +34 -0
- package/template/src/starlight/sidebar.ts +35 -0
- package/template/src/starlight/snapshot.ts +47 -0
- package/template/src/starlight/source.ts +26 -0
- package/template/src/starlight/tiptap.ts +29 -0
- package/template/src/styles/starlight.css +12 -0
- package/template/test-files/content.test.template.ts +82 -0
- package/template/test-files/deploy-hook.test.template.ts +32 -0
- package/template/test-files/media.test.template.ts +39 -0
- package/template/test-files/publishing.integration.test.template.ts +156 -0
- package/template/tsconfig.admin.json +18 -0
- package/template/tsconfig.json +23 -0
- package/template/worker-configuration.d.ts +15389 -0
- package/template/wrangler.jsonc +26 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
.tiptap-search-replace {
|
|
2
|
+
--tiptap-search-replace-count-color: var(--tt-gray-light-a-400);
|
|
3
|
+
--tiptap-search-replace-option-text-color: var(--tt-gray-light-a-600);
|
|
4
|
+
--tiptap-search-replace-option-icon-color: var(--tt-gray-light-a-500);
|
|
5
|
+
--tiptap-search-replace-option-hover-bg-color: var(--tt-gray-light-a-200);
|
|
6
|
+
--tiptap-search-replace-kbd-bg: var(--white);
|
|
7
|
+
--tiptap-search-replace-kbd-border: var(--tt-gray-light-a-200);
|
|
8
|
+
--tiptap-search-replace-kbd-color: var(--tt-gray-light-a-500);
|
|
9
|
+
--tiptap-search-replace-help-bg: var(--tt-gray-light-100);
|
|
10
|
+
--tiptap-search-replace-help-label-color: var(--tt-gray-light-a-500);
|
|
11
|
+
--tiptap-search-replace-code-bg: var(--tt-gray-light-a-100);
|
|
12
|
+
--tiptap-search-replace-code-border: var(--tt-gray-light-a-200);
|
|
13
|
+
--tiptap-search-replace-code-color: var(--tt-gray-light-a-700);
|
|
14
|
+
--tiptap-search-replace-focus-border: var(--tt-brand-color-500);
|
|
15
|
+
--tiptap-search-replace-focus-ring: color-mix(
|
|
16
|
+
in srgb,
|
|
17
|
+
var(--tt-brand-color-500) 20%,
|
|
18
|
+
transparent
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
width: 19rem;
|
|
22
|
+
max-width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dark .tiptap-search-replace {
|
|
26
|
+
--tiptap-search-replace-count-color: var(--tt-gray-dark-a-400);
|
|
27
|
+
--tiptap-search-replace-option-text-color: var(--tt-gray-dark-a-600);
|
|
28
|
+
--tiptap-search-replace-option-icon-color: var(--tt-gray-dark-a-500);
|
|
29
|
+
--tiptap-search-replace-option-hover-bg-color: var(--tt-gray-dark-a-200);
|
|
30
|
+
--tiptap-search-replace-kbd-bg: var(--tt-gray-dark-a-50);
|
|
31
|
+
--tiptap-search-replace-kbd-border: var(--tt-gray-dark-a-200);
|
|
32
|
+
--tiptap-search-replace-kbd-color: var(--tt-gray-dark-a-500);
|
|
33
|
+
--tiptap-search-replace-help-bg: var(--tt-gray-dark-100);
|
|
34
|
+
--tiptap-search-replace-help-label-color: var(--tt-gray-dark-a-500);
|
|
35
|
+
--tiptap-search-replace-code-bg: var(--tt-gray-dark-a-100);
|
|
36
|
+
--tiptap-search-replace-code-border: var(--tt-gray-dark-a-200);
|
|
37
|
+
--tiptap-search-replace-code-color: var(--tt-gray-dark-a-700);
|
|
38
|
+
--tiptap-search-replace-focus-border: var(--tt-brand-color-400);
|
|
39
|
+
--tiptap-search-replace-focus-ring: color-mix(
|
|
40
|
+
in srgb,
|
|
41
|
+
var(--tt-brand-color-400) 25%,
|
|
42
|
+
transparent
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tiptap-card-body.tiptap-search-replace-body {
|
|
47
|
+
width: 100%;
|
|
48
|
+
padding: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tiptap-search-replace-query-controls {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
gap: 0.375rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tiptap-search-replace[data-open="true"] {
|
|
58
|
+
animation:
|
|
59
|
+
fadeIn 150ms cubic-bezier(0.16, 1, 0.3, 1),
|
|
60
|
+
zoomIn 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.tiptap-search-replace[data-open="false"] {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* On narrow screens the panel may stretch to the available width */
|
|
68
|
+
@media (max-width: 480px) {
|
|
69
|
+
.tiptap-search-replace {
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ── Header ─────────────────────────────────────────────────── */
|
|
75
|
+
.tiptap-card-header.tiptap-search-replace-header {
|
|
76
|
+
gap: 0.25rem;
|
|
77
|
+
border: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.tiptap-search-replace-count {
|
|
81
|
+
font-size: 0.625rem;
|
|
82
|
+
font-weight: 700;
|
|
83
|
+
font-variant-numeric: tabular-nums;
|
|
84
|
+
color: var(--tiptap-search-replace-count-color);
|
|
85
|
+
padding-left: 0.625rem;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.tiptap-search-replace-nav-group {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 0.25rem;
|
|
93
|
+
margin-left: auto;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* ── Fields and options ─────────────────────────────────────── */
|
|
97
|
+
.tiptap-search-replace-inputs,
|
|
98
|
+
.tiptap-search-replace-options,
|
|
99
|
+
.tiptap-search-replace-regex-toggle {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
padding-inline: 0.375rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tiptap-search-replace-inputs,
|
|
106
|
+
.tiptap-search-replace-regex-toggle {
|
|
107
|
+
gap: 0.25rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.tiptap-search-replace-input-group {
|
|
111
|
+
border-radius: var(--tt-radius-lg);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.tiptap-search-replace-input-group:has(
|
|
115
|
+
[data-slot="tiptap-input-group-control"]:focus-visible
|
|
116
|
+
) {
|
|
117
|
+
border-color: var(--tiptap-search-replace-focus-border);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* The ↵ badge is only shown while its input is focused */
|
|
121
|
+
.tiptap-search-replace-keyboard-hint-addon {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.tiptap-search-replace-input-group:focus-within
|
|
126
|
+
.tiptap-search-replace-keyboard-hint-addon {
|
|
127
|
+
display: flex;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.tiptap-search-replace-keyboard-hint {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: center;
|
|
134
|
+
width: 1.25rem;
|
|
135
|
+
height: 1rem;
|
|
136
|
+
padding: 0.125rem 0.25rem 0.25rem;
|
|
137
|
+
font-size: 0.75rem;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
color: var(--tiptap-search-replace-kbd-color);
|
|
140
|
+
background-color: var(--tiptap-search-replace-kbd-bg);
|
|
141
|
+
border: 1px solid var(--tiptap-search-replace-kbd-border);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.tiptap-input-group-addon > kbd.tiptap-search-replace-keyboard-hint {
|
|
145
|
+
border-radius: var(--tt-radius-xs);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.tiptap-search-replace-regex-toggle-row {
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
gap: 0.5rem;
|
|
153
|
+
width: 100%;
|
|
154
|
+
border-radius: var(--tt-radius-md, 0.375rem);
|
|
155
|
+
font-size: 0.875rem;
|
|
156
|
+
font-weight: 500;
|
|
157
|
+
color: var(--tiptap-search-replace-option-text-color);
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
transition: background-color 150ms ease;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* ── Regex toggle & explanation box ─────────────────────────── */
|
|
163
|
+
.tiptap-search-replace-regex-toggle-row {
|
|
164
|
+
padding: 0.5rem 0.625rem;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.tiptap-search-replace-regex-toggle-label {
|
|
168
|
+
flex: 1;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.tiptap-search-replace-regex-help,
|
|
172
|
+
.tiptap-search-replace-regex-help-section {
|
|
173
|
+
display: flex;
|
|
174
|
+
flex-direction: column;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.tiptap-search-replace-regex-help {
|
|
178
|
+
padding: 1rem 0.375rem;
|
|
179
|
+
gap: 0.375rem;
|
|
180
|
+
border-radius: var(--tt-radius-lg, 0.75rem);
|
|
181
|
+
background-color: var(--tiptap-search-replace-help-bg);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.tiptap-search-replace-regex-help-section {
|
|
185
|
+
gap: 0.75rem;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Indented to line up with the example buttons' inner text */
|
|
189
|
+
.tiptap-search-replace-regex-help-label {
|
|
190
|
+
padding-inline: 0.375rem;
|
|
191
|
+
font-size: 0.75rem;
|
|
192
|
+
font-weight: 600;
|
|
193
|
+
color: var(--tiptap-search-replace-help-label-color);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Local to this box on purpose: a small ghost button whose label mixes
|
|
197
|
+
plain text with code chips is too specific for a shared primitive. */
|
|
198
|
+
.tiptap-search-replace-regex-example-list.tiptap-button-group:has(
|
|
199
|
+
> [data-slot="tiptap-button-group"]
|
|
200
|
+
) {
|
|
201
|
+
gap: 0.25rem;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.tiptap-search-replace-regex-example-list,
|
|
205
|
+
.tiptap-search-replace-regex-example-row {
|
|
206
|
+
width: 100%;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.tiptap-search-replace-regex-example-button {
|
|
210
|
+
flex: 1;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.tiptap-search-replace-regex-example-button code {
|
|
214
|
+
padding: 0.125rem 0.25rem;
|
|
215
|
+
border-radius: var(--tt-radius-xs, 0.25rem);
|
|
216
|
+
background-color: var(--tiptap-search-replace-code-bg);
|
|
217
|
+
border: 1px solid var(--tiptap-search-replace-code-border);
|
|
218
|
+
color: var(--tiptap-search-replace-code-color);
|
|
219
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
220
|
+
font-size: 0.688rem;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.tiptap-search-replace-regex-help-separator {
|
|
224
|
+
margin-block: 0.25rem;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.tiptap-search-replace-regex-docs-link {
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
gap: 0.375rem;
|
|
231
|
+
padding: 0.375rem;
|
|
232
|
+
border-radius: var(--tt-radius-md, 0.375rem);
|
|
233
|
+
font-size: 0.75rem;
|
|
234
|
+
font-weight: 500;
|
|
235
|
+
color: var(--tiptap-search-replace-option-text-color);
|
|
236
|
+
text-decoration: none;
|
|
237
|
+
transition: background-color 150ms ease;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.tiptap-search-replace-regex-toggle-row:hover,
|
|
241
|
+
.tiptap-search-replace-regex-docs-link:hover {
|
|
242
|
+
background-color: var(--tiptap-search-replace-option-hover-bg-color);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.tiptap-search-replace-regex-docs-link:focus-visible {
|
|
246
|
+
outline: none;
|
|
247
|
+
box-shadow: 0 0 0 3px var(--tiptap-search-replace-focus-ring);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.tiptap-search-replace-regex-toggle-row:has(
|
|
251
|
+
[data-slot="tiptap-switch"][data-disabled]
|
|
252
|
+
) {
|
|
253
|
+
cursor: not-allowed;
|
|
254
|
+
opacity: 0.5;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.tiptap-search-replace-regex-docs-link-icon {
|
|
258
|
+
width: 0.875rem;
|
|
259
|
+
height: 0.875rem;
|
|
260
|
+
color: var(--tiptap-search-replace-option-icon-color);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* ── Actions ────────────────────────────────────────────────── */
|
|
264
|
+
.tiptap-search-replace-actions {
|
|
265
|
+
display: flex;
|
|
266
|
+
justify-content: flex-end;
|
|
267
|
+
width: 100%;
|
|
268
|
+
padding: 0.125rem 0.75rem 0.625rem;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* ── Reduced motion ─────────────────────────────────────────── */
|
|
272
|
+
@media (prefers-reduced-motion: reduce) {
|
|
273
|
+
.tiptap-search-replace,
|
|
274
|
+
.tiptap-search-replace * {
|
|
275
|
+
animation: none !important;
|
|
276
|
+
transition: none !important;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* ── Result highlights ──────────────────────────────────────── */
|
|
281
|
+
|
|
282
|
+
/* The extension's injected CSS is disabled (`injectCSS: false`); results
|
|
283
|
+
are tinted from the brand color, the current one twice as strong. Layout
|
|
284
|
+
concerns (keeping the scrolled-to match clear of sticky chrome) are the
|
|
285
|
+
consumer's — e.g. pass `scrollIntoViewOptions={{ block: "center" }}`. */
|
|
286
|
+
.find-and-replace-result {
|
|
287
|
+
background-color: color-mix(
|
|
288
|
+
in srgb,
|
|
289
|
+
var(--tt-brand-color-300) 20%,
|
|
290
|
+
transparent
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.find-and-replace-result-current {
|
|
295
|
+
background-color: color-mix(
|
|
296
|
+
in srgb,
|
|
297
|
+
var(--tt-color-green-base) 40%,
|
|
298
|
+
transparent
|
|
299
|
+
);
|
|
300
|
+
}
|