specra 0.2.4 → 0.2.6

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.
@@ -50,7 +50,7 @@
50
50
  let { docs, version, onLinkClick, config, activeTabGroup }: Props = $props();
51
51
 
52
52
  let collapsed: Record<string, boolean> = $state({});
53
- let pathname = $derived($page.url.pathname);
53
+ let pathname = $derived($page.url.pathname.replace(/\/$/, ''));
54
54
 
55
55
  // Filter docs by active tab group if tab groups are configured
56
56
  let hasTabGroups = $derived(
@@ -34,9 +34,9 @@ export declare function sanitizeMDXContent(content: string, strict?: boolean): s
34
34
  export declare const CSP_DIRECTIVES: {
35
35
  readonly "default-src": readonly ["'self'"];
36
36
  readonly "script-src": readonly ["'self'", "'unsafe-inline'", "'unsafe-eval'"];
37
- readonly "style-src": readonly ["'self'", "'unsafe-inline'"];
37
+ readonly "style-src": readonly ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"];
38
38
  readonly "img-src": readonly ["'self'", "data:", "https:"];
39
- readonly "font-src": readonly ["'self'", "data:"];
39
+ readonly "font-src": readonly ["'self'", "data:", "https://fonts.gstatic.com"];
40
40
  readonly "connect-src": readonly ["'self'"];
41
41
  readonly "frame-src": readonly ["'self'"];
42
42
  readonly "object-src": readonly ["'none'"];
@@ -123,9 +123,9 @@ export const CSP_DIRECTIVES = {
123
123
  "'unsafe-inline'", // Required for Next.js
124
124
  "'unsafe-eval'", // Required for dev mode - remove in production
125
125
  ],
126
- "style-src": ["'self'", "'unsafe-inline'"], // Required for styled-components/emotion
126
+ "style-src": ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"],
127
127
  "img-src": ["'self'", "data:", "https:"],
128
- "font-src": ["'self'", "data:"],
128
+ "font-src": ["'self'", "data:", "https://fonts.gstatic.com"],
129
129
  "connect-src": ["'self'"],
130
130
  "frame-src": ["'self'"],
131
131
  "object-src": ["'none'"],
@@ -441,7 +441,8 @@ pre code {
441
441
  border: 1px solid var(--border);
442
442
  border-radius: 0.75rem;
443
443
  overflow: hidden;
444
- width: 100%;
444
+ width: max-content;
445
+ max-width: 100%;
445
446
  margin-top: 1rem;
446
447
  margin-bottom: 1rem;
447
448
  display: block;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specra",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "A modern documentation library for SvelteKit with built-in versioning, API reference generation, full-text search, and MDX support",
5
5
  "svelte": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",