@sprig-and-prose/sprig-ui-csr 0.2.0 → 0.2.2

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/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "@sprig-and-prose/sprig-ui-csr",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "sprig-ui-csr": "./src/cli.js"
7
7
  },
8
+ "files": [
9
+ "dist",
10
+ "src"
11
+ ],
8
12
  "scripts": {
9
13
  "dev": "vite dev",
10
14
  "build": "vite build",
15
+ "prepare": "npm run build",
11
16
  "start": "node src/cli.js",
12
17
  "format": "biome format . --write",
13
18
  "lint": "biome lint .",
@@ -19,6 +24,7 @@
19
24
  },
20
25
  "devDependencies": {
21
26
  "@biomejs/biome": "^2.3.10",
27
+ "@fortawesome/fontawesome-free": "^7.1.0",
22
28
  "@sveltejs/vite-plugin-svelte": "^5.0.0",
23
29
  "@types/node": "^22.0.0",
24
30
  "svelte": "^5.46.0",
package/src/App.svelte CHANGED
@@ -210,10 +210,26 @@
210
210
  width: 100%;
211
211
  position: sticky;
212
212
  top: 0;
213
- background-color: var(--bg-color);
213
+ /* Background texture applied via JavaScript in main.js to match body texture */
214
+ /* Use semi-transparent background to allow texture to show while covering scrolling content */
215
+ background-color: rgba(250, 250, 250, 0.95); /* Light mode base with slight transparency */
214
216
  z-index: 100;
215
217
  }
216
218
 
219
+ @media (prefers-color-scheme: dark) {
220
+ .top-bar {
221
+ background-color: rgba(36, 34, 31, 0.95); /* Dark mode base with slight transparency */
222
+ }
223
+ }
224
+
225
+ :global(html[data-theme="dark"]) .top-bar {
226
+ background-color: rgba(36, 34, 31, 0.95); /* Dark mode base with slight transparency */
227
+ }
228
+
229
+ :global(html[data-theme="light"]) .top-bar {
230
+ background-color: rgba(250, 250, 250, 0.95); /* Light mode base with slight transparency */
231
+ }
232
+
217
233
  .main-content {
218
234
  padding: 64px 32px;
219
235
  min-height: calc(100vh - 200px);
@@ -397,7 +397,7 @@
397
397
  top: calc(100% + 4px);
398
398
  left: 0;
399
399
  right: 0;
400
- background: var(--bg-color);
400
+ background: var(--card-bg);
401
401
  border: 1px solid var(--border-color);
402
402
  border-radius: 4px;
403
403
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
@@ -71,7 +71,7 @@
71
71
  listItems.push(currentItem);
72
72
  }
73
73
  const match = lines[i].match(/^[-—*]\s+(.+)$/);
74
- currentItem = match[1];
74
+ currentItem = match && match[1] ? match[1] : '';
75
75
  } else {
76
76
  // Continuation line - append to current item
77
77
  if (currentItem !== null) {
@@ -113,7 +113,7 @@
113
113
  listItems.push(currentItem);
114
114
  }
115
115
  const match = lines[i].match(/^\d+\.\s+(.+)$/);
116
- currentItem = match[1];
116
+ currentItem = match && match[1] ? match[1] : '';
117
117
  } else {
118
118
  // Continuation line - append to current item
119
119
  if (currentItem !== null) {
@@ -3,7 +3,7 @@ import { writable } from 'svelte/store';
3
3
  /**
4
4
  * Store for describe block rendering mode.
5
5
  * Values: 'plain' | 'lists'
6
- * Default: 'plain'
6
+ * Default: 'lists'
7
7
  */
8
- export const describeRenderMode = writable(/** @type {'plain' | 'lists'} */ ('plain'));
8
+ export const describeRenderMode = writable(/** @type {'plain' | 'lists'} */ ('lists'));
9
9
 
package/src/main.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import './styles/app.css';
2
+ import '@fortawesome/fontawesome-free/css/all.css';
2
3
  import './lib/stores/theme.js'; // Initialize theme store
3
4
  import { theme } from './lib/stores/theme.js';
4
5
  import { get } from 'svelte/store';
@@ -49,10 +50,21 @@ async function initTexture() {
49
50
  const effectiveTheme = getEffectiveTheme(themeValue);
50
51
  const url = effectiveTheme === 'dark' ? textureState.dark : textureState.light;
51
52
  if (url) {
53
+ // Apply texture to body
52
54
  document.body.style.backgroundImage = `url(${url})`;
53
55
  document.body.style.backgroundRepeat = 'repeat';
54
56
  document.body.style.backgroundSize = '1024px 1024px';
55
57
  document.body.style.backgroundAttachment = 'fixed';
58
+
59
+ // Apply same texture to top bar so it matches the background
60
+ const topBar = document.querySelector('.top-bar');
61
+ if (topBar) {
62
+ topBar.style.backgroundImage = `url(${url})`;
63
+ topBar.style.backgroundRepeat = 'repeat';
64
+ topBar.style.backgroundSize = '1024px 1024px';
65
+ topBar.style.backgroundAttachment = 'fixed';
66
+ topBar.style.backgroundPosition = '0 0'; // Align with body
67
+ }
56
68
  }
57
69
  }
58
70
 
@@ -223,7 +223,7 @@
223
223
  <li class="relationship-item">
224
224
  <a class="relationship-link sprig-link" href={getNodeRoute(rel.otherNode)}>
225
225
  <span class="relationship-label">{rel.label}</span>
226
- <span class="relationship-separator">→</span>
226
+ <span class="relationship-separator"><i class="fas fa-arrow-right" aria-hidden="true"></i></span>
227
227
  <span class="relationship-name">{displayName}</span>
228
228
  <span class="relationship-kind">{rel.otherNode.kind}</span>
229
229
  </a>
@@ -172,7 +172,7 @@
172
172
  <li class="relationship-item">
173
173
  <a class="relationship-link sprig-link" href={getNodeRoute(rel.otherNode)}>
174
174
  <span class="relationship-label">{rel.label}</span>
175
- <span class="relationship-separator">→</span>
175
+ <span class="relationship-separator"><i class="fas fa-arrow-right" aria-hidden="true"></i></span>
176
176
  <span class="relationship-name">{displayName}</span>
177
177
  <span class="relationship-kind">{rel.otherNode.kind}</span>
178
178
  </a>
@@ -44,7 +44,7 @@
44
44
  --sprig-link-anchor-underline: rgba(0, 0, 0, 0.35);
45
45
  --sprig-link-anchor-underline-hover: rgba(0, 0, 0, 0.5);
46
46
 
47
- --card-bg: rgba(235, 225, 210, 0.8); /* Original parchment tone for light theme */
47
+ --card-bg: rgb(235, 225, 210); /* Opaque parchment tone for light theme */
48
48
  --card-border: var(--border-color);
49
49
 
50
50
  --hairline: var(--border-color);
@@ -172,7 +172,7 @@ html[data-theme="light"] {
172
172
  --sprig-link-anchor-underline: rgba(0, 0, 0, 0.35);
173
173
  --sprig-link-anchor-underline-hover: rgba(0, 0, 0, 0.5);
174
174
 
175
- --card-bg: rgba(235, 225, 210, 0.8); /* Original parchment tone for light theme */
175
+ --card-bg: rgb(235, 225, 210); /* Opaque parchment tone for light theme */
176
176
  --card-border: var(--border-color);
177
177
 
178
178
  --hairline: var(--border-color);
package/biome.json DELETED
@@ -1,37 +0,0 @@
1
- {
2
- "$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
3
- "files": {
4
- "ignoreUnknown": true
5
- },
6
- "overrides": [
7
- {
8
- "includes": ["**/*.svelte"],
9
- "linter": { "enabled": false },
10
- "formatter": { "enabled": false }
11
- },
12
- {
13
- "includes": ["dist/**"],
14
- "linter": { "enabled": false },
15
- "formatter": { "enabled": false }
16
- }
17
- ],
18
- "assist": { "actions": { "source": { "organizeImports": "on" } } },
19
- "linter": {
20
- "enabled": true,
21
- "rules": {
22
- "recommended": true
23
- }
24
- },
25
- "formatter": {
26
- "enabled": true,
27
- "indentStyle": "space",
28
- "indentWidth": 2
29
- },
30
- "javascript": {
31
- "formatter": {
32
- "quoteStyle": "single",
33
- "semicolons": "always"
34
- }
35
- }
36
- }
37
-