astro-tractstack 2.0.0-rc.67 → 2.0.0-rc.69
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/LICENSE +8 -97
- package/README.md +7 -5
- package/package.json +2 -2
- package/templates/src/components/codehooks/FeaturedArticle.astro +1 -1
- package/templates/src/components/codehooks/ListContent.astro +9 -3
- package/templates/src/components/codehooks/ListContentSetup.tsx +36 -22
- package/templates/src/components/compositor/PanelVisibilityWrapper.tsx +0 -4
- package/templates/src/components/edit/Header.tsx +1 -1
- package/templates/src/components/edit/pane/PanePanel_title.tsx +2 -2
- package/templates/src/components/edit/state/SaveModal.tsx +1 -1
- package/templates/src/components/edit/storyfragment/StoryFragmentPanel_slug.tsx +1 -1
- package/templates/src/components/fields/BackgroundImage.tsx +1 -1
- package/templates/src/components/fields/ImageUpload.tsx +1 -1
- package/templates/src/components/search/SearchResults.tsx +4 -4
- package/templates/src/components/storykeep/controls/content/ResourceForm.tsx +17 -2
- package/templates/src/components/storykeep/widgets/Wizard.tsx +1 -1
package/LICENSE
CHANGED
|
@@ -1,102 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Copyright (c) 2025 At Risk Media
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Terms and Conditions
|
|
12
|
-
|
|
13
|
-
### Licensor ("We")
|
|
14
|
-
|
|
15
|
-
The party offering the Software under these Terms and Conditions.
|
|
16
|
-
|
|
17
|
-
### The Software
|
|
18
|
-
|
|
19
|
-
The "Software" is each version of the software that we make available under
|
|
20
|
-
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
-
Conditions with the Software.
|
|
22
|
-
|
|
23
|
-
### License Grant
|
|
24
|
-
|
|
25
|
-
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
-
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
-
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
-
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
-
|
|
30
|
-
### Permitted Purpose
|
|
31
|
-
|
|
32
|
-
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
-
means making the Software available to others in a commercial product or
|
|
34
|
-
service that:
|
|
35
|
-
|
|
36
|
-
1. substitutes for the Software;
|
|
37
|
-
|
|
38
|
-
2. substitutes for any other product or service we offer using the Software
|
|
39
|
-
that exists as of the date we make the Software available; or
|
|
40
|
-
|
|
41
|
-
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
-
|
|
43
|
-
Permitted Purposes specifically include using the Software:
|
|
44
|
-
|
|
45
|
-
1. for your internal use and access;
|
|
46
|
-
|
|
47
|
-
2. for non-commercial education;
|
|
48
|
-
|
|
49
|
-
3. for non-commercial research; and
|
|
50
|
-
|
|
51
|
-
4. in connection with professional services that you provide to a licensee
|
|
52
|
-
using the Software in accordance with these Terms and Conditions.
|
|
53
|
-
|
|
54
|
-
### Patents
|
|
55
|
-
|
|
56
|
-
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
-
patents, the license grant above includes a license under our patents. If you
|
|
58
|
-
make a claim against any party that the Software infringes or contributes to
|
|
59
|
-
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
-
immediately.
|
|
61
|
-
|
|
62
|
-
### Redistribution
|
|
63
|
-
|
|
64
|
-
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
-
the Software.
|
|
66
|
-
|
|
67
|
-
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
-
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
-
remove any copyright notices provided in or with the Software.
|
|
70
|
-
|
|
71
|
-
### Disclaimer
|
|
72
|
-
|
|
73
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
-
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
-
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
-
|
|
77
|
-
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
-
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
-
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
-
|
|
81
|
-
### Trademarks
|
|
82
|
-
|
|
83
|
-
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
-
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
-
trademarks, trade names, service marks or product names.
|
|
86
|
-
|
|
87
|
-
## Grant of Future License
|
|
88
|
-
|
|
89
|
-
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
-
the MIT license that is effective on the second anniversary of the date we make
|
|
91
|
-
the Software available. On or after that date, you may use the Software under
|
|
92
|
-
the MIT license, in which case the following will apply:
|
|
93
|
-
|
|
94
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
95
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
96
|
-
the Software without restriction, including without limitation the rights to
|
|
97
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
98
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
|
99
|
-
so, subject to the following conditions:
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
100
11
|
|
|
101
12
|
The above copyright notice and this permission notice shall be included in all
|
|
102
13
|
copies or substantial portions of the Software.
|
package/README.md
CHANGED
|
@@ -80,7 +80,7 @@ cd ~/t8k/src/my-tractstack
|
|
|
80
80
|
pnpm dev
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
Visit https://127.0.0.1:4321 to access your site and activate your Story Keep (CMS).
|
|
83
|
+
Visit <https://127.0.0.1:4321> to access your site and activate your Story Keep (CMS).
|
|
84
84
|
|
|
85
85
|
## Installation Types
|
|
86
86
|
|
|
@@ -283,14 +283,16 @@ sudo ~/t8k/src/tractstack-go/pkg/scripts/t8k-uninstall.sh
|
|
|
283
283
|
|
|
284
284
|
## Support & Documentation
|
|
285
285
|
|
|
286
|
-
- **Documentation**: https://tractstack.org
|
|
287
|
-
- **GitHub Issues**: https://github.com/AtRiskMedia/tractstack-go/issues
|
|
288
|
-
- **Email Support**: hello@tractstack.com
|
|
286
|
+
- **Documentation**: <https://tractstack.org>
|
|
287
|
+
- **GitHub Issues**: <https://github.com/AtRiskMedia/tractstack-go/issues>
|
|
288
|
+
- **Email Support**: <hello@tractstack.com>
|
|
289
289
|
- **Community**: Join discussions about adaptive web experiences
|
|
290
290
|
|
|
291
291
|
## License
|
|
292
292
|
|
|
293
|
-
|
|
293
|
+
The frontend Astro integration is available via the MIT license.
|
|
294
|
+
|
|
295
|
+
The backend epistemic hypermedia server is available via the **Functional Source License (FSL)** - Commercial use encouraged!
|
|
294
296
|
|
|
295
297
|
The only restriction is no re-selling TractStack as-a-service. Perfect for:
|
|
296
298
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-tractstack",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.69",
|
|
4
4
|
"description": "Astro integration for TractStack - redeeming the web from boring experiences",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"go"
|
|
35
35
|
],
|
|
36
36
|
"author": "AtRiskMedia",
|
|
37
|
-
"license": "
|
|
37
|
+
"license": "MIT",
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
40
|
"url": "git+https://github.com/AtRiskMedia/astro-tractstack.git"
|
|
@@ -40,7 +40,7 @@ const bgColor = parsedOptions.bgColor || '';
|
|
|
40
40
|
class="mx-auto w-full max-w-7xl px-8 py-12"
|
|
41
41
|
style={bgColor ? `background-color: ${bgColor}` : ''}
|
|
42
42
|
>
|
|
43
|
-
<div class="grid grid-cols-1 items-center
|
|
43
|
+
<div class="grid grid-cols-1 items-center md:grid-cols-2 md:gap-y-12">
|
|
44
44
|
<div class="w-full">
|
|
45
45
|
<a href={`/${featuredStory.slug}`} class="block">
|
|
46
46
|
<div class="max-w-lg pr-12">
|
|
@@ -22,6 +22,8 @@ try {
|
|
|
22
22
|
topics: '',
|
|
23
23
|
excludedIds: '',
|
|
24
24
|
pageSize: 10,
|
|
25
|
+
title: '',
|
|
26
|
+
bgColor: '',
|
|
25
27
|
};
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -30,6 +32,8 @@ const excludedIdsArray = parsedOptions.excludedIds
|
|
|
30
32
|
: [];
|
|
31
33
|
const topicsArray = parsedOptions.topics ? parsedOptions.topics.split(',') : [];
|
|
32
34
|
const pageSize = parseInt(parsedOptions.pageSize || '10');
|
|
35
|
+
const title = parsedOptions.title;
|
|
36
|
+
const bgColor = parsedOptions.bgColor || '';
|
|
33
37
|
|
|
34
38
|
// Filter for valid stories to display
|
|
35
39
|
const validPages = contentMap.filter(
|
|
@@ -62,14 +66,16 @@ const sortedStories = [...filteredStories].sort((a, b) => {
|
|
|
62
66
|
// The initial display
|
|
63
67
|
const initialStories = sortedStories.slice(0, pageSize);
|
|
64
68
|
const totalPages = Math.ceil(sortedStories.length / pageSize);
|
|
65
|
-
|
|
66
|
-
const bgColor = parsedOptions.bgColor || '';
|
|
67
69
|
---
|
|
68
70
|
|
|
69
71
|
<div
|
|
70
|
-
class="mx-auto max-w-7xl p-4 py-
|
|
72
|
+
class="mx-auto max-w-7xl p-4 py-24"
|
|
71
73
|
style={bgColor ? `background-color: ${bgColor}` : ''}
|
|
72
74
|
>
|
|
75
|
+
<h2 class="mb-8 text-center text-3xl font-bold text-gray-900">
|
|
76
|
+
{title || `Recent Articles`}
|
|
77
|
+
</h2>
|
|
78
|
+
|
|
73
79
|
{
|
|
74
80
|
initialStories.length === 0 && (
|
|
75
81
|
<div class="rounded-lg bg-gray-50 px-4 py-12 text-center">
|
|
@@ -22,7 +22,6 @@ const ListContentSetup = ({
|
|
|
22
22
|
}: ListContentSetupProps) => {
|
|
23
23
|
const $contentMap = useStore(fullContentMapStore);
|
|
24
24
|
const [isPanelOpen, setIsPanelOpen] = useState(false);
|
|
25
|
-
|
|
26
25
|
const [excludedIds, setExcludedIds] = useState<string[]>(
|
|
27
26
|
params?.excludedIds ? params.excludedIds.split(',') : []
|
|
28
27
|
);
|
|
@@ -34,6 +33,7 @@ const ListContentSetup = ({
|
|
|
34
33
|
);
|
|
35
34
|
const [currentPage, setCurrentPage] = useState(1);
|
|
36
35
|
const [bgColor, setBgColor] = useState(params?.bgColor || '');
|
|
36
|
+
const [title, setTitle] = useState(params?.title || '');
|
|
37
37
|
|
|
38
38
|
const isInitialMount = useRef(true);
|
|
39
39
|
|
|
@@ -43,15 +43,15 @@ const ListContentSetup = ({
|
|
|
43
43
|
selectedTopics.length > 0 ||
|
|
44
44
|
excludedIds.length > 0 ||
|
|
45
45
|
pageSize !== 10 ||
|
|
46
|
-
bgColor !== ''
|
|
46
|
+
bgColor !== '' ||
|
|
47
|
+
title !== '';
|
|
47
48
|
|
|
48
49
|
const validPages = $contentMap.filter(
|
|
49
50
|
(item) =>
|
|
50
51
|
item.type === 'StoryFragment' &&
|
|
51
52
|
typeof item.description === 'string' &&
|
|
52
53
|
typeof item.thumbSrc === 'string' &&
|
|
53
|
-
typeof item.thumbSrcSet === 'string'
|
|
54
|
-
typeof item.changed === 'string'
|
|
54
|
+
typeof item.thumbSrcSet === 'string'
|
|
55
55
|
);
|
|
56
56
|
|
|
57
57
|
// Build topic map for filtering
|
|
@@ -111,6 +111,7 @@ const ListContentSetup = ({
|
|
|
111
111
|
topics: selectedTopics.join(','),
|
|
112
112
|
pageSize: pageSize,
|
|
113
113
|
bgColor: bgColor,
|
|
114
|
+
title: title,
|
|
114
115
|
}),
|
|
115
116
|
},
|
|
116
117
|
bgColour: bgColor || undefined,
|
|
@@ -138,7 +139,7 @@ const ListContentSetup = ({
|
|
|
138
139
|
}, 500);
|
|
139
140
|
|
|
140
141
|
return () => clearTimeout(timeoutId);
|
|
141
|
-
}, [excludedIds, selectedTopics, pageSize, bgColor]);
|
|
142
|
+
}, [excludedIds, selectedTopics, pageSize, bgColor, title]);
|
|
142
143
|
|
|
143
144
|
// Toggle a page's exclusion status
|
|
144
145
|
const toggleExclude = (id: string) => {
|
|
@@ -283,6 +284,23 @@ const ListContentSetup = ({
|
|
|
283
284
|
<h3 className="text-lg font-bold text-gray-900">Content Settings</h3>
|
|
284
285
|
</div>
|
|
285
286
|
<div className="space-y-4 pt-4">
|
|
287
|
+
<div>
|
|
288
|
+
<label
|
|
289
|
+
htmlFor="list-title"
|
|
290
|
+
className="block text-sm font-bold text-gray-700"
|
|
291
|
+
>
|
|
292
|
+
Optional Title
|
|
293
|
+
</label>
|
|
294
|
+
<input
|
|
295
|
+
type="text"
|
|
296
|
+
id="list-title"
|
|
297
|
+
className="mt-1 block w-full rounded-md border-gray-300 px-3 py-2 shadow-sm focus:border-cyan-600 focus:ring-cyan-600 sm:text-sm"
|
|
298
|
+
value={title}
|
|
299
|
+
onChange={(e) => setTitle(e.target.value)}
|
|
300
|
+
placeholder="e.g., Recent Articles"
|
|
301
|
+
/>
|
|
302
|
+
</div>
|
|
303
|
+
|
|
286
304
|
<div>
|
|
287
305
|
<label
|
|
288
306
|
htmlFor="page-size"
|
|
@@ -449,23 +467,9 @@ const ListContentSetup = ({
|
|
|
449
467
|
/>
|
|
450
468
|
</div>
|
|
451
469
|
<div className="ml-4 min-w-0 flex-1">
|
|
452
|
-
<
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
</p>
|
|
456
|
-
<div className="flex items-center space-x-4">
|
|
457
|
-
<button
|
|
458
|
-
onClick={() => toggleExclude(page.id)}
|
|
459
|
-
className={`rounded px-2 py-1 text-xs font-bold ${
|
|
460
|
-
isExcluded
|
|
461
|
-
? 'bg-gray-100 text-gray-700 hover:bg-gray-200'
|
|
462
|
-
: 'bg-red-100 text-red-600 hover:bg-red-200'
|
|
463
|
-
}`}
|
|
464
|
-
>
|
|
465
|
-
{isExcluded ? 'Restore' : 'Exclude'}
|
|
466
|
-
</button>
|
|
467
|
-
</div>
|
|
468
|
-
</div>
|
|
470
|
+
<p className="text-sm font-bold text-gray-900">
|
|
471
|
+
{page.title}
|
|
472
|
+
</p>
|
|
469
473
|
<div className="mt-1">
|
|
470
474
|
<p className="line-clamp-1 text-sm text-gray-500">
|
|
471
475
|
{page.description}
|
|
@@ -486,6 +490,16 @@ const ListContentSetup = ({
|
|
|
486
490
|
{topic}
|
|
487
491
|
</span>
|
|
488
492
|
))}
|
|
493
|
+
<button
|
|
494
|
+
onClick={() => toggleExclude(page.id)}
|
|
495
|
+
className={`rounded px-2 py-1 text-xs font-bold ${
|
|
496
|
+
isExcluded
|
|
497
|
+
? 'bg-gray-100 text-gray-700 hover:bg-gray-200'
|
|
498
|
+
: 'bg-red-100 text-red-600 hover:bg-red-200'
|
|
499
|
+
}`}
|
|
500
|
+
>
|
|
501
|
+
{isExcluded ? 'Restore' : 'Exclude'}
|
|
502
|
+
</button>
|
|
489
503
|
</div>
|
|
490
504
|
)}
|
|
491
505
|
<div className="mt-1 flex items-center text-xs text-gray-500">
|
|
@@ -67,10 +67,6 @@ const PanelVisibilityWrapper = ({
|
|
|
67
67
|
currentActiveMode.panel === panelType &&
|
|
68
68
|
currentActiveMode.paneId === nodeId;
|
|
69
69
|
if (!entries[0].isIntersecting && stillActive) {
|
|
70
|
-
console.log('❌ CLOSING PANEL DUE TO INTERSECTION OBSERVER!', {
|
|
71
|
-
panelType,
|
|
72
|
-
nodeId,
|
|
73
|
-
});
|
|
74
70
|
nodesCtx.closeAllPanels();
|
|
75
71
|
}
|
|
76
72
|
}, 100); // Small delay to allow panel to render
|
|
@@ -102,7 +102,7 @@ const StoryKeepHeader = ({ slug, isContext = false }: StoryKeepHeaderProps) => {
|
|
|
102
102
|
<div className="flex flex-wrap items-center justify-center gap-x-4 gap-y-2 p-2">
|
|
103
103
|
{/* Viewport Section with stacked label */}
|
|
104
104
|
<div className="flex flex-col items-center">
|
|
105
|
-
<span className="text-xs font-
|
|
105
|
+
<span className="text-xs font-bold text-gray-600">Viewport:</span>
|
|
106
106
|
<span className="text-xs text-gray-700">{viewport}</span>
|
|
107
107
|
</div>
|
|
108
108
|
|
|
@@ -285,14 +285,14 @@ const PaneTitlePanel = ({ nodeId, setMode }: PaneTitlePanelProps) => {
|
|
|
285
285
|
{/* Help Text */}
|
|
286
286
|
<div className="space-y-4 text-sm text-gray-600">
|
|
287
287
|
<div>
|
|
288
|
-
<h4 className="font-
|
|
288
|
+
<h4 className="font-bold">Title Guidelines:</h4>
|
|
289
289
|
<ul className="ml-4 mt-1 list-disc">
|
|
290
290
|
<li>5-35 characters recommended for optimal display</li>
|
|
291
291
|
<li>Clear, descriptive title for the pane content</li>
|
|
292
292
|
</ul>
|
|
293
293
|
</div>
|
|
294
294
|
<div>
|
|
295
|
-
<h4 className="font-
|
|
295
|
+
<h4 className="font-bold">Slug Guidelines:</h4>
|
|
296
296
|
<ul className="ml-4 mt-1 list-disc">
|
|
297
297
|
<li>Used for analytics tracking</li>
|
|
298
298
|
<li>Only lowercase letters, numbers, and hyphens</li>
|
|
@@ -905,7 +905,7 @@ export default function SaveModal({
|
|
|
905
905
|
|
|
906
906
|
{stage === 'ERROR' && (
|
|
907
907
|
<div className="mb-4 rounded bg-red-50 p-3 text-red-800">
|
|
908
|
-
<div className="font-
|
|
908
|
+
<div className="font-bold">Save failed</div>
|
|
909
909
|
<div className="mt-1 text-sm">{error}</div>
|
|
910
910
|
</div>
|
|
911
911
|
)}
|
|
@@ -217,7 +217,7 @@ const StoryFragmentSlugPanel = ({
|
|
|
217
217
|
|
|
218
218
|
{isHomeSlug && (
|
|
219
219
|
<div className="mt-4">
|
|
220
|
-
<div className="inline-flex items-center rounded-full bg-blue-100 px-3 py-1.5 text-sm font-
|
|
220
|
+
<div className="inline-flex items-center rounded-full bg-blue-100 px-3 py-1.5 text-sm font-bold text-blue-800">
|
|
221
221
|
<LockClosedIcon className="mr-1.5 h-4 w-4" />
|
|
222
222
|
Home Page
|
|
223
223
|
</div>
|
|
@@ -504,7 +504,7 @@ const BackgroundImage = ({ paneId, onUpdate }: BackgroundImageProps) => {
|
|
|
504
504
|
/>
|
|
505
505
|
</div>
|
|
506
506
|
<div className="flex-1">
|
|
507
|
-
<div className="font-
|
|
507
|
+
<div className="font-bold">
|
|
508
508
|
{file.altDescription || file.filename}
|
|
509
509
|
</div>
|
|
510
510
|
{file.altDescription && (
|
|
@@ -323,7 +323,7 @@ export const ImageUpload = ({
|
|
|
323
323
|
{isSelectingFile && (
|
|
324
324
|
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50">
|
|
325
325
|
<div className="w-full max-w-md rounded-lg bg-white p-6 shadow-lg">
|
|
326
|
-
<h3 className="text-mydarkgrey mb-4 text-lg font-
|
|
326
|
+
<h3 className="text-mydarkgrey mb-4 text-lg font-bold">
|
|
327
327
|
Select an Image
|
|
328
328
|
</h3>
|
|
329
329
|
|
|
@@ -270,7 +270,7 @@ export default function SearchResults({
|
|
|
270
270
|
<div className="mt-3 min-w-0 flex-1 md:mt-0">
|
|
271
271
|
<div className="flex items-start justify-between gap-4">
|
|
272
272
|
<div className="flex-1">
|
|
273
|
-
<h3 className="text-mydarkgrey group-hover:text-myblue mb-2 text-lg font-
|
|
273
|
+
<h3 className="text-mydarkgrey group-hover:text-myblue mb-2 text-lg font-bold transition-colors">
|
|
274
274
|
{item.title}
|
|
275
275
|
</h3>
|
|
276
276
|
{item.description && (
|
|
@@ -320,7 +320,7 @@ export default function SearchResults({
|
|
|
320
320
|
page={currentPage}
|
|
321
321
|
onPageChange={(details) => handlePageChange(details.page)}
|
|
322
322
|
>
|
|
323
|
-
<Pagination.PrevTrigger className="text-mydarkgrey hover:text-myblue mr-2 flex items-center gap-1 rounded px-3 py-2 text-sm font-
|
|
323
|
+
<Pagination.PrevTrigger className="text-mydarkgrey hover:text-myblue mr-2 flex items-center gap-1 rounded px-3 py-2 text-sm font-bold transition-colors disabled:opacity-50">
|
|
324
324
|
<ChevronLeftIcon className="h-4 w-4" />
|
|
325
325
|
Previous
|
|
326
326
|
</Pagination.PrevTrigger>
|
|
@@ -334,7 +334,7 @@ export default function SearchResults({
|
|
|
334
334
|
key={index}
|
|
335
335
|
type="page"
|
|
336
336
|
value={page.value}
|
|
337
|
-
className={`rounded px-3 py-2 text-sm font-
|
|
337
|
+
className={`rounded px-3 py-2 text-sm font-bold transition-colors ${
|
|
338
338
|
page.value === currentPage
|
|
339
339
|
? 'bg-myblue text-white'
|
|
340
340
|
: 'text-mydarkgrey hover:text-myblue'
|
|
@@ -355,7 +355,7 @@ export default function SearchResults({
|
|
|
355
355
|
</Pagination.Context>
|
|
356
356
|
</div>
|
|
357
357
|
|
|
358
|
-
<Pagination.NextTrigger className="text-mydarkgrey hover:text-myblue ml-2 flex items-center gap-1 rounded px-3 py-2 text-sm font-
|
|
358
|
+
<Pagination.NextTrigger className="text-mydarkgrey hover:text-myblue ml-2 flex items-center gap-1 rounded px-3 py-2 text-sm font-bold transition-colors disabled:opacity-50">
|
|
359
359
|
Next
|
|
360
360
|
<ChevronRightIcon className="h-4 w-4" />
|
|
361
361
|
</Pagination.NextTrigger>
|
|
@@ -252,12 +252,26 @@ export default function ResourceForm({
|
|
|
252
252
|
/>
|
|
253
253
|
);
|
|
254
254
|
|
|
255
|
-
case 'image':
|
|
255
|
+
case 'image': {
|
|
256
|
+
let fileUploadValue = ''; // Default to an empty string.
|
|
257
|
+
|
|
258
|
+
if (typeof fieldValue === 'string') {
|
|
259
|
+
// Case 1: The value is a string (Base64 URI).
|
|
260
|
+
fileUploadValue = fieldValue;
|
|
261
|
+
} else if (
|
|
262
|
+
fieldValue &&
|
|
263
|
+
typeof fieldValue === 'object' &&
|
|
264
|
+
fieldValue.src
|
|
265
|
+
) {
|
|
266
|
+
// already saved, url
|
|
267
|
+
fileUploadValue = fieldValue.src;
|
|
268
|
+
}
|
|
269
|
+
|
|
256
270
|
return (
|
|
257
271
|
<FileUpload
|
|
258
272
|
key={fieldName}
|
|
259
273
|
label={fieldName.charAt(0).toUpperCase() + fieldName.slice(1)}
|
|
260
|
-
value={
|
|
274
|
+
value={fileUploadValue}
|
|
261
275
|
onChange={(value) => updateOptionsField(fieldName, value)}
|
|
262
276
|
accept="image/*"
|
|
263
277
|
showPreview={true}
|
|
@@ -265,6 +279,7 @@ export default function ResourceForm({
|
|
|
265
279
|
required={!fieldDef.optional}
|
|
266
280
|
/>
|
|
267
281
|
);
|
|
282
|
+
}
|
|
268
283
|
|
|
269
284
|
default:
|
|
270
285
|
return (
|
|
@@ -259,7 +259,7 @@ export default function Wizard({
|
|
|
259
259
|
<div className="mt-3">
|
|
260
260
|
<a
|
|
261
261
|
href={currentStep.href}
|
|
262
|
-
className="inline-flex items-center rounded-md bg-cyan-600 px-3 py-2 text-sm font-
|
|
262
|
+
className="inline-flex items-center rounded-md bg-cyan-600 px-3 py-2 text-sm font-bold text-white shadow-sm hover:bg-cyan-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-cyan-600"
|
|
263
263
|
>
|
|
264
264
|
{currentStep.buttonText}
|
|
265
265
|
<svg
|