Skip to content

Commit 7d3acc3

Browse files
authored
Merge pull request #482 from chocolatey/release/2.1.0
(#477)(#478)(#481)(#483)(#484) Bugs and enhancements for Astro projects
2 parents 1aa8a4b + 901b1c5 commit 7d3acc3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2553
-2113
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "choco-theme",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"packageManager": "yarn@4.10.3",
55
"private": true,
66
"license": "Apache-2.0",

packages/astro/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "@chocolatey-software/astro",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Chocolatey Software theme assets for Astro.",
55
"author": "Chocolatey Software (https://chocolatey.org/)",
66
"homepage": "https://github.com/chocolatey/choco-theme/blob/main/packages/astro#readme",
77
"license": "Apache-2.0",
88
"dependencies": {
9-
"@astrojs/check": "0.9.5",
10-
"@astrojs/mdx": "4.3.7",
11-
"@astrojs/node": "9.5.0",
12-
"@astrojs/rss": "4.0.12",
9+
"@astrojs/check": "0.9.6",
10+
"@astrojs/mdx": "4.3.12",
11+
"@astrojs/node": "9.5.1",
12+
"@astrojs/rss": "4.0.14",
1313
"@astrojs/sitemap": "3.6.0",
14-
"astro": "5.14.8",
14+
"astro": "5.16.3",
1515
"rehype-mermaid": "^3.0.0",
1616
"remark-custom-header-id": "^1.0.0"
1717
},

packages/astro/src/components/Callout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type CalloutType = Callout['type'];
1414
1515
interface Props {
1616
content?: Callout
17-
title: CalloutTitle
17+
title?: CalloutTitle
1818
type: CalloutType
1919
}
2020
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
import { z } from 'zod';
3+
import Callout from '@choco-astro/components/Callout.astro';
4+
5+
const dynamicCodeBlockValidationSchema = z.object({
6+
title: z.string().optional(),
7+
message: z.string().optional(),
8+
inputNames: z.array(z.string())
9+
});
10+
11+
type DynamicCodeBlockValidation = z.infer<typeof dynamicCodeBlockValidationSchema>;
12+
type DynamicCodeBlockValidationTitle = DynamicCodeBlockValidation['title'];
13+
type DynamicCodeBlockValidationMessage = DynamicCodeBlockValidation['message'];
14+
type DynamicCodeBlockValidationInputNames = DynamicCodeBlockValidation['inputNames'];
15+
16+
interface Props {
17+
title?: DynamicCodeBlockValidationTitle
18+
message?: DynamicCodeBlockValidationMessage
19+
inputNames?: DynamicCodeBlockValidationInputNames
20+
}
21+
22+
const { title, message, inputNames } = Astro.props;
23+
24+
const content = {
25+
title,
26+
message,
27+
inputNames
28+
};
29+
30+
dynamicCodeBlockValidationSchema.parse(content);
31+
---
32+
33+
<div class="dynamic-code-block-validation fade d-none" data-input-names={inputNames}>
34+
<Callout type="danger" title={title || 'Validation Error'}>
35+
<p>{message || 'Not all fields are complete.'}</p>
36+
</Callout>
37+
</div>

packages/astro/src/components/tabs/TabsPane.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
const { content } = Astro.props;
33
---
44

5-
<div class={`tab-pane fade ${content.isActive ? 'show active' : ''}`} id={content.id} role="tabpanel" aria-labelledby={`${content.id}-tab`} tabindex="0">
6-
<slot />
7-
</div>
5+
{!content.isHidden && (
6+
<div class={`tab-pane fade ${content.isActive ? 'show active' : ''}`} id={content.id} role="tabpanel" aria-labelledby={`${content.id}-tab`} tabindex="0">
7+
<slot />
8+
</div>
9+
)}

packages/astro/src/components/tabs/TabsTabContainer.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export const tabsSchema = z.object({
66
id: z.string(),
77
title: z.string(),
88
isActive: z.boolean().optional().default(false),
9+
isDisabled: z.boolean().optional().default(false),
10+
isHidden: z.boolean().optional().default(false),
911
updateAnchor: z.boolean().optional().default(true),
1012
multiTab: z.string().optional()
1113
});
@@ -36,9 +38,9 @@ content.map(item => {
3638

3739
<ul class="nav nav-tabs" role="tablist">
3840
{
39-
content.map(item => (
41+
content.filter(item => !item.isHidden).map(item => (
4042
<li class="nav-item">
41-
<a class={`nav-link ${item.isActive ? 'active' : ''} ${item.updateAnchor ? '' : 'd-hash-none'}`} id={`${item.id}-tab`} data-bs-toggle="tab" href={`#${item.id}`} role="tab" aria-controls={item.id} aria-selected={item.isActive ? true : false} data-choco-tab-multi={item.multiTab ? item.multiTab : ''}>{item.title}</a>
43+
<a class={`nav-link ${item.isActive ? 'active' : ''} ${item.updateAnchor ? '' : 'd-hash-none'} ${item.isDisabled ? 'disabled' : ''}`} id={`${item.id}-tab`} data-bs-toggle="tab" href={item.isDisabled ? null :`#${item.id}`} aria-disabled={item.isDisabled} role="tab" aria-controls={item.id} aria-selected={item.isActive ? true : false} data-choco-tab-multi={item.multiTab ? item.multiTab : ''}>{item.title}</a>
4244
</li>
4345
))
4446
}

packages/blog/dist/css/blog.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41601,7 +41601,7 @@ textarea.form-control-lg {
4160141601
.far,
4160241602
.fab,
4160341603
.fa {
41604-
--_fa-family: var(--fa-family, var(--fa-style-family, "Font Awesome 7 Free"));
41604+
--_fa-family: var(--fa-family, var(--fa-style-family, 'Font Awesome 7 Free'));
4160541605
-webkit-font-smoothing: antialiased;
4160641606
-moz-osx-font-smoothing: grayscale;
4160741607
display: var(--fa-display, inline-block);
@@ -49956,7 +49956,7 @@ textarea.form-control-lg {
4995649956
* Copyright 2025 Fonticons, Inc.
4995749957
*/
4995849958
:root, :host {
49959-
--fa-family-classic: "Font Awesome 7 Free";
49959+
--fa-family-classic: 'Font Awesome 7 Free';
4996049960
--fa-font-solid: normal 900 1em/1 var(--fa-family-classic);
4996149961
/* deprecated: this older custom property will be removed next major release */
4996249962
--fa-style-family-classic: var(--fa-family-classic);
@@ -49988,7 +49988,7 @@ textarea.form-control-lg {
4998849988
* Copyright 2025 Fonticons, Inc.
4998949989
*/
4999049990
:root, :host {
49991-
--fa-family-classic: "Font Awesome 7 Free";
49991+
--fa-family-classic: 'Font Awesome 7 Free';
4999249992
--fa-font-regular: normal 400 1em/1 var(--fa-family-classic);
4999349993
/* deprecated: this older custom property will be removed next major release */
4999449994
--fa-style-family-classic: var(--fa-family-classic);
@@ -50020,7 +50020,7 @@ textarea.form-control-lg {
5002050020
* Copyright 2025 Fonticons, Inc.
5002150021
*/
5002250022
:root, :host {
50023-
--fa-family-brands: "Font Awesome 7 Brands";
50023+
--fa-family-brands: 'Font Awesome 7 Brands';
5002450024
--fa-font-brands: normal 400 1em/1 var(--fa-family-brands);
5002550025
}
5002650026

packages/blog/dist/partials/TermsContent.astro

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<h2 id="agreement-to-terms">1. Agreement to Terms</h2>
22
<p>
33
These Terms of Use constitute a legally binding agreement made between you, whether personally or on behalf of an entity ("you") and Chocolatey Software, Inc
4-
(<strong>"Company"</strong>, <strong>"we"</strong>, <strong>"us"</strong>, or <strong>"our"</strong>), concerning your access to and use of the
4+
(<strong>"Company"</strong>, <strong>"we"</strong>, <strong>"us"</strong>, or <strong>"our"</strong>), concerning your access to and use of the
55
<a href="https://chocolatey.org">https://chocolatey.org</a> and <a href="https://community.chocolatey.org">https://community.chocolatey.org</a> websites as well as any
66
other media form, media channel, mobile website or mobile application related, linked, or otherwise connected thereto (collectively, the "Site"). We are
7-
registered in Kansas, United States and have our registered office at 6021 SW 29th St Ste A302, Topeka, KS 66614.
8-
You agree that by accessing the Site, you have read, understood, and agree to be bound by all of these Terms of Use. IF YOU DO NOT AGREE WITH ALL OF THESE TERMS OF USE,
7+
registered in Kansas, United States and have our registered office at 4011 SW 29th St Ste 302, Topeka, KS 66614.
8+
You agree that by accessing the Site, you have read, understood, and agree to be bound by all of these Terms of Use. IF YOU DO NOT AGREE WITH ALL OF THESE TERMS OF USE,
99
THEN YOU ARE EXPRESSLY PROHIBITED FROM USING THE SITE AND YOU MUST DISCONTINUE USE IMMEDIATELY.
1010
</p>
1111
<p>
@@ -334,9 +334,9 @@
334334
</p>
335335
<h2 id="privacy-policy">17. Privacy Policy</h2>
336336
<p>
337-
We care about data privacy and security. Please review our Privacy Policy: <a href="https://chocolatey.org/privacy">https://chocolatey.org/privacy</a>. By using the Site,
338-
you agree to be bound by our Privacy Policy, which is incorporated into these Terms of Use. Please be advised the Site is hosted in the United States. If you access the Site
339-
from any other region of the world with laws or other requirements governing personal data collection, use, or disclosure that differ from applicable laws in the United States,
337+
We care about data privacy and security. Please review our Privacy Policy: <a href="https://chocolatey.org/privacy">https://chocolatey.org/privacy</a>. By using the Site,
338+
you agree to be bound by our Privacy Policy, which is incorporated into these Terms of Use. Please be advised the Site is hosted in the United States. If you access the Site
339+
from any other region of the world with laws or other requirements governing personal data collection, use, or disclosure that differ from applicable laws in the United States,
340340
then through your continued use of the Site, you are transferring your data to the United States, and you agree to have your data transferred to and processed in the United States.
341341
</p>
342342
<h2 id="copyright-infringements">18. Copyright Infringements</h2>
@@ -492,7 +492,7 @@
492492
<p>
493493
<strong>
494494
Chocolatey Software, Inc<br />
495-
6021 SW 29th St Ste A302<br />
495+
4011 SW 29th St Ste 302<br />
496496
Topeka, KS 66614<br />
497497
United States<br />
498498
<a href="https://chocolatey.org/contact/general">https://chocolatey.org/contact/general</a>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Last updated 01 January 2021
1+
Last updated 10 November 2025

packages/blog/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chocolatey-software/blog",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Chocolatey Software theme assets for use on blog.chocolatey.org.",
55
"author": "Chocolatey Software (https://chocolatey.org/)",
66
"homepage": "https://github.com/chocolatey/choco-theme/blob/main/packages/blog#readme",

0 commit comments

Comments
 (0)