@bauer-group/accessibility-widget-astro 1.1.0
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/README.md +67 -0
- package/package.json +39 -0
- package/src/AccessibilityWidget.astro +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @bauer-group/accessibility-widget-astro
|
|
2
|
+
|
|
3
|
+
<a id="english"></a>
|
|
4
|
+
|
|
5
|
+
> Astro component for the BAUER GROUP Accessibility Widget.
|
|
6
|
+
|
|
7
|
+
**🇬🇧 English** · [🇩🇪 Deutsch](#-deutsch)
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```astro
|
|
12
|
+
---
|
|
13
|
+
import AccessibilityWidget from '@bauer-group/accessibility-widget-astro/src/AccessibilityWidget.astro';
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<html lang="de">
|
|
17
|
+
<body>
|
|
18
|
+
<slot />
|
|
19
|
+
<AccessibilityWidget
|
|
20
|
+
loaderSrc="/accessibility-widget/accessibility-widget-loader.min.js"
|
|
21
|
+
cssHref="/accessibility-widget/accessibility-widget.min.css"
|
|
22
|
+
config={{ locale: 'auto' }}
|
|
23
|
+
/>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Widget assets go to `public/accessibility-widget/*`.
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT · © 2026 BAUER GROUP — the widget loaded at runtime is separately licensed (AGPL-3.0-only or commercial).
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
<a id="-deutsch"></a>
|
|
37
|
+
|
|
38
|
+
## 🇩🇪 Deutsch
|
|
39
|
+
|
|
40
|
+
> Astro-Komponente für das BAUER GROUP Accessibility Widget.
|
|
41
|
+
|
|
42
|
+
[🇬🇧 English](#english) · **🇩🇪 Deutsch**
|
|
43
|
+
|
|
44
|
+
### Nutzung
|
|
45
|
+
|
|
46
|
+
```astro
|
|
47
|
+
---
|
|
48
|
+
import AccessibilityWidget from '@bauer-group/accessibility-widget-astro/src/AccessibilityWidget.astro';
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
<html lang="de">
|
|
52
|
+
<body>
|
|
53
|
+
<slot />
|
|
54
|
+
<AccessibilityWidget
|
|
55
|
+
loaderSrc="/accessibility-widget/accessibility-widget-loader.min.js"
|
|
56
|
+
cssHref="/accessibility-widget/accessibility-widget.min.css"
|
|
57
|
+
config={{ locale: 'auto' }}
|
|
58
|
+
/>
|
|
59
|
+
</body>
|
|
60
|
+
</html>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Widget-Assets nach `public/accessibility-widget/*`.
|
|
64
|
+
|
|
65
|
+
### Lizenz
|
|
66
|
+
|
|
67
|
+
MIT · © 2026 BAUER GROUP — the widget loaded at runtime is separately licensed (AGPL-3.0-only or commercial).
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bauer-group/accessibility-widget-astro",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Astro Component für das BAUER GROUP Accessibility Widget.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "BAUER GROUP <info@ge.bauer-group.com>",
|
|
7
|
+
"homepage": "https://github.com/bauer-group/SaaS-AccessibilityWidgetIntegrations/tree/main/packages/js/astro",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/bauer-group/SaaS-AccessibilityWidgetIntegrations.git",
|
|
11
|
+
"directory": "packages/js/astro"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/bauer-group/SaaS-AccessibilityWidgetIntegrations/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"astro",
|
|
18
|
+
"accessibility",
|
|
19
|
+
"a11y",
|
|
20
|
+
"wcag",
|
|
21
|
+
"bfsg",
|
|
22
|
+
"en301549",
|
|
23
|
+
"widget",
|
|
24
|
+
"bauer-group"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "./src/AccessibilityWidget.astro",
|
|
28
|
+
"files": [
|
|
29
|
+
"src",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"astro": ">=5"
|
|
34
|
+
},
|
|
35
|
+
"sideEffects": false,
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* Default CDN origin — the floating `v1` (major) tag. The widget stays current
|
|
4
|
+
* automatically. Override the `*Src`/`cssHref` props only to self-host/mirror.
|
|
5
|
+
*/
|
|
6
|
+
const CDN_V1 = 'https://widgets.professional-hosting.com/accessibility-widget/v1';
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
loaderSrc?: string;
|
|
10
|
+
coreSrc?: string;
|
|
11
|
+
cssHref?: string;
|
|
12
|
+
config?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
loaderSrc = `${CDN_V1}/accessibility-widget-loader.min.js`,
|
|
17
|
+
coreSrc = `${CDN_V1}/accessibility-widget-core.min.js`,
|
|
18
|
+
cssHref = `${CDN_V1}/accessibility-widget.min.css`,
|
|
19
|
+
config = {},
|
|
20
|
+
} = Astro.props;
|
|
21
|
+
|
|
22
|
+
// The loader can't derive core/CSS from its own <script src>; pin them here.
|
|
23
|
+
const configJson = JSON.stringify({ corePath: coreSrc, cssPath: cssHref, ...config });
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<script is:inline define:vars={{ configJson }}>
|
|
27
|
+
try {
|
|
28
|
+
window.AccessibilityWidgetConfig = {
|
|
29
|
+
...(window.AccessibilityWidgetConfig ?? {}),
|
|
30
|
+
...JSON.parse(configJson),
|
|
31
|
+
};
|
|
32
|
+
} catch (e) {
|
|
33
|
+
/* silent */
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
{cssHref && <link rel="stylesheet" href={cssHref} data-aw-css="1" />}
|
|
37
|
+
{loaderSrc && <script is:inline src={loaderSrc} defer data-aw-loader="1" />}
|