@viglet/shio-sections 2026.3.2 → 2026.3.3
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 +201 -201
- package/README.md +6 -5
- package/dist/components.d.ts +14 -1
- package/dist/index.d.ts +3 -3
- package/dist/post-types.d.ts +24 -0
- package/dist/shio-sections.js +130 -114
- package/dist/shio-sections.umd.cjs +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +7 -7
package/LICENSE
CHANGED
|
@@ -1,201 +1,201 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@viglet/shio-sections)
|
|
4
4
|
[](https://github.com/openviglet/shio/blob/HEAD/LICENSE)
|
|
5
|
-
[](https://openviglet.github.io/shio/)
|
|
6
6
|
|
|
7
|
-
The **page-section vocabulary** for **[Viglet Shio](https://
|
|
8
|
-
the open source **
|
|
7
|
+
The **page-section vocabulary** for **[Viglet Shio](https://openviglet.github.io/shio/)**,
|
|
8
|
+
the open source, **agent-ready CMS**: composable section
|
|
9
9
|
post-types authored with [`@viglet/shio-model`](https://www.npmjs.com/package/@viglet/shio-model),
|
|
10
10
|
plus the matching **React** components.
|
|
11
11
|
|
|
@@ -25,7 +25,7 @@ npm install react
|
|
|
25
25
|
|
|
26
26
|
## The vocabulary
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Eight sections, plus the page and menu types that hold them:
|
|
29
29
|
|
|
30
30
|
| Post-type | Factory | React component | For |
|
|
31
31
|
|---|---|---|---|
|
|
@@ -36,6 +36,7 @@ Seven sections, plus the page and menu types that hold them:
|
|
|
36
36
|
| `SectionTestimonial` | `sectionTestimonial()` | `<Testimonial>` | Quote, author, portrait |
|
|
37
37
|
| `SectionFaq` | `sectionFaq()` | `<Faq>` | Question / answer rows |
|
|
38
38
|
| `SectionRichText` | `sectionRichText()` | `<RichText>` | Free-form HTML body |
|
|
39
|
+
| `SectionMarkup` | `sectionMarkup()` | `<Markup>` | Markup kept verbatim from a captured page (SH763) |
|
|
39
40
|
| `Page` | `page()` | `<Sections>` | The ordered list of sections |
|
|
40
41
|
| `Menu` / `MenuItem` | `menu()` / `menuItem()` | — | Navigation |
|
|
41
42
|
|
|
@@ -139,7 +140,7 @@ npm test # node:test
|
|
|
139
140
|
|
|
140
141
|
## License
|
|
141
142
|
|
|
142
|
-
Apache-2.0 — [Viglet Shio](https://
|
|
143
|
+
Apache-2.0 — [Viglet Shio](https://openviglet.github.io/shio/) ·
|
|
143
144
|
[github.com/openviglet/shio](https://github.com/openviglet/shio) ·
|
|
144
145
|
[docs.viglet.org/shio](https://docs.viglet.org/shio/) ·
|
|
145
146
|
part of the [Viglet](https://www.viglet.org) open source family.
|
package/dist/components.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JSX } from "react";
|
|
2
|
-
import { type CtaData, type FaqData, type FeatureGridData, type HeroData, type LogoWallData, type RichTextData, type SectionProps, type TestimonialData } from "./types";
|
|
2
|
+
import { type CtaData, type FaqData, type FeatureGridData, type HeroData, type LogoWallData, type MarkupData, type RichTextData, type SectionProps, type TestimonialData } from "./types";
|
|
3
3
|
export declare function Hero({ data, resolveAsset, className, postId }: SectionProps<HeroData>): JSX.Element;
|
|
4
4
|
export declare function FeatureGrid({ data, className, postId }: SectionProps<FeatureGridData>): JSX.Element;
|
|
5
5
|
export declare function Cta({ data, className, postId }: SectionProps<CtaData>): JSX.Element;
|
|
@@ -7,6 +7,19 @@ export declare function LogoWall({ data, resolveAsset, className, postId }: Sect
|
|
|
7
7
|
export declare function Testimonial({ data, resolveAsset, className, postId }: SectionProps<TestimonialData>): JSX.Element;
|
|
8
8
|
export declare function Faq({ data, className, postId }: SectionProps<FaqData>): JSX.Element;
|
|
9
9
|
export declare function RichText({ data, className, postId }: SectionProps<RichTextData>): JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Markup the conversion kept as the source wrote it (SH763).
|
|
12
|
+
*
|
|
13
|
+
* The one component that draws no structure of its own, and that is the type's whole point: it
|
|
14
|
+
* holds a run of somebody else's page, so a heading level or a landmark added here would be markup
|
|
15
|
+
* the source did not have. It gets **no** `shio-section` class for the same reason — that class is
|
|
16
|
+
* the vocabulary's spacing, and applying it to captured markup would move the source's own layout.
|
|
17
|
+
*
|
|
18
|
+
* The wrapper exists at all so the block is addressable: `editable("html")` is what lets a curator
|
|
19
|
+
* replace a raw block from the editor rather than only from the console form, and `editableSection`
|
|
20
|
+
* is what tells the bridge which post it writes back to.
|
|
21
|
+
*/
|
|
22
|
+
export declare function Markup({ data, className, postId }: SectionProps<MarkupData>): JSX.Element;
|
|
10
23
|
/**
|
|
11
24
|
* Post-type name → component.
|
|
12
25
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { MENU_ITEM_TYPE, MENU_TYPE, PAGE_TYPE, SECTION_TYPES, menu, menuItem, page, sectionCta, sectionFaq, sectionFeatureGrid, sectionHero, sectionLogoWall, sectionRichText, sectionTestimonial, sectionPostTypes, } from "./post-types";
|
|
2
|
-
export { Cta, Faq, FeatureGrid, Hero, LogoWall, RichText, Testimonial, SECTION_COMPONENTS, } from "./components";
|
|
1
|
+
export { MENU_ITEM_TYPE, MENU_TYPE, PAGE_TYPE, SECTION_TYPES, menu, menuItem, page, sectionCta, sectionFaq, sectionFeatureGrid, sectionHero, sectionLogoWall, sectionMarkup, sectionRichText, sectionTestimonial, sectionPostTypes, } from "./post-types";
|
|
2
|
+
export { Cta, Faq, FeatureGrid, Hero, LogoWall, Markup, RichText, Testimonial, SECTION_COMPONENTS, } from "./components";
|
|
3
3
|
export { Sections } from "./sections";
|
|
4
4
|
export type { SectionsProps } from "./sections";
|
|
5
5
|
export { defaultResolveAsset, rows, str } from "./types";
|
|
6
|
-
export type { CtaData, FaqData, FeatureGridData, HeroData, LogoWallData, RichTextData, SectionPost, SectionProps, TestimonialData, } from "./types";
|
|
6
|
+
export type { CtaData, FaqData, FeatureGridData, HeroData, LogoWallData, MarkupData, RichTextData, SectionPost, SectionProps, TestimonialData, } from "./types";
|
package/dist/post-types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const SECTION_TYPES: {
|
|
|
7
7
|
readonly logoWall: "SectionLogoWall";
|
|
8
8
|
readonly testimonial: "SectionTestimonial";
|
|
9
9
|
readonly faq: "SectionFaq";
|
|
10
|
+
readonly markup: "SectionMarkup";
|
|
10
11
|
readonly richText: "SectionRichText";
|
|
11
12
|
};
|
|
12
13
|
/** The post-type of a page that composes sections. */
|
|
@@ -67,6 +68,29 @@ export declare const sectionCta: () => ShPostTypeDef;
|
|
|
67
68
|
export declare const sectionLogoWall: () => ShPostTypeDef;
|
|
68
69
|
export declare const sectionTestimonial: () => ShPostTypeDef;
|
|
69
70
|
export declare const sectionFaq: () => ShPostTypeDef;
|
|
71
|
+
/**
|
|
72
|
+
* Markup kept exactly as somebody else's page wrote it, as a section (SH763).
|
|
73
|
+
*
|
|
74
|
+
* Why a section type rather than a second field on `Page`. `shio convert` splits a mixed page's
|
|
75
|
+
* kept markup at the blocks a reviewer accepted, and the previous shape carried the trailing half
|
|
76
|
+
* in a `Page.contentAfter` field — which no `Page` definition declared, so every conversion against
|
|
77
|
+
* a real instance was refused at the batch. Declaring it would have been the wrong repair three
|
|
78
|
+
* times over: it encodes *position* rather than meaning, it admits exactly **one** split (markup
|
|
79
|
+
* between two accepted blocks needs content, section, content, section, content), and it is
|
|
80
|
+
* replication-only, so every hand-authored page would carry a field that is always empty.
|
|
81
|
+
*
|
|
82
|
+
* As a section the order comes from the list, N splits work, `Page.sections` already speaks it, and
|
|
83
|
+
* a curator can move or replace a raw block — which is the mixed→authorable path mixed mode exists
|
|
84
|
+
* to offer, and the one thing a positional field could never give them.
|
|
85
|
+
*
|
|
86
|
+
* **One field, and therefore no title field.** The value is a captured page's own bytes: making it
|
|
87
|
+
* `isTitle` would put a `<footer>` in a `VARCHAR(255)` column, and a second `label` field would have
|
|
88
|
+
* to be *drawn* — `ShConvertedLayoutRenderTest` requires every declared field to reach the page —
|
|
89
|
+
* which means injecting a heading into markup this type exists to leave alone. The exemption is
|
|
90
|
+
* signed in `post-types.test.mjs` rather than inferred, and what a curator reads in the console is
|
|
91
|
+
* the friendly URL the conversion wrote.
|
|
92
|
+
*/
|
|
93
|
+
export declare const sectionMarkup: () => ShPostTypeDef;
|
|
70
94
|
export declare const sectionRichText: () => ShPostTypeDef;
|
|
71
95
|
/**
|
|
72
96
|
* The whole vocabulary, in a fixed order.
|
package/dist/shio-sections.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { aceHtml as e, comboBox as t, file as n, htmlEditor as r, multiSelect as i, postType as a, relator as o, text as s, textArea as c } from "@viglet/shio-model";
|
|
2
2
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/post-types.ts
|
|
4
4
|
var f = {
|
|
5
5
|
hero: "SectionHero",
|
|
6
6
|
featureGrid: "SectionFeatureGrid",
|
|
@@ -8,6 +8,7 @@ var f = {
|
|
|
8
8
|
logoWall: "SectionLogoWall",
|
|
9
9
|
testimonial: "SectionTestimonial",
|
|
10
10
|
faq: "SectionFaq",
|
|
11
|
+
markup: "SectionMarkup",
|
|
11
12
|
richText: "SectionRichText"
|
|
12
13
|
}, p = "Page", m = "Menu", h = "MenuItem", g = () => a(p, {
|
|
13
14
|
title: "Page",
|
|
@@ -231,7 +232,16 @@ var f = {
|
|
|
231
232
|
}), r("answer", { label: "Answer" })]
|
|
232
233
|
})
|
|
233
234
|
]
|
|
234
|
-
}), T = () => a(f.
|
|
235
|
+
}), T = () => a(f.markup, {
|
|
236
|
+
title: "Markup Section",
|
|
237
|
+
namePlural: "Markup Sections",
|
|
238
|
+
description: "Markup kept verbatim from a source page, rendered in place among the sections. A conversion writes one per run of markup nobody made authorable.",
|
|
239
|
+
fields: [e("html", {
|
|
240
|
+
label: "Markup",
|
|
241
|
+
required: !0,
|
|
242
|
+
description: "The source's own bytes for this run of the page, rendered as they are."
|
|
243
|
+
})]
|
|
244
|
+
}), E = () => a(f.richText, {
|
|
235
245
|
title: "Rich Text Section",
|
|
236
246
|
namePlural: "Rich Text Sections",
|
|
237
247
|
description: "Prose. The escape hatch that keeps the other sections from growing fields they do not need.",
|
|
@@ -242,7 +252,7 @@ var f = {
|
|
|
242
252
|
label: "Body",
|
|
243
253
|
required: !0
|
|
244
254
|
})]
|
|
245
|
-
}),
|
|
255
|
+
}), D = () => [
|
|
246
256
|
_(),
|
|
247
257
|
v(),
|
|
248
258
|
g(),
|
|
@@ -252,282 +262,289 @@ var f = {
|
|
|
252
262
|
y(),
|
|
253
263
|
S(),
|
|
254
264
|
T(),
|
|
265
|
+
E(),
|
|
255
266
|
C()
|
|
256
267
|
];
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
function D(e, t) {
|
|
268
|
+
// src/types.ts
|
|
269
|
+
function O(e, t) {
|
|
260
270
|
return t ? {
|
|
261
271
|
"data-shio-prop": e,
|
|
262
272
|
"data-shio-prop-attr": t
|
|
263
273
|
} : { "data-shio-prop": e };
|
|
264
274
|
}
|
|
265
|
-
function
|
|
275
|
+
function k(e, t) {
|
|
266
276
|
return e ? {
|
|
267
277
|
"data-shio-post": e,
|
|
268
278
|
"data-shio-post-type": t
|
|
269
279
|
} : {};
|
|
270
280
|
}
|
|
271
|
-
var
|
|
272
|
-
function
|
|
281
|
+
var A = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("/") ? e : `/api/v2/staticfile/${e}`;
|
|
282
|
+
function j(e) {
|
|
273
283
|
return Array.isArray(e) ? e : [];
|
|
274
284
|
}
|
|
275
|
-
function
|
|
285
|
+
function M(e) {
|
|
276
286
|
if (typeof e != "string") return;
|
|
277
287
|
let t = e.trim();
|
|
278
288
|
return t.length > 0 ? t : void 0;
|
|
279
289
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
let i = j(e.image), a = j(e.ctaHref), o = j(e.ctaLabel);
|
|
290
|
+
// src/components.tsx
|
|
291
|
+
var N = (...e) => e.filter(Boolean).join(" "), P = (e) => ({ __html: e });
|
|
292
|
+
function F({ data: e, resolveAsset: t = A, className: n, postId: r }) {
|
|
293
|
+
let i = M(e.image), a = M(e.ctaHref), o = M(e.ctaLabel);
|
|
285
294
|
return /* @__PURE__ */ d("section", {
|
|
286
|
-
className:
|
|
287
|
-
...
|
|
295
|
+
className: N("shio-section", "shio-hero", M(e.align) === "center" ? "shio-hero--center" : void 0, n),
|
|
296
|
+
...k(r, "SectionHero"),
|
|
288
297
|
children: [
|
|
289
|
-
|
|
298
|
+
M(e.heading) && /* @__PURE__ */ u("h1", {
|
|
290
299
|
className: "shio-hero__heading",
|
|
291
|
-
...
|
|
300
|
+
...O("heading"),
|
|
292
301
|
children: e.heading
|
|
293
302
|
}),
|
|
294
|
-
|
|
303
|
+
M(e.subheading) && /* @__PURE__ */ u("p", {
|
|
295
304
|
className: "shio-hero__subheading",
|
|
296
|
-
...
|
|
305
|
+
...O("subheading"),
|
|
297
306
|
children: e.subheading
|
|
298
307
|
}),
|
|
299
|
-
|
|
308
|
+
M(e.body) && /* @__PURE__ */ u("div", {
|
|
300
309
|
className: "shio-hero__body",
|
|
301
|
-
...
|
|
302
|
-
dangerouslySetInnerHTML:
|
|
310
|
+
...O("body"),
|
|
311
|
+
dangerouslySetInnerHTML: P(e.body)
|
|
303
312
|
}),
|
|
304
313
|
a && o && /* @__PURE__ */ u("a", {
|
|
305
314
|
className: "shio-hero__cta",
|
|
306
315
|
href: a,
|
|
307
|
-
...
|
|
316
|
+
...O("ctaHref", "href"),
|
|
308
317
|
children: /* @__PURE__ */ u("span", {
|
|
309
|
-
...
|
|
318
|
+
...O("ctaLabel"),
|
|
310
319
|
children: o
|
|
311
320
|
})
|
|
312
321
|
}),
|
|
313
322
|
i && /* @__PURE__ */ u("img", {
|
|
314
323
|
className: "shio-hero__image",
|
|
315
324
|
src: t(i),
|
|
316
|
-
alt:
|
|
317
|
-
...
|
|
325
|
+
alt: M(e.heading) ?? "",
|
|
326
|
+
...O("image", "src")
|
|
318
327
|
})
|
|
319
328
|
]
|
|
320
329
|
});
|
|
321
330
|
}
|
|
322
|
-
function
|
|
323
|
-
let r =
|
|
331
|
+
function I({ data: e, className: t, postId: n }) {
|
|
332
|
+
let r = j(e.features);
|
|
324
333
|
return /* @__PURE__ */ d("section", {
|
|
325
|
-
className:
|
|
326
|
-
"data-columns":
|
|
327
|
-
...
|
|
328
|
-
...
|
|
334
|
+
className: N("shio-section", "shio-features", t),
|
|
335
|
+
"data-columns": M(e.columns) ?? "3",
|
|
336
|
+
...O("columns", "data-columns"),
|
|
337
|
+
...k(n, "SectionFeatureGrid"),
|
|
329
338
|
children: [
|
|
330
|
-
|
|
339
|
+
M(e.heading) && /* @__PURE__ */ u("h2", {
|
|
331
340
|
className: "shio-features__heading",
|
|
332
|
-
...
|
|
341
|
+
...O("heading"),
|
|
333
342
|
children: e.heading
|
|
334
343
|
}),
|
|
335
|
-
|
|
344
|
+
M(e.intro) && /* @__PURE__ */ u("p", {
|
|
336
345
|
className: "shio-features__intro",
|
|
337
|
-
...
|
|
346
|
+
...O("intro"),
|
|
338
347
|
children: e.intro
|
|
339
348
|
}),
|
|
340
349
|
/* @__PURE__ */ u("ul", {
|
|
341
350
|
className: "shio-features__list",
|
|
342
|
-
...
|
|
351
|
+
...O("features"),
|
|
343
352
|
children: r.map((e, t) => /* @__PURE__ */ d("li", {
|
|
344
353
|
className: "shio-features__item",
|
|
345
354
|
children: [
|
|
346
|
-
|
|
355
|
+
M(e.icon) && /* @__PURE__ */ u("span", {
|
|
347
356
|
className: "shio-features__icon",
|
|
348
357
|
"data-icon": e.icon,
|
|
349
358
|
"aria-hidden": "true"
|
|
350
359
|
}),
|
|
351
|
-
|
|
360
|
+
M(e.title) && /* @__PURE__ */ u("h3", {
|
|
352
361
|
className: "shio-features__title",
|
|
353
362
|
children: e.title
|
|
354
363
|
}),
|
|
355
|
-
|
|
364
|
+
M(e.body) && /* @__PURE__ */ u("p", {
|
|
356
365
|
className: "shio-features__body",
|
|
357
366
|
children: e.body
|
|
358
367
|
})
|
|
359
368
|
]
|
|
360
|
-
},
|
|
369
|
+
}, M(e.title) ?? t))
|
|
361
370
|
})
|
|
362
371
|
]
|
|
363
372
|
});
|
|
364
373
|
}
|
|
365
|
-
function
|
|
366
|
-
let r =
|
|
374
|
+
function L({ data: e, className: t, postId: n }) {
|
|
375
|
+
let r = M(e.ctaHref), i = M(e.ctaLabel);
|
|
367
376
|
return /* @__PURE__ */ d("section", {
|
|
368
|
-
className:
|
|
369
|
-
"data-variant":
|
|
370
|
-
...
|
|
371
|
-
...
|
|
377
|
+
className: N("shio-section", "shio-cta", t),
|
|
378
|
+
"data-variant": M(e.variant) ?? "primary",
|
|
379
|
+
...O("variant", "data-variant"),
|
|
380
|
+
...k(n, "SectionCta"),
|
|
372
381
|
children: [
|
|
373
|
-
|
|
382
|
+
M(e.heading) && /* @__PURE__ */ u("h2", {
|
|
374
383
|
className: "shio-cta__heading",
|
|
375
|
-
...
|
|
384
|
+
...O("heading"),
|
|
376
385
|
children: e.heading
|
|
377
386
|
}),
|
|
378
|
-
|
|
387
|
+
M(e.body) && /* @__PURE__ */ u("p", {
|
|
379
388
|
className: "shio-cta__body",
|
|
380
|
-
...
|
|
389
|
+
...O("body"),
|
|
381
390
|
children: e.body
|
|
382
391
|
}),
|
|
383
392
|
r && i && /* @__PURE__ */ u("a", {
|
|
384
393
|
className: "shio-cta__button",
|
|
385
394
|
href: r,
|
|
386
|
-
...
|
|
395
|
+
...O("ctaHref", "href"),
|
|
387
396
|
children: /* @__PURE__ */ u("span", {
|
|
388
|
-
...
|
|
397
|
+
...O("ctaLabel"),
|
|
389
398
|
children: i
|
|
390
399
|
})
|
|
391
400
|
})
|
|
392
401
|
]
|
|
393
402
|
});
|
|
394
403
|
}
|
|
395
|
-
function
|
|
396
|
-
let i =
|
|
404
|
+
function R({ data: e, resolveAsset: t = A, className: n, postId: r }) {
|
|
405
|
+
let i = j(e.logos);
|
|
397
406
|
return /* @__PURE__ */ d("section", {
|
|
398
|
-
className:
|
|
399
|
-
...
|
|
400
|
-
children: [
|
|
407
|
+
className: N("shio-section", "shio-logos", n),
|
|
408
|
+
...k(r, "SectionLogoWall"),
|
|
409
|
+
children: [M(e.heading) && /* @__PURE__ */ u("h2", {
|
|
401
410
|
className: "shio-logos__heading",
|
|
402
|
-
...
|
|
411
|
+
...O("heading"),
|
|
403
412
|
children: e.heading
|
|
404
413
|
}), /* @__PURE__ */ u("ul", {
|
|
405
414
|
className: "shio-logos__list",
|
|
406
|
-
...
|
|
415
|
+
...O("logos"),
|
|
407
416
|
children: i.map((e, n) => {
|
|
408
|
-
let r =
|
|
417
|
+
let r = M(e.image), i = r ? /* @__PURE__ */ u("img", {
|
|
409
418
|
className: "shio-logos__image",
|
|
410
419
|
src: t(r),
|
|
411
|
-
alt:
|
|
420
|
+
alt: M(e.name) ?? ""
|
|
412
421
|
}) : /* @__PURE__ */ u("span", {
|
|
413
422
|
className: "shio-logos__name",
|
|
414
|
-
children:
|
|
415
|
-
}), a =
|
|
423
|
+
children: M(e.name)
|
|
424
|
+
}), a = M(e.href);
|
|
416
425
|
return /* @__PURE__ */ u("li", {
|
|
417
426
|
className: "shio-logos__item",
|
|
418
427
|
children: a ? /* @__PURE__ */ u("a", {
|
|
419
428
|
href: a,
|
|
420
429
|
children: i
|
|
421
430
|
}) : i
|
|
422
|
-
},
|
|
431
|
+
}, M(e.name) ?? n);
|
|
423
432
|
})
|
|
424
433
|
})]
|
|
425
434
|
});
|
|
426
435
|
}
|
|
427
|
-
function
|
|
428
|
-
let i =
|
|
436
|
+
function z({ data: e, resolveAsset: t = A, className: n, postId: r }) {
|
|
437
|
+
let i = j(e.quotes);
|
|
429
438
|
return /* @__PURE__ */ d("section", {
|
|
430
|
-
className:
|
|
431
|
-
...
|
|
439
|
+
className: N("shio-section", "shio-testimonials", n),
|
|
440
|
+
...k(r, "SectionTestimonial"),
|
|
432
441
|
children: [
|
|
433
|
-
|
|
442
|
+
M(e.heading) && /* @__PURE__ */ u("h2", {
|
|
434
443
|
className: "shio-testimonials__heading",
|
|
435
|
-
...
|
|
444
|
+
...O("heading"),
|
|
436
445
|
children: e.heading
|
|
437
446
|
}),
|
|
438
447
|
/* @__PURE__ */ u("div", {
|
|
439
448
|
hidden: !0,
|
|
440
|
-
...
|
|
449
|
+
...O("quotes")
|
|
441
450
|
}),
|
|
442
451
|
i.map((e, n) => {
|
|
443
|
-
let r =
|
|
452
|
+
let r = M(e.avatar);
|
|
444
453
|
return /* @__PURE__ */ d("figure", {
|
|
445
454
|
className: "shio-testimonials__item",
|
|
446
455
|
children: [
|
|
447
456
|
r && /* @__PURE__ */ u("img", {
|
|
448
457
|
className: "shio-testimonials__avatar",
|
|
449
458
|
src: t(r),
|
|
450
|
-
alt:
|
|
459
|
+
alt: M(e.author) ?? ""
|
|
451
460
|
}),
|
|
452
|
-
|
|
461
|
+
M(e.quote) && /* @__PURE__ */ u("blockquote", {
|
|
453
462
|
className: "shio-testimonials__quote",
|
|
454
463
|
children: e.quote
|
|
455
464
|
}),
|
|
456
465
|
/* @__PURE__ */ d("figcaption", {
|
|
457
466
|
className: "shio-testimonials__author",
|
|
458
|
-
children: [
|
|
467
|
+
children: [M(e.author), M(e.role) && /* @__PURE__ */ u("span", {
|
|
459
468
|
className: "shio-testimonials__role",
|
|
460
469
|
children: e.role
|
|
461
470
|
})]
|
|
462
471
|
})
|
|
463
472
|
]
|
|
464
|
-
},
|
|
473
|
+
}, M(e.author) ?? n);
|
|
465
474
|
})
|
|
466
475
|
]
|
|
467
476
|
});
|
|
468
477
|
}
|
|
469
|
-
function
|
|
470
|
-
let r =
|
|
478
|
+
function B({ data: e, className: t, postId: n }) {
|
|
479
|
+
let r = j(e.questions);
|
|
471
480
|
return /* @__PURE__ */ d("section", {
|
|
472
|
-
className:
|
|
473
|
-
...
|
|
481
|
+
className: N("shio-section", "shio-faq", t),
|
|
482
|
+
...k(n, "SectionFaq"),
|
|
474
483
|
children: [
|
|
475
|
-
|
|
484
|
+
M(e.heading) && /* @__PURE__ */ u("h2", {
|
|
476
485
|
className: "shio-faq__heading",
|
|
477
|
-
...
|
|
486
|
+
...O("heading"),
|
|
478
487
|
children: e.heading
|
|
479
488
|
}),
|
|
480
|
-
|
|
489
|
+
M(e.intro) && /* @__PURE__ */ u("p", {
|
|
481
490
|
className: "shio-faq__intro",
|
|
482
|
-
...
|
|
491
|
+
...O("intro"),
|
|
483
492
|
children: e.intro
|
|
484
493
|
}),
|
|
485
494
|
/* @__PURE__ */ u("dl", {
|
|
486
495
|
className: "shio-faq__list",
|
|
487
|
-
...
|
|
496
|
+
...O("questions"),
|
|
488
497
|
children: r.map((e, t) => /* @__PURE__ */ d("div", {
|
|
489
498
|
className: "shio-faq__item",
|
|
490
|
-
children: [
|
|
499
|
+
children: [M(e.question) && /* @__PURE__ */ u("dt", {
|
|
491
500
|
className: "shio-faq__question",
|
|
492
501
|
children: e.question
|
|
493
|
-
}),
|
|
502
|
+
}), M(e.answer) && /* @__PURE__ */ u("dd", {
|
|
494
503
|
className: "shio-faq__answer",
|
|
495
|
-
dangerouslySetInnerHTML:
|
|
504
|
+
dangerouslySetInnerHTML: P(e.answer)
|
|
496
505
|
})]
|
|
497
|
-
},
|
|
506
|
+
}, M(e.question) ?? t))
|
|
498
507
|
})
|
|
499
508
|
]
|
|
500
509
|
});
|
|
501
510
|
}
|
|
502
|
-
function
|
|
511
|
+
function V({ data: e, className: t, postId: n }) {
|
|
503
512
|
return /* @__PURE__ */ d("section", {
|
|
504
|
-
className:
|
|
505
|
-
...
|
|
506
|
-
children: [
|
|
513
|
+
className: N("shio-section", "shio-richtext", t),
|
|
514
|
+
...k(n, "SectionRichText"),
|
|
515
|
+
children: [M(e.heading) && /* @__PURE__ */ u("h2", {
|
|
507
516
|
className: "shio-richtext__heading",
|
|
508
|
-
...
|
|
517
|
+
...O("heading"),
|
|
509
518
|
children: e.heading
|
|
510
|
-
}),
|
|
519
|
+
}), M(e.body) && /* @__PURE__ */ u("div", {
|
|
511
520
|
className: "shio-richtext__body",
|
|
512
|
-
...
|
|
513
|
-
dangerouslySetInnerHTML:
|
|
521
|
+
...O("body"),
|
|
522
|
+
dangerouslySetInnerHTML: P(e.body)
|
|
514
523
|
})]
|
|
515
524
|
});
|
|
516
525
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
526
|
+
function H({ data: e, className: t, postId: n }) {
|
|
527
|
+
return /* @__PURE__ */ u("div", {
|
|
528
|
+
className: N("shio-markup", t),
|
|
529
|
+
...O("html"),
|
|
530
|
+
...k(n, "SectionMarkup"),
|
|
531
|
+
dangerouslySetInnerHTML: P(M(e.html) ?? "")
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
var U = {
|
|
535
|
+
[f.hero]: F,
|
|
536
|
+
[f.featureGrid]: I,
|
|
537
|
+
[f.cta]: L,
|
|
538
|
+
[f.logoWall]: R,
|
|
539
|
+
[f.testimonial]: z,
|
|
540
|
+
[f.faq]: B,
|
|
541
|
+
[f.markup]: H,
|
|
542
|
+
[f.richText]: V
|
|
525
543
|
};
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
function H({ sections: e, resolveAsset: t = k, className: n, fallback: r }) {
|
|
544
|
+
// src/sections.tsx
|
|
545
|
+
function W({ sections: e, resolveAsset: t = A, className: n, fallback: r }) {
|
|
529
546
|
return /* @__PURE__ */ u(l, { children: e.map((e, i) => {
|
|
530
|
-
let a =
|
|
547
|
+
let a = U[e.type];
|
|
531
548
|
if (!a) return r ? r(e) : null;
|
|
532
549
|
let o = {
|
|
533
550
|
data: e.data,
|
|
@@ -537,5 +554,4 @@ function H({ sections: e, resolveAsset: t = k, className: n, fallback: r }) {
|
|
|
537
554
|
return /* @__PURE__ */ u(a, { ...o }, e.url ?? `${e.type}-${i}`);
|
|
538
555
|
}) });
|
|
539
556
|
}
|
|
540
|
-
|
|
541
|
-
export { I as Cta, z as Faq, F as FeatureGrid, P as Hero, L as LogoWall, h as MENU_ITEM_TYPE, m as MENU_TYPE, p as PAGE_TYPE, B as RichText, V as SECTION_COMPONENTS, f as SECTION_TYPES, H as Sections, R as Testimonial, k as defaultResolveAsset, _ as menu, v as menuItem, g as page, A as rows, x as sectionCta, w as sectionFaq, b as sectionFeatureGrid, y as sectionHero, S as sectionLogoWall, E as sectionPostTypes, T as sectionRichText, C as sectionTestimonial, j as str };
|
|
557
|
+
export { L as Cta, B as Faq, I as FeatureGrid, F as Hero, R as LogoWall, h as MENU_ITEM_TYPE, m as MENU_TYPE, H as Markup, p as PAGE_TYPE, V as RichText, U as SECTION_COMPONENTS, f as SECTION_TYPES, W as Sections, z as Testimonial, A as defaultResolveAsset, _ as menu, v as menuItem, g as page, j as rows, x as sectionCta, w as sectionFaq, b as sectionFeatureGrid, y as sectionHero, S as sectionLogoWall, T as sectionMarkup, D as sectionPostTypes, E as sectionRichText, C as sectionTestimonial, M as str };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@viglet/shio-model"),require("react/jsx-runtime")):typeof define==`function`&&define.amd?define([`exports`,`@viglet/shio-model`,`react/jsx-runtime`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ShioSections={},e.ShioModel,e.jsxRuntime))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r={hero:`SectionHero`,featureGrid:`SectionFeatureGrid`,cta:`SectionCta`,logoWall:`SectionLogoWall`,testimonial:`SectionTestimonial`,faq:`SectionFaq`,richText:`SectionRichText`},i=`Page`,a=`Menu`,o=`MenuItem`,s=()=>(0,t.postType)(i,{title:`Page`,namePlural:`Pages`,description:"A page composed of sections. `sections` lists section friendly URLs in render order.",fields:[(0,t.text)(`title`,{label:`Title`,required:!0,isTitle:!0}),(0,t.textArea)(`description`,{label:`Description`,description:`Used as the page summary and the meta description.`,isSummary:!0}),(0,t.multiSelect)(`sections`,{label:`Sections`,description:`Friendly URLs of the section posts, in render order — e.g. /sections/home/hero.`,references:`post`}),(0,t.aceHtml)(`content`,{label:`Content`,description:`Markup this page carries itself, rendered around its sections. A conversion writes the source's own body here for the blocks nobody made authorable.`})]}),c=()=>(0,t.postType)(a,{title:`Menu`,namePlural:`Menus`,description:"A curated menu. `items` lists addresses in render order: a MenuItem, a nested Menu, or a page.",fields:[(0,t.text)(`title`,{label:`Title`,required:!0,isTitle:!0}),(0,t.multiSelect)(`items`,{label:`Items`,description:`Friendly URLs in render order — a MenuItem, a nested Menu, or a page (which uses its own title).`,references:`post`})]}),l=()=>(0,t.postType)(o,{title:`Menu Item`,namePlural:`Menu Items`,description:`One menu entry: a label, and either a target page or an external URL. Not both.`,fields:[(0,t.text)(`label`,{label:`Label`,required:!0,isTitle:!0}),(0,t.multiSelect)(`target`,{label:`Target page`,description:`The friendly URL of the page this points at. Leave empty for an external link.`,references:`post`}),(0,t.text)(`href`,{label:`External URL`,description:`An absolute URL, for an entry that leaves the site. Ignored when a target is set.`}),(0,t.comboBox)(`rel`,{label:`Link relationship`,description:`Emitted as rel= — what an external entry needs and an internal one does not.`,choices:{"noopener noreferrer":`External (noopener noreferrer)`,nofollow:`Nofollow`},allowNull:!0})]}),u=()=>(0,t.postType)(r.hero,{title:`Hero Section`,namePlural:`Hero Sections`,description:`The opening statement of a page: a headline, a line of support, one call to action.`,fields:[(0,t.text)(`heading`,{label:`Heading`,required:!0,isTitle:!0}),(0,t.textArea)(`subheading`,{label:`Subheading`,isSummary:!0}),(0,t.htmlEditor)(`body`,{label:`Body`}),(0,t.text)(`ctaLabel`,{label:`Call-to-action label`}),(0,t.text)(`ctaHref`,{label:`Call-to-action link`}),(0,t.file)(`image`,{label:`Image`}),(0,t.comboBox)(`align`,{label:`Alignment`,choices:{left:`Left`,center:`Centered`},allowNull:!0})]}),d=()=>(0,t.postType)(r.featureGrid,{title:`Feature Grid Section`,namePlural:`Feature Grid Sections`,description:`A short list of capabilities, each with a title and a sentence.`,fields:[(0,t.text)(`heading`,{label:`Heading`,required:!0,isTitle:!0}),(0,t.textArea)(`intro`,{label:`Intro`,isSummary:!0}),(0,t.comboBox)(`columns`,{label:`Columns`,choices:{2:`Two`,3:`Three`,4:`Four`},allowNull:!0}),(0,t.relator)(`features`,{label:`Features`,title:`Feature`,fields:[(0,t.text)(`title`,{label:`Title`,required:!0}),(0,t.textArea)(`body`,{label:`Body`}),(0,t.text)(`icon`,{label:`Icon`,description:`An icon name your front end knows.`})]})]}),f=()=>(0,t.postType)(r.cta,{title:`Call-to-action Section`,namePlural:`Call-to-action Sections`,description:`One decision, stated once: a heading, a sentence and a button.`,fields:[(0,t.text)(`heading`,{label:`Heading`,required:!0,isTitle:!0}),(0,t.textArea)(`body`,{label:`Body`,isSummary:!0}),(0,t.text)(`ctaLabel`,{label:`Button label`}),(0,t.text)(`ctaHref`,{label:`Button link`}),(0,t.comboBox)(`variant`,{label:`Variant`,choices:{primary:`Primary`,subtle:`Subtle`},allowNull:!0})]}),p=()=>(0,t.postType)(r.logoWall,{title:`Logo Wall Section`,namePlural:`Logo Wall Sections`,description:`Social proof as a row of logos.`,fields:[(0,t.text)(`heading`,{label:`Heading`,isTitle:!0}),(0,t.relator)(`logos`,{label:`Logos`,title:`Logo`,fields:[(0,t.text)(`name`,{label:`Name`,required:!0}),(0,t.file)(`image`,{label:`Image`}),(0,t.text)(`href`,{label:`Link`})]})]}),m=()=>(0,t.postType)(r.testimonial,{title:`Testimonial Section`,namePlural:`Testimonial Sections`,description:`What customers said, attributed.`,fields:[(0,t.text)(`heading`,{label:`Heading`,isTitle:!0}),(0,t.relator)(`quotes`,{label:`Quotes`,title:`Quote`,fields:[(0,t.textArea)(`quote`,{label:`Quote`,required:!0}),(0,t.text)(`author`,{label:`Author`,required:!0}),(0,t.text)(`role`,{label:`Role`}),(0,t.file)(`avatar`,{label:`Avatar`})]})]}),h=()=>(0,t.postType)(r.faq,{title:`FAQ Section`,namePlural:`FAQ Sections`,description:`Questions people actually ask, answered in place.`,fields:[(0,t.text)(`heading`,{label:`Heading`,isTitle:!0}),(0,t.textArea)(`intro`,{label:`Intro`,isSummary:!0}),(0,t.relator)(`questions`,{label:`Questions`,title:`Question`,fields:[(0,t.text)(`question`,{label:`Question`,required:!0}),(0,t.htmlEditor)(`answer`,{label:`Answer`})]})]}),g=()=>(0,t.postType)(r.richText,{title:`Rich Text Section`,namePlural:`Rich Text Sections`,description:`Prose. The escape hatch that keeps the other sections from growing fields they do not need.`,fields:[(0,t.text)(`heading`,{label:`Heading`,isTitle:!0}),(0,t.htmlEditor)(`body`,{label:`Body`,required:!0})]}),_=()=>[c(),l(),s(),f(),h(),d(),u(),p(),g(),m()];function v(e,t){return t?{"data-shio-prop":e,"data-shio-prop-attr":t}:{"data-shio-prop":e}}function y(e,t){return e?{"data-shio-post":e,"data-shio-post-type":t}:{}}var b=e=>/^(https?:)?\/\//.test(e)||e.startsWith(`/`)?e:`/api/v2/staticfile/${e}`;function x(e){return Array.isArray(e)?e:[]}function S(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}var C=(...e)=>e.filter(Boolean).join(` `),w=e=>({__html:e});function T({data:e,resolveAsset:t=b,className:r,postId:i}){let a=S(e.image),o=S(e.ctaHref),s=S(e.ctaLabel);return(0,n.jsxs)(`section`,{className:C(`shio-section`,`shio-hero`,S(e.align)===`center`?`shio-hero--center`:void 0,r),...y(i,`SectionHero`),children:[S(e.heading)&&(0,n.jsx)(`h1`,{className:`shio-hero__heading`,...v(`heading`),children:e.heading}),S(e.subheading)&&(0,n.jsx)(`p`,{className:`shio-hero__subheading`,...v(`subheading`),children:e.subheading}),S(e.body)&&(0,n.jsx)(`div`,{className:`shio-hero__body`,...v(`body`),dangerouslySetInnerHTML:w(e.body)}),o&&s&&(0,n.jsx)(`a`,{className:`shio-hero__cta`,href:o,...v(`ctaHref`,`href`),children:(0,n.jsx)(`span`,{...v(`ctaLabel`),children:s})}),a&&(0,n.jsx)(`img`,{className:`shio-hero__image`,src:t(a),alt:S(e.heading)??``,...v(`image`,`src`)})]})}function E({data:e,className:t,postId:r}){let i=x(e.features);return(0,n.jsxs)(`section`,{className:C(`shio-section`,`shio-features`,t),"data-columns":S(e.columns)??`3`,...v(`columns`,`data-columns`),...y(r,`SectionFeatureGrid`),children:[S(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-features__heading`,...v(`heading`),children:e.heading}),S(e.intro)&&(0,n.jsx)(`p`,{className:`shio-features__intro`,...v(`intro`),children:e.intro}),(0,n.jsx)(`ul`,{className:`shio-features__list`,...v(`features`),children:i.map((e,t)=>(0,n.jsxs)(`li`,{className:`shio-features__item`,children:[S(e.icon)&&(0,n.jsx)(`span`,{className:`shio-features__icon`,"data-icon":e.icon,"aria-hidden":`true`}),S(e.title)&&(0,n.jsx)(`h3`,{className:`shio-features__title`,children:e.title}),S(e.body)&&(0,n.jsx)(`p`,{className:`shio-features__body`,children:e.body})]},S(e.title)??t))})]})}function D({data:e,className:t,postId:r}){let i=S(e.ctaHref),a=S(e.ctaLabel);return(0,n.jsxs)(`section`,{className:C(`shio-section`,`shio-cta`,t),"data-variant":S(e.variant)??`primary`,...v(`variant`,`data-variant`),...y(r,`SectionCta`),children:[S(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-cta__heading`,...v(`heading`),children:e.heading}),S(e.body)&&(0,n.jsx)(`p`,{className:`shio-cta__body`,...v(`body`),children:e.body}),i&&a&&(0,n.jsx)(`a`,{className:`shio-cta__button`,href:i,...v(`ctaHref`,`href`),children:(0,n.jsx)(`span`,{...v(`ctaLabel`),children:a})})]})}function O({data:e,resolveAsset:t=b,className:r,postId:i}){let a=x(e.logos);return(0,n.jsxs)(`section`,{className:C(`shio-section`,`shio-logos`,r),...y(i,`SectionLogoWall`),children:[S(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-logos__heading`,...v(`heading`),children:e.heading}),(0,n.jsx)(`ul`,{className:`shio-logos__list`,...v(`logos`),children:a.map((e,r)=>{let i=S(e.image),a=i?(0,n.jsx)(`img`,{className:`shio-logos__image`,src:t(i),alt:S(e.name)??``}):(0,n.jsx)(`span`,{className:`shio-logos__name`,children:S(e.name)}),o=S(e.href);return(0,n.jsx)(`li`,{className:`shio-logos__item`,children:o?(0,n.jsx)(`a`,{href:o,children:a}):a},S(e.name)??r)})})]})}function k({data:e,resolveAsset:t=b,className:r,postId:i}){let a=x(e.quotes);return(0,n.jsxs)(`section`,{className:C(`shio-section`,`shio-testimonials`,r),...y(i,`SectionTestimonial`),children:[S(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-testimonials__heading`,...v(`heading`),children:e.heading}),(0,n.jsx)(`div`,{hidden:!0,...v(`quotes`)}),a.map((e,r)=>{let i=S(e.avatar);return(0,n.jsxs)(`figure`,{className:`shio-testimonials__item`,children:[i&&(0,n.jsx)(`img`,{className:`shio-testimonials__avatar`,src:t(i),alt:S(e.author)??``}),S(e.quote)&&(0,n.jsx)(`blockquote`,{className:`shio-testimonials__quote`,children:e.quote}),(0,n.jsxs)(`figcaption`,{className:`shio-testimonials__author`,children:[S(e.author),S(e.role)&&(0,n.jsx)(`span`,{className:`shio-testimonials__role`,children:e.role})]})]},S(e.author)??r)})]})}function A({data:e,className:t,postId:r}){let i=x(e.questions);return(0,n.jsxs)(`section`,{className:C(`shio-section`,`shio-faq`,t),...y(r,`SectionFaq`),children:[S(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-faq__heading`,...v(`heading`),children:e.heading}),S(e.intro)&&(0,n.jsx)(`p`,{className:`shio-faq__intro`,...v(`intro`),children:e.intro}),(0,n.jsx)(`dl`,{className:`shio-faq__list`,...v(`questions`),children:i.map((e,t)=>(0,n.jsxs)(`div`,{className:`shio-faq__item`,children:[S(e.question)&&(0,n.jsx)(`dt`,{className:`shio-faq__question`,children:e.question}),S(e.answer)&&(0,n.jsx)(`dd`,{className:`shio-faq__answer`,dangerouslySetInnerHTML:w(e.answer)})]},S(e.question)??t))})]})}function j({data:e,className:t,postId:r}){return(0,n.jsxs)(`section`,{className:C(`shio-section`,`shio-richtext`,t),...y(r,`SectionRichText`),children:[S(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-richtext__heading`,...v(`heading`),children:e.heading}),S(e.body)&&(0,n.jsx)(`div`,{className:`shio-richtext__body`,...v(`body`),dangerouslySetInnerHTML:w(e.body)})]})}var M={[r.hero]:T,[r.featureGrid]:E,[r.cta]:D,[r.logoWall]:O,[r.testimonial]:k,[r.faq]:A,[r.richText]:j};function N({sections:e,resolveAsset:t=b,className:r,fallback:i}){return(0,n.jsx)(n.Fragment,{children:e.map((e,a)=>{let o=M[e.type];if(!o)return i?i(e):null;let s={data:e.data,resolveAsset:t,className:r};return(0,n.jsx)(o,{...s},e.url??`${e.type}-${a}`)})})}e.Cta=D,e.Faq=A,e.FeatureGrid=E,e.Hero=T,e.LogoWall=O,e.MENU_ITEM_TYPE=o,e.MENU_TYPE=a,e.PAGE_TYPE=i,e.RichText=j,e.SECTION_COMPONENTS=M,e.SECTION_TYPES=r,e.Sections=N,e.Testimonial=k,e.defaultResolveAsset=b,e.menu=c,e.menuItem=l,e.page=s,e.rows=x,e.sectionCta=f,e.sectionFaq=h,e.sectionFeatureGrid=d,e.sectionHero=u,e.sectionLogoWall=p,e.sectionPostTypes=_,e.sectionRichText=g,e.sectionTestimonial=m,e.str=S});
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@viglet/shio-model"),require("react/jsx-runtime")):typeof define==`function`&&define.amd?define([`exports`,`@viglet/shio-model`,`react/jsx-runtime`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ShioSections={},e.ShioModel,e.jsxRuntime))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r={hero:`SectionHero`,featureGrid:`SectionFeatureGrid`,cta:`SectionCta`,logoWall:`SectionLogoWall`,testimonial:`SectionTestimonial`,faq:`SectionFaq`,markup:`SectionMarkup`,richText:`SectionRichText`},i=`Page`,a=`Menu`,o=`MenuItem`,s=()=>(0,t.postType)(i,{title:`Page`,namePlural:`Pages`,description:"A page composed of sections. `sections` lists section friendly URLs in render order.",fields:[(0,t.text)(`title`,{label:`Title`,required:!0,isTitle:!0}),(0,t.textArea)(`description`,{label:`Description`,description:`Used as the page summary and the meta description.`,isSummary:!0}),(0,t.multiSelect)(`sections`,{label:`Sections`,description:`Friendly URLs of the section posts, in render order — e.g. /sections/home/hero.`,references:`post`}),(0,t.aceHtml)(`content`,{label:`Content`,description:`Markup this page carries itself, rendered around its sections. A conversion writes the source's own body here for the blocks nobody made authorable.`})]}),c=()=>(0,t.postType)(a,{title:`Menu`,namePlural:`Menus`,description:"A curated menu. `items` lists addresses in render order: a MenuItem, a nested Menu, or a page.",fields:[(0,t.text)(`title`,{label:`Title`,required:!0,isTitle:!0}),(0,t.multiSelect)(`items`,{label:`Items`,description:`Friendly URLs in render order — a MenuItem, a nested Menu, or a page (which uses its own title).`,references:`post`})]}),l=()=>(0,t.postType)(o,{title:`Menu Item`,namePlural:`Menu Items`,description:`One menu entry: a label, and either a target page or an external URL. Not both.`,fields:[(0,t.text)(`label`,{label:`Label`,required:!0,isTitle:!0}),(0,t.multiSelect)(`target`,{label:`Target page`,description:`The friendly URL of the page this points at. Leave empty for an external link.`,references:`post`}),(0,t.text)(`href`,{label:`External URL`,description:`An absolute URL, for an entry that leaves the site. Ignored when a target is set.`}),(0,t.comboBox)(`rel`,{label:`Link relationship`,description:`Emitted as rel= — what an external entry needs and an internal one does not.`,choices:{"noopener noreferrer":`External (noopener noreferrer)`,nofollow:`Nofollow`},allowNull:!0})]}),u=()=>(0,t.postType)(r.hero,{title:`Hero Section`,namePlural:`Hero Sections`,description:`The opening statement of a page: a headline, a line of support, one call to action.`,fields:[(0,t.text)(`heading`,{label:`Heading`,required:!0,isTitle:!0}),(0,t.textArea)(`subheading`,{label:`Subheading`,isSummary:!0}),(0,t.htmlEditor)(`body`,{label:`Body`}),(0,t.text)(`ctaLabel`,{label:`Call-to-action label`}),(0,t.text)(`ctaHref`,{label:`Call-to-action link`}),(0,t.file)(`image`,{label:`Image`}),(0,t.comboBox)(`align`,{label:`Alignment`,choices:{left:`Left`,center:`Centered`},allowNull:!0})]}),d=()=>(0,t.postType)(r.featureGrid,{title:`Feature Grid Section`,namePlural:`Feature Grid Sections`,description:`A short list of capabilities, each with a title and a sentence.`,fields:[(0,t.text)(`heading`,{label:`Heading`,required:!0,isTitle:!0}),(0,t.textArea)(`intro`,{label:`Intro`,isSummary:!0}),(0,t.comboBox)(`columns`,{label:`Columns`,choices:{2:`Two`,3:`Three`,4:`Four`},allowNull:!0}),(0,t.relator)(`features`,{label:`Features`,title:`Feature`,fields:[(0,t.text)(`title`,{label:`Title`,required:!0}),(0,t.textArea)(`body`,{label:`Body`}),(0,t.text)(`icon`,{label:`Icon`,description:`An icon name your front end knows.`})]})]}),f=()=>(0,t.postType)(r.cta,{title:`Call-to-action Section`,namePlural:`Call-to-action Sections`,description:`One decision, stated once: a heading, a sentence and a button.`,fields:[(0,t.text)(`heading`,{label:`Heading`,required:!0,isTitle:!0}),(0,t.textArea)(`body`,{label:`Body`,isSummary:!0}),(0,t.text)(`ctaLabel`,{label:`Button label`}),(0,t.text)(`ctaHref`,{label:`Button link`}),(0,t.comboBox)(`variant`,{label:`Variant`,choices:{primary:`Primary`,subtle:`Subtle`},allowNull:!0})]}),p=()=>(0,t.postType)(r.logoWall,{title:`Logo Wall Section`,namePlural:`Logo Wall Sections`,description:`Social proof as a row of logos.`,fields:[(0,t.text)(`heading`,{label:`Heading`,isTitle:!0}),(0,t.relator)(`logos`,{label:`Logos`,title:`Logo`,fields:[(0,t.text)(`name`,{label:`Name`,required:!0}),(0,t.file)(`image`,{label:`Image`}),(0,t.text)(`href`,{label:`Link`})]})]}),m=()=>(0,t.postType)(r.testimonial,{title:`Testimonial Section`,namePlural:`Testimonial Sections`,description:`What customers said, attributed.`,fields:[(0,t.text)(`heading`,{label:`Heading`,isTitle:!0}),(0,t.relator)(`quotes`,{label:`Quotes`,title:`Quote`,fields:[(0,t.textArea)(`quote`,{label:`Quote`,required:!0}),(0,t.text)(`author`,{label:`Author`,required:!0}),(0,t.text)(`role`,{label:`Role`}),(0,t.file)(`avatar`,{label:`Avatar`})]})]}),h=()=>(0,t.postType)(r.faq,{title:`FAQ Section`,namePlural:`FAQ Sections`,description:`Questions people actually ask, answered in place.`,fields:[(0,t.text)(`heading`,{label:`Heading`,isTitle:!0}),(0,t.textArea)(`intro`,{label:`Intro`,isSummary:!0}),(0,t.relator)(`questions`,{label:`Questions`,title:`Question`,fields:[(0,t.text)(`question`,{label:`Question`,required:!0}),(0,t.htmlEditor)(`answer`,{label:`Answer`})]})]}),g=()=>(0,t.postType)(r.markup,{title:`Markup Section`,namePlural:`Markup Sections`,description:`Markup kept verbatim from a source page, rendered in place among the sections. A conversion writes one per run of markup nobody made authorable.`,fields:[(0,t.aceHtml)(`html`,{label:`Markup`,required:!0,description:`The source's own bytes for this run of the page, rendered as they are.`})]}),_=()=>(0,t.postType)(r.richText,{title:`Rich Text Section`,namePlural:`Rich Text Sections`,description:`Prose. The escape hatch that keeps the other sections from growing fields they do not need.`,fields:[(0,t.text)(`heading`,{label:`Heading`,isTitle:!0}),(0,t.htmlEditor)(`body`,{label:`Body`,required:!0})]}),v=()=>[c(),l(),s(),f(),h(),d(),u(),p(),g(),_(),m()];function y(e,t){return t?{"data-shio-prop":e,"data-shio-prop-attr":t}:{"data-shio-prop":e}}function b(e,t){return e?{"data-shio-post":e,"data-shio-post-type":t}:{}}var x=e=>/^(https?:)?\/\//.test(e)||e.startsWith(`/`)?e:`/api/v2/staticfile/${e}`;function S(e){return Array.isArray(e)?e:[]}function C(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}var w=(...e)=>e.filter(Boolean).join(` `),T=e=>({__html:e});function E({data:e,resolveAsset:t=x,className:r,postId:i}){let a=C(e.image),o=C(e.ctaHref),s=C(e.ctaLabel);return(0,n.jsxs)(`section`,{className:w(`shio-section`,`shio-hero`,C(e.align)===`center`?`shio-hero--center`:void 0,r),...b(i,`SectionHero`),children:[C(e.heading)&&(0,n.jsx)(`h1`,{className:`shio-hero__heading`,...y(`heading`),children:e.heading}),C(e.subheading)&&(0,n.jsx)(`p`,{className:`shio-hero__subheading`,...y(`subheading`),children:e.subheading}),C(e.body)&&(0,n.jsx)(`div`,{className:`shio-hero__body`,...y(`body`),dangerouslySetInnerHTML:T(e.body)}),o&&s&&(0,n.jsx)(`a`,{className:`shio-hero__cta`,href:o,...y(`ctaHref`,`href`),children:(0,n.jsx)(`span`,{...y(`ctaLabel`),children:s})}),a&&(0,n.jsx)(`img`,{className:`shio-hero__image`,src:t(a),alt:C(e.heading)??``,...y(`image`,`src`)})]})}function D({data:e,className:t,postId:r}){let i=S(e.features);return(0,n.jsxs)(`section`,{className:w(`shio-section`,`shio-features`,t),"data-columns":C(e.columns)??`3`,...y(`columns`,`data-columns`),...b(r,`SectionFeatureGrid`),children:[C(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-features__heading`,...y(`heading`),children:e.heading}),C(e.intro)&&(0,n.jsx)(`p`,{className:`shio-features__intro`,...y(`intro`),children:e.intro}),(0,n.jsx)(`ul`,{className:`shio-features__list`,...y(`features`),children:i.map((e,t)=>(0,n.jsxs)(`li`,{className:`shio-features__item`,children:[C(e.icon)&&(0,n.jsx)(`span`,{className:`shio-features__icon`,"data-icon":e.icon,"aria-hidden":`true`}),C(e.title)&&(0,n.jsx)(`h3`,{className:`shio-features__title`,children:e.title}),C(e.body)&&(0,n.jsx)(`p`,{className:`shio-features__body`,children:e.body})]},C(e.title)??t))})]})}function O({data:e,className:t,postId:r}){let i=C(e.ctaHref),a=C(e.ctaLabel);return(0,n.jsxs)(`section`,{className:w(`shio-section`,`shio-cta`,t),"data-variant":C(e.variant)??`primary`,...y(`variant`,`data-variant`),...b(r,`SectionCta`),children:[C(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-cta__heading`,...y(`heading`),children:e.heading}),C(e.body)&&(0,n.jsx)(`p`,{className:`shio-cta__body`,...y(`body`),children:e.body}),i&&a&&(0,n.jsx)(`a`,{className:`shio-cta__button`,href:i,...y(`ctaHref`,`href`),children:(0,n.jsx)(`span`,{...y(`ctaLabel`),children:a})})]})}function k({data:e,resolveAsset:t=x,className:r,postId:i}){let a=S(e.logos);return(0,n.jsxs)(`section`,{className:w(`shio-section`,`shio-logos`,r),...b(i,`SectionLogoWall`),children:[C(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-logos__heading`,...y(`heading`),children:e.heading}),(0,n.jsx)(`ul`,{className:`shio-logos__list`,...y(`logos`),children:a.map((e,r)=>{let i=C(e.image),a=i?(0,n.jsx)(`img`,{className:`shio-logos__image`,src:t(i),alt:C(e.name)??``}):(0,n.jsx)(`span`,{className:`shio-logos__name`,children:C(e.name)}),o=C(e.href);return(0,n.jsx)(`li`,{className:`shio-logos__item`,children:o?(0,n.jsx)(`a`,{href:o,children:a}):a},C(e.name)??r)})})]})}function A({data:e,resolveAsset:t=x,className:r,postId:i}){let a=S(e.quotes);return(0,n.jsxs)(`section`,{className:w(`shio-section`,`shio-testimonials`,r),...b(i,`SectionTestimonial`),children:[C(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-testimonials__heading`,...y(`heading`),children:e.heading}),(0,n.jsx)(`div`,{hidden:!0,...y(`quotes`)}),a.map((e,r)=>{let i=C(e.avatar);return(0,n.jsxs)(`figure`,{className:`shio-testimonials__item`,children:[i&&(0,n.jsx)(`img`,{className:`shio-testimonials__avatar`,src:t(i),alt:C(e.author)??``}),C(e.quote)&&(0,n.jsx)(`blockquote`,{className:`shio-testimonials__quote`,children:e.quote}),(0,n.jsxs)(`figcaption`,{className:`shio-testimonials__author`,children:[C(e.author),C(e.role)&&(0,n.jsx)(`span`,{className:`shio-testimonials__role`,children:e.role})]})]},C(e.author)??r)})]})}function j({data:e,className:t,postId:r}){let i=S(e.questions);return(0,n.jsxs)(`section`,{className:w(`shio-section`,`shio-faq`,t),...b(r,`SectionFaq`),children:[C(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-faq__heading`,...y(`heading`),children:e.heading}),C(e.intro)&&(0,n.jsx)(`p`,{className:`shio-faq__intro`,...y(`intro`),children:e.intro}),(0,n.jsx)(`dl`,{className:`shio-faq__list`,...y(`questions`),children:i.map((e,t)=>(0,n.jsxs)(`div`,{className:`shio-faq__item`,children:[C(e.question)&&(0,n.jsx)(`dt`,{className:`shio-faq__question`,children:e.question}),C(e.answer)&&(0,n.jsx)(`dd`,{className:`shio-faq__answer`,dangerouslySetInnerHTML:T(e.answer)})]},C(e.question)??t))})]})}function M({data:e,className:t,postId:r}){return(0,n.jsxs)(`section`,{className:w(`shio-section`,`shio-richtext`,t),...b(r,`SectionRichText`),children:[C(e.heading)&&(0,n.jsx)(`h2`,{className:`shio-richtext__heading`,...y(`heading`),children:e.heading}),C(e.body)&&(0,n.jsx)(`div`,{className:`shio-richtext__body`,...y(`body`),dangerouslySetInnerHTML:T(e.body)})]})}function N({data:e,className:t,postId:r}){return(0,n.jsx)(`div`,{className:w(`shio-markup`,t),...y(`html`),...b(r,`SectionMarkup`),dangerouslySetInnerHTML:T(C(e.html)??``)})}var P={[r.hero]:E,[r.featureGrid]:D,[r.cta]:O,[r.logoWall]:k,[r.testimonial]:A,[r.faq]:j,[r.markup]:N,[r.richText]:M};function F({sections:e,resolveAsset:t=x,className:r,fallback:i}){return(0,n.jsx)(n.Fragment,{children:e.map((e,a)=>{let o=P[e.type];if(!o)return i?i(e):null;let s={data:e.data,resolveAsset:t,className:r};return(0,n.jsx)(o,{...s},e.url??`${e.type}-${a}`)})})}e.Cta=O,e.Faq=j,e.FeatureGrid=D,e.Hero=E,e.LogoWall=k,e.MENU_ITEM_TYPE=o,e.MENU_TYPE=a,e.Markup=N,e.PAGE_TYPE=i,e.RichText=M,e.SECTION_COMPONENTS=P,e.SECTION_TYPES=r,e.Sections=F,e.Testimonial=A,e.defaultResolveAsset=x,e.menu=c,e.menuItem=l,e.page=s,e.rows=S,e.sectionCta=f,e.sectionFaq=h,e.sectionFeatureGrid=d,e.sectionHero=u,e.sectionLogoWall=p,e.sectionMarkup=g,e.sectionPostTypes=v,e.sectionRichText=_,e.sectionTestimonial=m,e.str=C});
|
package/dist/types.d.ts
CHANGED
|
@@ -110,6 +110,10 @@ export interface RichTextData {
|
|
|
110
110
|
heading?: string;
|
|
111
111
|
body?: string;
|
|
112
112
|
}
|
|
113
|
+
/** SH763 — one field, because the section *is* the markup. */
|
|
114
|
+
export interface MarkupData {
|
|
115
|
+
html?: string;
|
|
116
|
+
}
|
|
113
117
|
/** Default asset resolution: pass URLs and paths through, stream anything else by id. */
|
|
114
118
|
export declare const defaultResolveAsset: (value: string) => string;
|
|
115
119
|
/** A Relator field's rows — tolerant of an absent or non-array value. */
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viglet/shio-sections",
|
|
3
|
-
"version": "2026.3.
|
|
3
|
+
"version": "2026.3.3",
|
|
4
4
|
"description": "The Shio page-section vocabulary (SH95): composable section post-types authored with @viglet/shio-model, plus the matching React components. One shared language for the agent, the console and the front end — a page is an ordered list of known sections instead of an ad-hoc content model per site.",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://openviglet.github.io/shio/",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/openviglet/shio.git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@viglet/shio-model": "2026.3.
|
|
31
|
+
"@viglet/shio-model": "2026.3.3"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": ">=18.0.0"
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@types/react": "^19.
|
|
43
|
-
"react": "^19.
|
|
42
|
+
"@types/react": "^19.3.0",
|
|
43
|
+
"react": "^19.3.1",
|
|
44
44
|
"typescript": "^5.8.3",
|
|
45
|
-
"vite": "^8.
|
|
45
|
+
"vite": "^8.3.5"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
48
48
|
"shio",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"build": "vite build && tsc --emitDeclarationOnly",
|
|
74
74
|
"typecheck": "tsc --noEmit",
|
|
75
75
|
"emit": "node scripts/emit.mjs",
|
|
76
|
-
"test": "node --test \"test/*.test.mjs\""
|
|
76
|
+
"test": "node --import ../scripts/test-watchdog.mjs --test \"test/*.test.mjs\""
|
|
77
77
|
}
|
|
78
78
|
}
|