snice 3.7.0 → 3.8.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.
Files changed (51) hide show
  1. package/README.md +2 -2
  2. package/bin/snice.js +3 -5
  3. package/bin/templates/CLAUDE.md +5 -5
  4. package/bin/templates/pwa/README.md +31 -16
  5. package/bin/templates/pwa/index.html +0 -1
  6. package/bin/templates/pwa/package.json +9 -2
  7. package/bin/templates/pwa/src/fetcher.ts +15 -0
  8. package/bin/templates/pwa/src/guards/auth.ts +6 -4
  9. package/bin/templates/pwa/src/middleware/auth.ts +7 -6
  10. package/bin/templates/pwa/src/middleware/error.ts +16 -5
  11. package/bin/templates/pwa/src/middleware/retry.ts +7 -3
  12. package/bin/templates/pwa/src/pages/dashboard.ts +4 -3
  13. package/bin/templates/pwa/src/pages/login.ts +7 -7
  14. package/bin/templates/pwa/src/pages/notifications.ts +2 -2
  15. package/bin/templates/pwa/src/pages/profile.ts +9 -8
  16. package/bin/templates/pwa/src/router.ts +8 -4
  17. package/bin/templates/pwa/src/types/auth.ts +1 -1
  18. package/bin/templates/pwa/tests/helpers/test-utils.ts +84 -0
  19. package/bin/templates/pwa/tests/middleware/auth.test.ts +67 -0
  20. package/bin/templates/pwa/tests/middleware/error.test.ts +105 -0
  21. package/bin/templates/pwa/tests/middleware/retry.test.ts +103 -0
  22. package/bin/templates/pwa/tests/services/auth.test.ts +89 -0
  23. package/bin/templates/pwa/tests/services/jwt.test.ts +76 -0
  24. package/bin/templates/pwa/tests/services/storage.test.ts +69 -0
  25. package/bin/templates/{social/vite.config.ts → pwa/vitest.config.ts} +12 -17
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.esm.js +1 -1
  28. package/dist/index.iife.js +1 -1
  29. package/dist/symbols.cjs +1 -1
  30. package/dist/symbols.esm.js +1 -1
  31. package/dist/transitions.cjs +1 -1
  32. package/dist/transitions.esm.js +1 -1
  33. package/docs/ai/patterns.md +1 -1
  34. package/docs/routing.md +9 -8
  35. package/package.json +1 -1
  36. package/bin/templates/pwa/public/manifest.json +0 -24
  37. package/bin/templates/pwa/src/utils/fetch.ts +0 -39
  38. package/bin/templates/social/README.md +0 -42
  39. package/bin/templates/social/global.d.ts +0 -14
  40. package/bin/templates/social/index.html +0 -13
  41. package/bin/templates/social/package.json +0 -21
  42. package/bin/templates/social/public/vite.svg +0 -1
  43. package/bin/templates/social/src/main.ts +0 -33
  44. package/bin/templates/social/src/pages/feed-page.ts +0 -111
  45. package/bin/templates/social/src/pages/messages-page.ts +0 -102
  46. package/bin/templates/social/src/pages/not-found-page.ts +0 -46
  47. package/bin/templates/social/src/pages/profile-page.ts +0 -99
  48. package/bin/templates/social/src/pages/settings-page.ts +0 -119
  49. package/bin/templates/social/src/router.ts +0 -9
  50. package/bin/templates/social/src/styles/global.css +0 -156
  51. package/bin/templates/social/tsconfig.json +0 -22
@@ -1,156 +0,0 @@
1
- * {
2
- margin: 0;
3
- padding: 0;
4
- box-sizing: border-box;
5
- }
6
-
7
- body {
8
- font-family: var(--snice-font-family);
9
- background: var(--snice-color-background);
10
- color: var(--snice-color-text);
11
- line-height: var(--snice-line-height-normal);
12
- }
13
-
14
- /* Override component backgrounds to respect dark mode */
15
- snice-card {
16
- --card-bg: var(--snice-color-background-element);
17
- }
18
-
19
- snice-layout-sidebar {
20
- --sidebar-bg: var(--snice-color-background-secondary);
21
- }
22
-
23
- #app {
24
- min-height: 100vh;
25
- }
26
-
27
- .post {
28
- margin-bottom: var(--snice-spacing-md);
29
- }
30
-
31
- .post-header {
32
- display: flex;
33
- align-items: center;
34
- gap: var(--snice-spacing-md);
35
- margin-bottom: var(--snice-spacing-md);
36
- }
37
-
38
- .post-author {
39
- display: flex;
40
- flex-direction: column;
41
- }
42
-
43
- .post-name {
44
- font-weight: var(--snice-font-weight-semibold);
45
- color: var(--snice-color-text);
46
- }
47
-
48
- .post-time {
49
- font-size: var(--snice-font-size-sm);
50
- color: var(--snice-color-text-secondary);
51
- }
52
-
53
- .post-content {
54
- margin-bottom: var(--snice-spacing-md);
55
- line-height: var(--snice-line-height-loose);
56
- }
57
-
58
- .post-actions {
59
- display: flex;
60
- gap: var(--snice-spacing-md);
61
- padding-top: var(--snice-spacing-md);
62
- border-top: 1px solid var(--snice-color-border);
63
- }
64
-
65
- .profile-header {
66
- text-align: center;
67
- padding: var(--snice-spacing-2xl);
68
- background: linear-gradient(135deg, var(--snice-color-primary) 0%, var(--snice-color-primary-hover) 100%);
69
- color: var(--snice-color-text-inverse);
70
- border-radius: var(--snice-border-radius-xl) var(--snice-border-radius-xl) 0 0;
71
- margin-bottom: var(--snice-spacing-2xl);
72
- }
73
-
74
- .profile-name {
75
- font-size: var(--snice-font-size-2xl);
76
- font-weight: var(--snice-font-weight-semibold);
77
- margin-top: var(--snice-spacing-md);
78
- }
79
-
80
- .profile-bio {
81
- margin-top: var(--snice-spacing-xs);
82
- opacity: 0.9;
83
- }
84
-
85
- .stats-grid {
86
- display: grid;
87
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
88
- gap: var(--snice-spacing-md);
89
- margin-bottom: var(--snice-spacing-2xl);
90
- }
91
-
92
- .message-item {
93
- display: flex;
94
- gap: var(--snice-spacing-md);
95
- padding: var(--snice-spacing-md);
96
- border-bottom: 1px solid var(--snice-color-border);
97
- cursor: pointer;
98
- transition: background var(--snice-transition-fast);
99
- }
100
-
101
- .message-item:hover {
102
- background: var(--snice-color-background-secondary);
103
- }
104
-
105
- .message-content {
106
- flex: 1;
107
- }
108
-
109
- .message-name {
110
- font-weight: var(--snice-font-weight-semibold);
111
- margin-bottom: var(--snice-spacing-2xs);
112
- }
113
-
114
- .message-preview {
115
- font-size: var(--snice-font-size-sm);
116
- color: var(--snice-color-text-secondary);
117
- }
118
-
119
- .settings-section {
120
- margin-bottom: var(--snice-spacing-2xl);
121
- }
122
-
123
- .settings-section h2 {
124
- font-size: var(--snice-font-size-xl);
125
- margin-bottom: var(--snice-spacing-md);
126
- color: var(--snice-color-text);
127
- }
128
-
129
- .settings-group {
130
- display: flex;
131
- flex-direction: column;
132
- gap: var(--snice-spacing-md);
133
- }
134
-
135
- .setting-item {
136
- display: flex;
137
- justify-content: space-between;
138
- align-items: center;
139
- padding: var(--snice-spacing-md) 0;
140
- border-bottom: 1px solid var(--snice-color-border);
141
- }
142
-
143
- .setting-label {
144
- display: flex;
145
- flex-direction: column;
146
- gap: var(--snice-spacing-2xs);
147
- }
148
-
149
- .setting-title {
150
- font-weight: var(--snice-font-weight-medium);
151
- }
152
-
153
- .setting-description {
154
- font-size: var(--snice-font-size-sm);
155
- color: var(--snice-color-text-secondary);
156
- }
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
6
- "skipLibCheck": true,
7
- "moduleResolution": "bundler",
8
- "allowImportingTsExtensions": true,
9
- "resolveJsonModule": true,
10
- "isolatedModules": true,
11
- "noEmit": true,
12
- "strict": true,
13
- "noUnusedLocals": true,
14
- "noUnusedParameters": true,
15
- "noFallthroughCasesInSwitch": true,
16
- "experimentalDecorators": false,
17
- "emitDecoratorMetadata": false,
18
- "useDefineForClassFields": false,
19
- "types": ["vite/client", "node"]
20
- },
21
- "include": ["src"]
22
- }