mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
Move to TanStack Start from Next.js (#184)
This commit is contained in:
182
web/shared/minimal-tiptap/styles/index.css
Normal file
182
web/shared/minimal-tiptap/styles/index.css
Normal file
@@ -0,0 +1,182 @@
|
||||
@import "./partials/code.css";
|
||||
@import "./partials/placeholder.css";
|
||||
@import "./partials/lists.css";
|
||||
@import "./partials/typography.css";
|
||||
|
||||
:root {
|
||||
--mt-font-size-regular: 0.9375rem;
|
||||
|
||||
--mt-code-background: #082b781f;
|
||||
--mt-code-color: #d4d4d4;
|
||||
--mt-secondary: #9d9d9f;
|
||||
--mt-pre-background: #ececec;
|
||||
--mt-pre-border: #e0e0e0;
|
||||
--mt-pre-color: #2f2f31;
|
||||
--mt-hr: #dcdcdc;
|
||||
--mt-drag-handle-hover: #5c5c5e;
|
||||
|
||||
--mt-accent-bold-blue: #05c;
|
||||
--mt-accent-bold-teal: #206a83;
|
||||
--mt-accent-bold-green: #216e4e;
|
||||
--mt-accent-bold-orange: #a54800;
|
||||
--mt-accent-bold-red: #ae2e24;
|
||||
--mt-accent-bold-purple: #5e4db2;
|
||||
|
||||
--mt-accent-gray: #758195;
|
||||
--mt-accent-blue: #1d7afc;
|
||||
--mt-accent-teal: #2898bd;
|
||||
--mt-accent-green: #22a06b;
|
||||
--mt-accent-orange: #fea362;
|
||||
--mt-accent-red: #c9372c;
|
||||
--mt-accent-purple: #8270db;
|
||||
|
||||
--mt-accent-blue-subtler: #cce0ff;
|
||||
--mt-accent-teal-subtler: #c6edfb;
|
||||
--mt-accent-green-subtler: #baf3db;
|
||||
--mt-accent-yellow-subtler: #f8e6a0;
|
||||
--mt-accent-red-subtler: #ffd5d2;
|
||||
--mt-accent-purple-subtler: #dfd8fd;
|
||||
|
||||
--hljs-string: #aa430f;
|
||||
--hljs-title: #b08836;
|
||||
--hljs-comment: #999999;
|
||||
--hljs-keyword: #0c5eb1;
|
||||
--hljs-attr: #3a92bc;
|
||||
--hljs-literal: #c82b0f;
|
||||
--hljs-name: #259792;
|
||||
--hljs-selector-tag: #c8500f;
|
||||
--hljs-number: #3da067;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--mt-font-size-regular: 0.9375rem;
|
||||
|
||||
--mt-code-background: #ffffff13;
|
||||
--mt-code-color: #2c2e33;
|
||||
--mt-secondary: #595a5c;
|
||||
--mt-pre-background: #080808;
|
||||
--mt-pre-border: #23252a;
|
||||
--mt-pre-color: #e3e4e6;
|
||||
--mt-hr: #26282d;
|
||||
--mt-drag-handle-hover: #969799;
|
||||
|
||||
--mt-accent-bold-blue: #85b8ff;
|
||||
--mt-accent-bold-teal: #9dd9ee;
|
||||
--mt-accent-bold-green: #7ee2b8;
|
||||
--mt-accent-bold-orange: #fec195;
|
||||
--mt-accent-bold-red: #fd9891;
|
||||
--mt-accent-bold-purple: #b8acf6;
|
||||
|
||||
--mt-accent-gray: #738496;
|
||||
--mt-accent-blue: #388bff;
|
||||
--mt-accent-teal: #42b2d7;
|
||||
--mt-accent-green: #2abb7f;
|
||||
--mt-accent-orange: #a54800;
|
||||
--mt-accent-red: #e2483d;
|
||||
--mt-accent-purple: #8f7ee7;
|
||||
|
||||
--mt-accent-blue-subtler: #09326c;
|
||||
--mt-accent-teal-subtler: #164555;
|
||||
--mt-accent-green-subtler: #164b35;
|
||||
--mt-accent-yellow-subtler: #533f04;
|
||||
--mt-accent-red-subtler: #5d1f1a;
|
||||
--mt-accent-purple-subtler: #352c63;
|
||||
|
||||
--hljs-string: #da936b;
|
||||
--hljs-title: #f1d59d;
|
||||
--hljs-comment: #aaaaaa;
|
||||
--hljs-keyword: #6699cc;
|
||||
--hljs-attr: #90cae8;
|
||||
--hljs-literal: #f2777a;
|
||||
--hljs-name: #5fc0a0;
|
||||
--hljs-selector-tag: #e8c785;
|
||||
--hljs-number: #b6e7b6;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror {
|
||||
@apply flex max-w-full flex-1 cursor-text flex-col;
|
||||
@apply z-0 outline-0;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror > div.editor {
|
||||
@apply block flex-1 whitespace-pre-wrap;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .block-node:not(:last-child),
|
||||
.minimal-tiptap-editor .ProseMirror .list-node:not(:last-child),
|
||||
.minimal-tiptap-editor .ProseMirror .text-node:not(:last-child) {
|
||||
@apply mb-2.5;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ol,
|
||||
.minimal-tiptap-editor .ProseMirror ul {
|
||||
@apply pl-6;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror blockquote,
|
||||
.minimal-tiptap-editor .ProseMirror dl,
|
||||
.minimal-tiptap-editor .ProseMirror ol,
|
||||
.minimal-tiptap-editor .ProseMirror p,
|
||||
.minimal-tiptap-editor .ProseMirror pre,
|
||||
.minimal-tiptap-editor .ProseMirror ul {
|
||||
@apply m-0;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror li {
|
||||
@apply leading-7;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror p {
|
||||
@apply break-words;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror li .text-node:has(+ .list-node),
|
||||
.minimal-tiptap-editor .ProseMirror li > .list-node,
|
||||
.minimal-tiptap-editor .ProseMirror li > .text-node,
|
||||
.minimal-tiptap-editor .ProseMirror li p {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror blockquote {
|
||||
@apply relative pl-3.5;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror blockquote::before,
|
||||
.minimal-tiptap-editor .ProseMirror blockquote.is-empty::before {
|
||||
@apply absolute bottom-0 left-0 top-0 h-full w-1 rounded-sm bg-accent-foreground/15 content-[''];
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror hr {
|
||||
@apply my-3 h-0.5 w-full border-none bg-[var(--mt-hr)];
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror-focused hr.ProseMirror-selectednode {
|
||||
@apply rounded-full outline outline-2 outline-offset-1 outline-muted-foreground;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .ProseMirror-gapcursor {
|
||||
@apply pointer-events-none absolute hidden;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .ProseMirror-hideselection {
|
||||
@apply caret-transparent;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror.resize-cursor {
|
||||
@apply cursor-col-resize;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .selection {
|
||||
@apply inline-block;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .selection,
|
||||
.minimal-tiptap-editor .ProseMirror *::selection,
|
||||
::selection {
|
||||
@apply bg-primary/25;
|
||||
}
|
||||
|
||||
/* Override native selection when custom selection is present */
|
||||
.minimal-tiptap-editor .ProseMirror .selection::selection {
|
||||
background: transparent;
|
||||
}
|
||||
86
web/shared/minimal-tiptap/styles/partials/code.css
Normal file
86
web/shared/minimal-tiptap/styles/partials/code.css
Normal file
@@ -0,0 +1,86 @@
|
||||
.minimal-tiptap-editor .ProseMirror code.inline {
|
||||
@apply rounded border border-[var(--mt-code-color)] bg-[var(--mt-code-background)] px-1 py-0.5 text-sm;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror pre {
|
||||
@apply relative overflow-auto rounded border font-mono text-sm;
|
||||
@apply border-[var(--mt-pre-border)] bg-[var(--mt-pre-background)] text-[var(--mt-pre-color)];
|
||||
@apply hyphens-none whitespace-pre text-left;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror code {
|
||||
@apply break-words leading-[1.7em];
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror pre code {
|
||||
@apply block overflow-x-auto p-3.5;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror pre {
|
||||
.hljs-keyword,
|
||||
.hljs-operator,
|
||||
.hljs-function,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: var(--hljs-keyword);
|
||||
}
|
||||
|
||||
.hljs-attr,
|
||||
.hljs-symbol,
|
||||
.hljs-property,
|
||||
.hljs-attribute,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-params {
|
||||
color: var(--hljs-attr);
|
||||
}
|
||||
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-type,
|
||||
.hljs-addition {
|
||||
color: var(--hljs-name);
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet {
|
||||
color: var(--hljs-string);
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-subst,
|
||||
.hljs-section {
|
||||
color: var(--hljs-title);
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-deletion {
|
||||
color: var(--hljs-literal);
|
||||
}
|
||||
|
||||
.hljs-selector-tag,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: var(--hljs-selector-tag);
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: var(--hljs-number);
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta,
|
||||
.hljs-quote {
|
||||
color: var(--hljs-comment);
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
@apply italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
@apply font-bold;
|
||||
}
|
||||
}
|
||||
93
web/shared/minimal-tiptap/styles/partials/lists.css
Normal file
93
web/shared/minimal-tiptap/styles/partials/lists.css
Normal file
@@ -0,0 +1,93 @@
|
||||
.minimal-tiptap-editor div.tiptap p {
|
||||
@apply text-[var(--mt-font-size-regular)];
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ol {
|
||||
@apply list-decimal;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ol ol {
|
||||
list-style: lower-alpha;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ol ol ol {
|
||||
list-style: lower-roman;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ul {
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ul ul {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ul ul ul {
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] {
|
||||
@apply list-none pl-1;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] p {
|
||||
@apply m-0;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] li > label {
|
||||
@apply mr-2 mt-0.5 flex-none select-none;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror li[data-type="taskItem"] {
|
||||
@apply flex flex-row items-start;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor
|
||||
.ProseMirror
|
||||
li[data-type="taskItem"]
|
||||
.taskItem-checkbox-container {
|
||||
@apply relative pr-2;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .taskItem-drag-handle {
|
||||
@apply absolute -left-5 top-1.5 h-[18px] w-[18px] cursor-move pl-0.5 text-[var(--mt-secondary)] opacity-0;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor
|
||||
.ProseMirror
|
||||
li[data-type="taskItem"]:hover:not(:has(li:hover))
|
||||
> .taskItem-checkbox-container
|
||||
> .taskItem-drag-handle {
|
||||
@apply opacity-100;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .taskItem-drag-handle:hover {
|
||||
@apply text-[var(--mt-drag-handle-hover)];
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .taskItem-checkbox {
|
||||
fill-opacity: 0;
|
||||
@apply h-3.5 w-3.5 flex-shrink-0 cursor-pointer select-none appearance-none rounded border border-solid border-[var(--mt-secondary)] bg-transparent bg-[1px_2px] p-0.5 align-middle transition-colors duration-75 ease-out;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .taskItem-checkbox:checked {
|
||||
@apply border-primary bg-primary bg-no-repeat;
|
||||
background-image: url("data:image/svg+xml;utf8,%3Csvg%20width=%2210%22%20height=%229%22%20viewBox=%220%200%2010%208%22%20xmlns=%22http://www.w3.org/2000/svg%22%20fill=%22%23fbfbfb%22%3E%3Cpath%20d=%22M3.46975%205.70757L1.88358%204.1225C1.65832%203.8974%201.29423%203.8974%201.06897%204.1225C0.843675%204.34765%200.843675%204.7116%201.06897%204.93674L3.0648%206.93117C3.29006%207.15628%203.65414%207.15628%203.8794%206.93117L8.93103%201.88306C9.15633%201.65792%209.15633%201.29397%208.93103%201.06883C8.70578%200.843736%208.34172%200.843724%208.11646%201.06879C8.11645%201.0688%208.11643%201.06882%208.11642%201.06883L3.46975%205.70757Z%22%20stroke-width=%220.2%22%20/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .taskItem-content {
|
||||
@apply min-w-0 flex-1;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor
|
||||
.ProseMirror
|
||||
li[data-checked="true"]
|
||||
.taskItem-content
|
||||
> :not([data-type="taskList"]),
|
||||
.minimal-tiptap-editor
|
||||
.ProseMirror
|
||||
li[data-checked="true"]
|
||||
.taskItem-content
|
||||
.taskItem-checkbox {
|
||||
@apply opacity-75;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
.minimal-tiptap-editor .ProseMirror > p.is-editor-empty::before {
|
||||
content: attr(data-placeholder);
|
||||
@apply pointer-events-none float-left h-0 text-[var(--mt-secondary)];
|
||||
}
|
||||
27
web/shared/minimal-tiptap/styles/partials/typography.css
Normal file
27
web/shared/minimal-tiptap/styles/partials/typography.css
Normal file
@@ -0,0 +1,27 @@
|
||||
.minimal-tiptap-editor .ProseMirror .heading-node {
|
||||
@apply relative font-semibold;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror .heading-node:first-child {
|
||||
@apply mt-0;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror h1 {
|
||||
@apply mb-4 mt-[46px] text-[1.375rem] leading-7 tracking-[-0.004375rem];
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror h2 {
|
||||
@apply mb-3.5 mt-8 text-[1.1875rem] leading-7 tracking-[0.003125rem];
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror h3 {
|
||||
@apply mb-3 mt-6 text-[1.0625rem] leading-6 tracking-[0.00625rem];
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror a.link {
|
||||
@apply cursor-pointer text-primary;
|
||||
}
|
||||
|
||||
.minimal-tiptap-editor .ProseMirror a.link:hover {
|
||||
@apply underline;
|
||||
}
|
||||
Reference in New Issue
Block a user