@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.
Files changed (49) hide show
  1. package/dist/components/ui/CardConnector.d.ts +3 -0
  2. package/dist/components/ui/CardConnector.js +6 -0
  3. package/dist/components/ui/CardConnector.js.map +1 -0
  4. package/dist/components/ui/card.d.ts +12 -0
  5. package/dist/components/ui/card.js +10 -0
  6. package/dist/components/ui/card.js.map +1 -0
  7. package/dist/editor/MobileLayout.js +15 -4
  8. package/dist/editor/MobileLayout.js.map +1 -1
  9. package/dist/editor/Terminal.js +27 -17
  10. package/dist/editor/Terminal.js.map +1 -1
  11. package/dist/editor/client/EditorClient.js +9 -4
  12. package/dist/editor/client/EditorClient.js.map +1 -1
  13. package/dist/editor/sidebar/SidebarView.js +14 -14
  14. package/dist/editor/sidebar/SidebarView.js.map +1 -1
  15. package/dist/editor/ui/SimpleTabs.js +1 -1
  16. package/dist/editor/ui/SimpleTabs.js.map +1 -1
  17. package/dist/editor/ui/Splitter.d.ts +1 -0
  18. package/dist/editor/ui/Splitter.js +129 -58
  19. package/dist/editor/ui/Splitter.js.map +1 -1
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.js +1 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/page-wizard/WizardBox.d.ts +2 -8
  24. package/dist/page-wizard/WizardBox.js +3 -5
  25. package/dist/page-wizard/WizardBox.js.map +1 -1
  26. package/dist/page-wizard/steps/CollectStep.js +9 -9
  27. package/dist/page-wizard/steps/CollectStep.js.map +1 -1
  28. package/dist/revision.d.ts +2 -2
  29. package/dist/revision.js +2 -2
  30. package/dist/splash-screen/NewPage.js +12 -11
  31. package/dist/splash-screen/NewPage.js.map +1 -1
  32. package/dist/splash-screen/SplashScreen.js +8 -7
  33. package/dist/splash-screen/SplashScreen.js.map +1 -1
  34. package/dist/styles.css +72 -18
  35. package/package.json +1 -1
  36. package/src/components/ui/CardConnector.tsx +21 -0
  37. package/src/components/ui/card.tsx +44 -0
  38. package/src/editor/MobileLayout.tsx +20 -7
  39. package/src/editor/Terminal.tsx +30 -18
  40. package/src/editor/client/EditorClient.tsx +10 -4
  41. package/src/editor/sidebar/SidebarView.tsx +46 -44
  42. package/src/editor/ui/SimpleTabs.tsx +1 -1
  43. package/src/editor/ui/Splitter.tsx +165 -78
  44. package/src/index.ts +2 -0
  45. package/src/page-wizard/WizardBox.tsx +3 -39
  46. package/src/page-wizard/steps/CollectStep.tsx +8 -9
  47. package/src/revision.ts +2 -2
  48. package/src/splash-screen/NewPage.tsx +107 -80
  49. 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="relative w-2/3">
81
- <ScrollingContentTree
82
- selectedItemId={selectedPage?.id}
83
- onSelectionChange={(selection) => {
84
- const selectedItem = selection[0];
85
- if (selectedItem) {
86
- loadItem(selectedItem);
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 w-1/3 flex-col border-l pl-6">
92
- <div className="mb-3 font-bold">Recent Pages</div>
93
- <div className="relative flex-1">
94
- <ul className="absolute inset-0 overflow-auto">
95
- {history?.map((page, index) => (
96
- <li
97
- key={index}
98
- onMouseOver={() => setSelectedPage(page)}
99
- onClick={() => loadItem(page)}
100
- className="flex cursor-pointer items-center gap-2 p-1 text-xs hover:bg-gray-100"
101
- >
102
- {page.icon && (
103
- <img src={page.icon} width="16" height="16" />
104
- )}{" "}
105
- {page.name}{" "}
106
- <span className="text-gray-500">({page.language})</span>
107
- </li>
108
- ))}
109
- </ul>
110
- </div>
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-3/4 w-2/3 space-y-8 rounded-lg bg-white p-6 p-8 shadow-lg">
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={() =>