Skip to content

Commit

Permalink
chore: prettier default
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Dec 1, 2021
1 parent 8b4882d commit 7188863
Show file tree
Hide file tree
Showing 43 changed files with 79 additions and 675 deletions.
14 changes: 1 addition & 13 deletions src/components/editor/absolute/EditorCommands.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,7 @@
duration: 150,
},
}"
class="
relative
transform
duration-700
w-60
h-60
overflow-y-auto
bg-theme-background-1
p-2
rounded
transition
shadow-2xl
"
class="relative transform duration-700 w-60 h-60 overflow-y-auto bg-theme-background-1 p-2 rounded transition shadow-2xl"
:class="[visible ? '' : 'top-60']"
>
<EditorAbsoluteCommands
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<template>
<div
class="
flex
mt-1
justify-between
items-center
w-full
p-1
border border-theme-border-commands-1
text-theme-text-commands-1
rounded
"
class="flex mt-1 justify-between items-center w-full p-1 border border-theme-border-commands-1 text-theme-text-commands-1 rounded"
>
<HeroIcon class="text-sm">
<slot name="icon" />
Expand Down
38 changes: 3 additions & 35 deletions src/components/editor/absolute/entity/EditorEntityComment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,13 @@
<div class="fixed left-0 top-0 w-full h-screen bg-modal z-max">
<div
ref="comment"
class="
flex flex-col
fixed
w-96
bg-theme-editor-external-comment-background
hover:bg-theme-editor-external-comment-background-hover
active:bg-theme-editor-external-comment-background-active
px-5
py-2
h-40
rounded
shadow-2xl
"
class="flex flex-col fixed w-96 bg-theme-editor-external-comment-background hover:bg-theme-editor-external-comment-background-hover active:bg-theme-editor-external-comment-background-active px-5 py-2 h-40 rounded shadow-2xl"
:style="style"
>
<div class="flex justify-between items-center cursor-pointer pb-2">
<h2
v-if="entity.raw !== env.emptyLine()"
class="
w-3/4
truncate
font-bold
text-lg text-theme-editor-external-comment-title
hover:text-theme-editor-external-comment-title-hover
active:text-theme-editor-external-comment-title-active
"
class="w-3/4 truncate font-bold text-lg text-theme-editor-external-comment-title hover:text-theme-editor-external-comment-title-hover active:text-theme-editor-external-comment-title-active"
>
{{ raw.v2().normalize(entity.raw) }}
</h2>
Expand All @@ -50,20 +31,7 @@
ref="search"
contenteditable="true"
spellcheck="true"
class="
flex-1
bg-theme-editor-external-comment-textarea-background
hover:bg-theme-editor-external-comment-background-textarea-hover
active:bg-theme-editor-external-comment-background-textarea-active
w-full
rounded-sm
p-2
overflow-y-auto overflow-x-hidden
border-theme-editor-external-comment-border
text-theme-editor-external-comment-text
hover:text-theme-editor-external-comment-text-hover
active:text-theme-editor-external-comment-text-active
"
class="flex-1 bg-theme-editor-external-comment-textarea-background hover:bg-theme-editor-external-comment-background-textarea-hover active:bg-theme-editor-external-comment-background-textarea-active w-full rounded-sm p-2 overflow-y-auto overflow-x-hidden border-theme-editor-external-comment-border text-theme-editor-external-comment-text hover:text-theme-editor-external-comment-text-hover active:text-theme-editor-external-comment-text-active"
@input="onInput"
@mouseenter="onTextArea = true"
@mouseleave="onTextArea = false"
Expand Down
22 changes: 2 additions & 20 deletions src/components/editor/absolute/shortcuts/EditorShortcutsFinder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,7 @@
<Modal @close="onClose">
<div
ref="finder"
class="
fixed
w-60
text-theme-editor-extras-finder-text
hover:text-theme-editor-extras-finder-text-hover
active:text-theme-editor-extras-finder-text-active
bg-theme-editor-extras-finder-background
hover:bg-theme-editor-extras-finder-background-hover
active:bg-theme-editor-extras-finder-background-active
p-2
rounded
shadow-2xl
"
class="fixed w-60 text-theme-editor-extras-finder-text hover:text-theme-editor-extras-finder-text-hover active:text-theme-editor-extras-finder-text-active bg-theme-editor-extras-finder-background hover:bg-theme-editor-extras-finder-background-hover active:bg-theme-editor-extras-finder-background-active p-2 rounded shadow-2xl"
:style="style"
>
<div class="flex flex-col w-full">
Expand Down Expand Up @@ -81,13 +69,7 @@
<input
ref="search"
v-model="entity.fstate.entry"
class="
bg-transparent
border border-theme-editor-extras-finder-border
px-1
mb-1
placeholder-theme-editor-extras-finder-text
"
class="bg-transparent border border-theme-editor-extras-finder-border px-1 mb-1 placeholder-theme-editor-extras-finder-text"
:placeholder="t('editor.text.placeholder.shortcuts.finderEntry')"
@input="entity.finder().onFinder"
@keypress.enter.prevent="entity.finder().onUp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,7 @@
<Modal @close="onClose">
<div
ref="switcher"
class="
fixed
w-60
text-theme-editor-extras-switcher-text
hover:text-theme-editor-extras-switcher-text-hover
active:text-theme-editor-extras-switcher-text-active
bg-theme-editor-extras-switcher-background
hover:bg-theme-editor-extras-switcher-background-hover
active:bg-theme-editor-extras-switcher-background-active
p-2
rounded
shadow-2xl
"
class="fixed w-60 text-theme-editor-extras-switcher-text hover:text-theme-editor-extras-switcher-text-hover active:text-theme-editor-extras-switcher-text-active bg-theme-editor-extras-switcher-background hover:bg-theme-editor-extras-switcher-background-hover active:bg-theme-editor-extras-switcher-background-active p-2 rounded shadow-2xl"
:style="style"
>
<div
Expand Down Expand Up @@ -86,23 +74,12 @@
<input
ref="entry"
v-model="entity.sstate.entry"
class="
bg-transparent
border border-theme-editor-extras-switcher-border
px-1
mb-1
placeholder-theme-editor-extras-switcher-text
"
class="bg-transparent border border-theme-editor-extras-switcher-border px-1 mb-1 placeholder-theme-editor-extras-switcher-text"
:placeholder="t('editor.text.placeholder.shortcuts.switcherEntry')"
/>
<input
v-model="entity.sstate.output"
class="
bg-transparent
border border-theme-editor-extras-switcher-border
px-1
placeholder-theme-editor-extras-switcher-text
"
class="bg-transparent border border-theme-editor-extras-switcher-border px-1 placeholder-theme-editor-extras-switcher-text"
:placeholder="t('editor.text.placeholder.shortcuts.switcherOutput')"
/>
</div>
Expand Down
10 changes: 1 addition & 9 deletions src/components/editor/aside/AsideBarLogo.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<template>
<div
v-cloak
class="
flex
bg-theme-aside-logo-background
justify-around
md:justify-between
items-center
w-full
p-2
"
class="flex bg-theme-aside-logo-background justify-around md:justify-between items-center w-full p-2"
>
<img
class="object-contain cursor-pointer"
Expand Down
8 changes: 1 addition & 7 deletions src/components/editor/aside/graph/AsideGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
<div class="flex px-2 flex-col mt-5 w-full">
<p
v-if="!env.isEmptyProject(PROJECT.name)"
class="
cursor-pointer
font-bold
text-theme-aside-graph-text
hover:text-theme-aside-graph-text-hover
active:text-theme-aside-graph-text-active
"
class="cursor-pointer font-bold text-theme-aside-graph-text hover:text-theme-aside-graph-text-hover active:text-theme-aside-graph-text-active"
@click="graph.base()"
>
{{ PROJECT.nameRaw }}
Expand Down
11 changes: 1 addition & 10 deletions src/components/editor/aside/graph/AsideGraphItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@
props.entity.type !== 'line-break' &&
props.entity.raw !== env.emptyLine()
"
class="
cursor-pointer
bg-theme-aside-graph-background
hover:bg-theme-aside-graph-background-hover
active:bg-theme-aside-graph-background-active
text-theme-aside-graph-text
hover:text-theme-aside-graph-text-hover
active:text-theme-aside-graph-text-active
transition
"
class="cursor-pointer bg-theme-aside-graph-background hover:bg-theme-aside-graph-background-hover active:bg-theme-aside-graph-background-active text-theme-aside-graph-text hover:text-theme-aside-graph-text-hover active:text-theme-aside-graph-text-active transition"
:class="[
props.entity.type === 'heading-one'
? 'border-l border-theme-aside-graph-lines ml-1'
Expand Down
13 changes: 10 additions & 3 deletions src/components/editor/entity/default/EditorEntityDefaultInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
prefix: EDITOR.configuration.commands.prefix,
})
"
:style="{ minHeight: '24px', whiteSpace: 'break-spaces' }"
:style="{
minHeight: '24px',
whiteSpace: 'break-spaces',
paddingBottom: last ? '5rem' : '',
}"
:class="raw.v2().style(props.entity, style)"
@input="onInput"
@keypress.enter.prevent="onEnter"
Expand Down Expand Up @@ -95,6 +99,7 @@
const style = computed(() => EDITOR.styles.show)
const _index = computed(() => CONTEXT.entities.indexOf(props.entity))
const editable = computed(() => !entity.utils().isFixed(_index.value))
const last = computed(() => _index.value === CONTEXT.entities.length - 1)
watch(hover, async (_hover) => {
emitter.emit('entity-hover', _hover)
Expand All @@ -112,6 +117,8 @@
if (_edit) {
if (!hover.value || keyboard.value) input.value?.focus()
if (last.value) scroll.entity(_index.value, 'bottom')
entity.utils().isFixedRaw(props.entity.raw)
? (data.value = '')
: (data.value = props.entity.raw)
Expand Down Expand Up @@ -145,7 +152,7 @@
data.value.startsWith(EDITOR.configuration.commands.prefix) &&
data.value.length <= EDITOR.configuration.commands.prefix.length + 1
) {
// scroll.to(`#entity-${_index.value}`, 'center')
scroll.entity(_index.value, 'center')
commands.value = true
} else {
commands.value = false
Expand Down Expand Up @@ -469,7 +476,7 @@
raw
.v2()
.caret()
.set(input.value as HTMLDivElement, old_raw.value)
.set(input.value as HTMLDivElement, props.entity.raw.length)
// update old raw
old_raw.value = data.value.length
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<template>
<section
v-motion
class="
flex
justify-start
items-start
transition-all
absolute
text-theme-text-1
"
class="flex justify-start items-start transition-all absolute text-theme-text-1"
:class="[
props.entity.type === 'page-break' ? 'top-3' : '',
props.entity.type === 'line-break' ? 'top-3' : '',
Expand All @@ -21,13 +14,7 @@
>
<section
v-if="state.new"
class="
flex
absolute
rounded
bg-theme-editor-entity-popover-background
border-theme-border-1
"
class="flex absolute rounded bg-theme-editor-entity-popover-background border-theme-border-1"
:class="[
props.entity.type === 'line-break' ||
props.entity.type === 'page-break' ||
Expand Down Expand Up @@ -161,15 +148,7 @@
</HeroIcon>
<section
v-if="state.switcher"
class="
flex
absolute
rounded
left-5
bg-theme-editor-entity-popover-background
border-theme-border-1
z-max
"
class="flex absolute rounded left-5 bg-theme-editor-entity-popover-background border-theme-border-1 z-max"
:class="[
props.entity.type === 'line-break' ||
props.entity.type === 'page-break' ||
Expand Down Expand Up @@ -303,17 +282,7 @@
</HeroIcon>
<section
v-if="state.adjust"
class="
absolute
rounded
bottom-5
left-10
text-theme-editor-entity-popover-text
hover:text-theme-editor-entity-popover-text-hover
active:text-theme-editor-entity-popover-text-active
bg-theme-editor-entity-popover-background
border-theme-border-1
"
class="absolute rounded bottom-5 left-10 text-theme-editor-entity-popover-text hover:text-theme-editor-entity-popover-text-hover active:text-theme-editor-entity-popover-text-active bg-theme-editor-entity-popover-background border-theme-border-1"
>
<EditorEntityDefaultInputSelect @click.prevent.stop="onUpEntity">
<template #icon>
Expand Down Expand Up @@ -395,19 +364,7 @@
</HeroIcon>
<section
v-if="state.image"
class="
flex flex-row
absolute
rounded
bottom-5
left-16
p-3
text-theme-editor-entity-popover-text
hover:text-theme-editor-entity-popover-text-hover
active:text-theme-editor-entity-popover-text-active
bg-theme-editor-entity-popover-background
border-theme-border-1
"
class="flex flex-row absolute rounded bottom-5 left-16 p-3 text-theme-editor-entity-popover-text hover:text-theme-editor-entity-popover-text-hover active:text-theme-editor-entity-popover-text-active bg-theme-editor-entity-popover-background border-theme-border-1"
>
<div
class="mx-2 flex flex-col justify-center"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
<template>
<button
class="
flex
items-center
justify-between
p-1
text-theme-editor-entity-popover-text
hover:text-theme-editor-entity-popover-text-hover
active:text-theme-editor-entity-popover-text-active
w-full
hover:bg-theme-editor-entity-popover-background-hover
active:bg-theme-editor-entity-popover-background-active
"
class="flex items-center justify-between p-1 text-theme-editor-entity-popover-text hover:text-theme-editor-entity-popover-text-hover active:text-theme-editor-entity-popover-text-active w-full hover:bg-theme-editor-entity-popover-background-hover active:bg-theme-editor-entity-popover-background-active"
>
<slot name="icon"></slot>
<p class="px-1 text-sm"><slot></slot></p>
Expand Down

0 comments on commit 7188863

Please sign in to comment.