@alpaca-editor/core 1.0.3898 → 1.0.3900
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/components/ui/CardConnector.d.ts +3 -0
- package/dist/components/ui/CardConnector.js +6 -0
- package/dist/components/ui/CardConnector.js.map +1 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.js +10 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/editor/MobileLayout.js +15 -4
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/Terminal.js +27 -17
- package/dist/editor/Terminal.js.map +1 -1
- package/dist/editor/client/EditorClient.js +9 -4
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/sidebar/SidebarView.js +14 -14
- package/dist/editor/sidebar/SidebarView.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.js +1 -1
- package/dist/editor/ui/SimpleTabs.js.map +1 -1
- package/dist/editor/ui/Splitter.d.ts +1 -0
- package/dist/editor/ui/Splitter.js +129 -58
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/page-wizard/WizardBox.d.ts +2 -8
- package/dist/page-wizard/WizardBox.js +3 -5
- package/dist/page-wizard/WizardBox.js.map +1 -1
- package/dist/page-wizard/steps/CollectStep.js +9 -9
- package/dist/page-wizard/steps/CollectStep.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/NewPage.js +12 -11
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/SplashScreen.js +8 -7
- package/dist/splash-screen/SplashScreen.js.map +1 -1
- package/dist/styles.css +72 -18
- package/package.json +1 -1
- package/src/components/ui/CardConnector.tsx +21 -0
- package/src/components/ui/card.tsx +44 -0
- package/src/editor/MobileLayout.tsx +20 -7
- package/src/editor/Terminal.tsx +30 -18
- package/src/editor/client/EditorClient.tsx +10 -4
- package/src/editor/sidebar/SidebarView.tsx +46 -44
- package/src/editor/ui/SimpleTabs.tsx +1 -1
- package/src/editor/ui/Splitter.tsx +165 -78
- package/src/index.ts +2 -0
- package/src/page-wizard/WizardBox.tsx +3 -39
- package/src/page-wizard/steps/CollectStep.tsx +8 -9
- package/src/revision.ts +2 -2
- package/src/splash-screen/NewPage.tsx +107 -80
- package/src/splash-screen/SplashScreen.tsx +49 -33
|
@@ -10,6 +10,7 @@ import { usePathname, useRouter } from "next/navigation";
|
|
|
10
10
|
import { SimpleIconButton } from "../editor/ui/SimpleIconButton";
|
|
11
11
|
import { Spinner } from "../editor/ui/Spinner";
|
|
12
12
|
import { ItemDescriptor } from "../editor/pageModel";
|
|
13
|
+
import { Card } from "../components/ui/card";
|
|
13
14
|
|
|
14
15
|
export function SplashScreen() {
|
|
15
16
|
const savedHistory =
|
|
@@ -76,38 +77,53 @@ export function SplashScreen() {
|
|
|
76
77
|
const tabs: Tab[] = [
|
|
77
78
|
{
|
|
78
79
|
content: (
|
|
79
|
-
<div className="flex flex-1 gap-4 text-sm">
|
|
80
|
-
<div className="
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
<div className="flex flex-1 flex-col gap-4 text-sm md:flex-row">
|
|
81
|
+
<div className="flex-1">
|
|
82
|
+
<Card
|
|
83
|
+
icon={<i className="pi pi-sitemap text-sm"></i>}
|
|
84
|
+
title="Browse Content"
|
|
85
|
+
description="Navigate through your content structure"
|
|
86
|
+
noPadding
|
|
87
|
+
>
|
|
88
|
+
<div className="relative h-full">
|
|
89
|
+
<ScrollingContentTree
|
|
90
|
+
selectedItemId={selectedPage?.id}
|
|
91
|
+
onSelectionChange={(selection) => {
|
|
92
|
+
const selectedItem = selection[0];
|
|
93
|
+
if (selectedItem) {
|
|
94
|
+
loadItem(selectedItem);
|
|
95
|
+
}
|
|
96
|
+
}}
|
|
97
|
+
/>
|
|
98
|
+
</div>
|
|
99
|
+
</Card>
|
|
90
100
|
</div>
|
|
91
|
-
<div className="flex
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
101
|
+
<div className="flex-1 md:pl-4">
|
|
102
|
+
<Card
|
|
103
|
+
icon={<i className="pi pi-history text-sm"></i>}
|
|
104
|
+
title="Recent Pages"
|
|
105
|
+
description="Quick access to your recently viewed pages"
|
|
106
|
+
noPadding
|
|
107
|
+
>
|
|
108
|
+
<div className="relative h-full">
|
|
109
|
+
<ul className="absolute inset-0 overflow-auto p-6 pt-0">
|
|
110
|
+
{history?.map((page, index) => (
|
|
111
|
+
<li
|
|
112
|
+
key={index}
|
|
113
|
+
onMouseOver={() => setSelectedPage(page)}
|
|
114
|
+
onClick={() => loadItem(page)}
|
|
115
|
+
className="flex cursor-pointer items-center gap-2 rounded p-2 text-xs hover:bg-gray-100"
|
|
116
|
+
>
|
|
117
|
+
{page.icon && (
|
|
118
|
+
<img src={page.icon} width="16" height="16" />
|
|
119
|
+
)}{" "}
|
|
120
|
+
{page.name}{" "}
|
|
121
|
+
<span className="text-gray-500">({page.language})</span>
|
|
122
|
+
</li>
|
|
123
|
+
))}
|
|
124
|
+
</ul>
|
|
125
|
+
</div>
|
|
126
|
+
</Card>
|
|
111
127
|
</div>
|
|
112
128
|
</div>
|
|
113
129
|
),
|
|
@@ -128,7 +144,7 @@ export function SplashScreen() {
|
|
|
128
144
|
|
|
129
145
|
return (
|
|
130
146
|
<div className="flex h-full items-center justify-center bg-gray-100">
|
|
131
|
-
<div className="relative h-
|
|
147
|
+
<div className="relative h-full w-full space-y-8 rounded-lg bg-white p-4 shadow-lg md:h-3/4 md:w-2/3 md:p-8">
|
|
132
148
|
<div className="flex h-full flex-col">
|
|
133
149
|
<div className="flex flex-1 flex-col">
|
|
134
150
|
<SimpleTabs
|
|
@@ -147,7 +163,7 @@ export function SplashScreen() {
|
|
|
147
163
|
</div>
|
|
148
164
|
</div>
|
|
149
165
|
|
|
150
|
-
<div className="absolute top-0 right-0 p-2">
|
|
166
|
+
<div className="absolute top-0 right-0 hidden p-2 md:block">
|
|
151
167
|
<SimpleIconButton
|
|
152
168
|
icon="pi pi-times"
|
|
153
169
|
onClick={() =>
|