@alpaca-editor/core 1.0.3914 → 1.0.3915

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 (40) hide show
  1. package/dist/config/types.d.ts +2 -2
  2. package/dist/editor/Titlebar.js +5 -1
  3. package/dist/editor/Titlebar.js.map +1 -1
  4. package/dist/editor/client/EditorClient.js +3 -4
  5. package/dist/editor/client/EditorClient.js.map +1 -1
  6. package/dist/page-wizard/PageWizard.d.ts +5 -1
  7. package/dist/page-wizard/PageWizard.js.map +1 -1
  8. package/dist/page-wizard/steps/CollectStep.js +20 -13
  9. package/dist/page-wizard/steps/CollectStep.js.map +1 -1
  10. package/dist/page-wizard/steps/ComponentTypesSelector.js +2 -2
  11. package/dist/page-wizard/steps/ComponentTypesSelector.js.map +1 -1
  12. package/dist/page-wizard/steps/ContentStep.js +5 -5
  13. package/dist/page-wizard/steps/ContentStep.js.map +1 -1
  14. package/dist/page-wizard/steps/ImagesStep.js +2 -2
  15. package/dist/page-wizard/steps/ImagesStep.js.map +1 -1
  16. package/dist/page-wizard/steps/LayoutStep.js +4 -4
  17. package/dist/page-wizard/steps/LayoutStep.js.map +1 -1
  18. package/dist/page-wizard/steps/MetaDataStep.js +1 -1
  19. package/dist/page-wizard/steps/MetaDataStep.js.map +1 -1
  20. package/dist/page-wizard/steps/SelectStep.js +7 -5
  21. package/dist/page-wizard/steps/SelectStep.js.map +1 -1
  22. package/dist/revision.d.ts +2 -2
  23. package/dist/revision.js +2 -2
  24. package/dist/splash-screen/SplashScreen.js +5 -1
  25. package/dist/splash-screen/SplashScreen.js.map +1 -1
  26. package/dist/styles.css +5 -0
  27. package/package.json +1 -1
  28. package/src/config/types.ts +6 -2
  29. package/src/editor/Titlebar.tsx +5 -2
  30. package/src/editor/client/EditorClient.tsx +3 -4
  31. package/src/page-wizard/PageWizard.tsx +3 -1
  32. package/src/page-wizard/steps/CollectStep.tsx +37 -12
  33. package/src/page-wizard/steps/ComponentTypesSelector.tsx +2 -2
  34. package/src/page-wizard/steps/ContentStep.tsx +5 -5
  35. package/src/page-wizard/steps/ImagesStep.tsx +2 -2
  36. package/src/page-wizard/steps/LayoutStep.tsx +4 -4
  37. package/src/page-wizard/steps/MetaDataStep.tsx +1 -1
  38. package/src/page-wizard/steps/SelectStep.tsx +20 -10
  39. package/src/revision.ts +2 -2
  40. package/src/splash-screen/SplashScreen.tsx +19 -0
@@ -74,7 +74,7 @@ export const ImagesStep = (props: StepComponentProps) => {
74
74
 
75
75
  const editContext = useEditContext();
76
76
 
77
- const propName = props.step.propertyName || "images";
77
+ const propName = props.step.fields.propertyName || "images";
78
78
 
79
79
  const [showFolderDialog, setShowFolderDialog] = useState<boolean>(false);
80
80
  const [collapsedSections, setCollapsedSections] = useState<Set<number>>(
@@ -106,7 +106,7 @@ export const ImagesStep = (props: StepComponentProps) => {
106
106
  Please anaylze the provided data and suggest a number of images and specific keywords per image. The keywords will be used to find matching images in the image library.
107
107
  Response JSON format: { images: Image[] } type Image = { title: string, keywords: string[] }
108
108
  Input data: ${JSON.stringify(props.data)}
109
- Instructions: ${props.step.instructions}`,
109
+ Instructions: ${props.step.fields.instructions}`,
110
110
 
111
111
  name: "system",
112
112
  role: "system",
@@ -44,7 +44,7 @@ export function LayoutStep({
44
44
  }, [data.pageModel, isLoading]);
45
45
 
46
46
  useEffect(() => {
47
- setCustomInstructions(step.instructions);
47
+ setCustomInstructions(step.fields.instructions);
48
48
  }, []);
49
49
 
50
50
  const createLayout = async () => {
@@ -133,10 +133,10 @@ export function LayoutStep({
133
133
  if (!selectedComponentTypes.length) return;
134
134
 
135
135
  // Only set custom instructions if they're not already set or if step.instructions has changed
136
- if (customInstructions !== step.instructions) {
137
- setCustomInstructions(step.instructions);
136
+ if (customInstructions !== step.fields.instructions) {
137
+ setCustomInstructions(step.fields.instructions);
138
138
  }
139
- }, [step.instructions, selectedComponentTypes]);
139
+ }, [step.fields.instructions, selectedComponentTypes]);
140
140
 
141
141
  // Custom instructions panel
142
142
  const customInstructionsPanel = () => {
@@ -50,7 +50,7 @@ export function MetaDataStep({
50
50
 
51
51
  const generateMetaFields = async () => {
52
52
  const metaInstructions =
53
- step["Instructions for generating item name and meta fields"];
53
+ step.fields["Instructions for generating item name and meta fields"];
54
54
 
55
55
  setIsGenerating(true);
56
56
 
@@ -35,10 +35,10 @@ export function SelectStep({
35
35
  const [loading, setLoading] = useState(false);
36
36
  const [error, setError] = useState<string | null>(null);
37
37
  const [selectedOptions, setSelectedOptions] = useState<string[]>([]);
38
- const [instructions, setInstructions] = useState(step.instructions);
38
+ const [instructions, setInstructions] = useState(step.fields.instructions);
39
39
 
40
40
  // Get the property name from the step or use "choice" as default
41
- const propertyName = step.propertyName || "selectedOptions";
41
+ const propertyName = step.fields.propertyName || "selectedOptions";
42
42
 
43
43
  useEffect(() => {
44
44
  if (data[propertyName]?.length) {
@@ -91,7 +91,7 @@ export function SelectStep({
91
91
  createWizardAiContext,
92
92
  { allowedFunctions: [] },
93
93
  undefined,
94
- step.aiModel || "gpt-4.1",
94
+ step.fields.aiModel || "gpt-4.1",
95
95
  );
96
96
 
97
97
  // Parse the result and set options
@@ -131,7 +131,7 @@ export function SelectStep({
131
131
  return;
132
132
  }
133
133
  generateOptions();
134
- }, [step.instructions, internalState]);
134
+ }, [step.fields.instructions, internalState]);
135
135
 
136
136
  // Sync data[propertyName] with selectedOptions state
137
137
  useEffect(() => {
@@ -180,9 +180,12 @@ export function SelectStep({
180
180
  return (
181
181
  <div className="flex h-full flex-col md:flex-row">
182
182
  <WizardBox
183
- title="Configuration"
183
+ title={step.fields.configureTitle || "Configuration"}
184
184
  icon={<Settings />}
185
- description="Configure instructions and regenerate options"
185
+ description={
186
+ step.fields.configureDescription ||
187
+ "Configure instructions and regenerate options"
188
+ }
186
189
  className="md:w-96"
187
190
  >
188
191
  <div className="flex h-full flex-col items-stretch">
@@ -193,7 +196,7 @@ export function SelectStep({
193
196
  className="h-48 w-full text-sm"
194
197
  value={instructions}
195
198
  onChange={(e) => setInstructions(e.target.value)}
196
- placeholder="Enter instructions for the options"
199
+ placeholder="Enter instructions for generating the options"
197
200
  />
198
201
  </div>
199
202
  </div>
@@ -212,15 +215,22 @@ export function SelectStep({
212
215
  </WizardBox>
213
216
  <WizardBoxConnector />
214
217
  <WizardBox
215
- title="Select Options"
218
+ title={step.fields.selectOptionsTitle || "Select Options"}
216
219
  icon={<CheckSquare />}
217
- description="Choose from the generated options below"
220
+ description={
221
+ step.fields.selectOptionsDescription ||
222
+ "Choose from the generated options below"
223
+ }
218
224
  className="flex-1"
219
225
  >
220
226
  <div className="h-full">
221
227
  {loading && (
222
228
  <div className="flex h-full items-center justify-center">
223
- <Generate title="Generating options..." />
229
+ <Generate
230
+ title={
231
+ step.fields.generatingOptionsText || "Generating options..."
232
+ }
233
+ />
224
234
  </div>
225
235
  )}
226
236
  {!loading && (
package/src/revision.ts CHANGED
@@ -1,2 +1,2 @@
1
- export const version = "1.0.3914";
2
- export const buildDate = "2025-06-02 01:46:23";
1
+ export const version = "1.0.3915";
2
+ export const buildDate = "2025-06-02 11:42:22";
@@ -134,6 +134,25 @@ export function SplashScreen() {
134
134
  <ActionButton onClick={() => editContext?.startTour()}>
135
135
  Take tour <MagicEditIcon />
136
136
  </ActionButton>
137
+ <ActionButton
138
+ onClick={() => {
139
+ window.open(
140
+ "/sitecore/shell/sitecore/client/Applications/Launchpad",
141
+ "_blank",
142
+ );
143
+ }}
144
+ >
145
+ Open Sitecore Launchpad
146
+ </ActionButton>
147
+
148
+ <ActionButton
149
+ className="mt-6 md:mt-18"
150
+ onClick={() => {
151
+ editContext?.switchView("page-editor");
152
+ }}
153
+ >
154
+ Return to editor
155
+ </ActionButton>
137
156
  </div>
138
157
  </div>
139
158
  </Card>