@fldr/ui 0.1.0 → 0.3.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 (56) hide show
  1. package/dist/.build-complete +1 -1
  2. package/dist/chunks/{code-nj2nu6qzxhz6qnkk.js → code-hp2x28uiufmk3elz.js} +2 -4
  3. package/dist/chunks/highlighter-mouttug0tu8xg1i8.js +1364 -0
  4. package/dist/code/server.d.ts +4 -89
  5. package/dist/code/server.js +3 -136
  6. package/dist/code.d.ts +53 -70
  7. package/dist/code.js +186 -327
  8. package/dist/command-line/cli.js +0 -0
  9. package/dist/command-line/commands/add.js +0 -0
  10. package/dist/command-line/commands/ai.js +0 -0
  11. package/dist/command-line/commands/blocks.js +0 -0
  12. package/dist/command-line/commands/doc.js +0 -0
  13. package/dist/command-line/commands/init.js +0 -0
  14. package/dist/command-line/commands/ls.js +0 -0
  15. package/dist/components/code.d.ts +1 -1
  16. package/dist/components/code.js +1 -1
  17. package/dist/highlighter-BT3TakhJ.d.ts +13 -0
  18. package/dist/{index-B9niVl3r.d.ts → index-CNL6VDYZ.d.ts} +2 -4
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/styles/kumo-binding.css +1 -0
  22. package/dist/styles/kumo-standalone.css +1 -1
  23. package/dist/styles/kumo.css +20 -38
  24. package/dist/styles/theme-code.css +142 -0
  25. package/dist/styles/theme-fldr.css +429 -15
  26. package/dist/theming.d.ts +71 -32
  27. package/dist/theming.js +162 -17
  28. package/package.json +2 -4
  29. package/scripts/css-build.ts +1 -0
  30. package/scripts/publish-fldr.ts +50 -8
  31. package/scripts/theme-generator/index.ts +15 -5
  32. package/dist/chunks/bash-jpzh6zbf5237424t.js +0 -3
  33. package/dist/chunks/core-n0de50o00ej2ecfe.js +0 -7177
  34. package/dist/chunks/css-j501gxq1am2gnikh.js +0 -4
  35. package/dist/chunks/diff-g2re0kj6fh27rgg5.js +0 -4
  36. package/dist/chunks/engine-javascript-e9xj8hhz9xfqhpnu.js +0 -3118
  37. package/dist/chunks/engine-oniguruma-ias56ildu01gf939.js +0 -389
  38. package/dist/chunks/github-light-hir7yctc38258pwt.js +0 -5
  39. package/dist/chunks/graphql-n9vlzkvcp2j19p7a.js +0 -16
  40. package/dist/chunks/hcl-ohpfnrffs96hzyj5.js +0 -4
  41. package/dist/chunks/html-nimj6ljkkifnc9ni.js +0 -12
  42. package/dist/chunks/javascript-b6fq9bl50fdj6813.js +0 -4
  43. package/dist/chunks/json-h2g0z143t3cs13d7.js +0 -4
  44. package/dist/chunks/jsonc-jxlzvingck161eej.js +0 -4
  45. package/dist/chunks/jsx-jp7a33937sef92sn.js +0 -4
  46. package/dist/chunks/markdown-eybeqjr58vfygtz1.js +0 -4
  47. package/dist/chunks/python-nrpnmxq4r6yp6fcd.js +0 -4
  48. package/dist/chunks/shellscript-i4m7lo8wi0f5bl8b.js +0 -4
  49. package/dist/chunks/sql-hqp2eekl7qhmxe92.js +0 -4
  50. package/dist/chunks/toml-oyqrgosuct25x413.js +0 -4
  51. package/dist/chunks/tsx-pem8x69upvmibv6l.js +0 -4
  52. package/dist/chunks/typescript-pe5y016phdwbgws7.js +0 -4
  53. package/dist/chunks/vesper-g839e590k3dxnwh3.js +0 -5
  54. package/dist/chunks/wasm-cpasy0o9lsjrm39j.js +0 -8
  55. package/dist/chunks/yaml-kzk5ddyekbyha04v.js +0 -4
  56. package/dist/types-C6in2C8V.d.ts +0 -135
@@ -90,64 +90,46 @@
90
90
  }
91
91
 
92
92
  /* ============================================
93
- Shiki syntax highlighting styles
93
+ Code highlighting (TanStack Highlight)
94
+ Token colors live in theme-code.css and follow data-mode.
94
95
  ============================================ */
95
96
 
96
- /*
97
- * Shiki dual-theme support.
98
- * Shiki outputs inline styles with light colors directly applied,
99
- * and dark colors stored in --shiki-dark CSS variables.
100
- *
101
- * The <pre> background is made transparent so the container's bg-kumo-base
102
- * shows through and respects the border-radius.
103
- *
104
- * In dark mode: override text colors with --shiki-dark variables.
105
- * !important is needed to override Shiki's inline styles.
106
- */
107
- .kumo-shiki pre {
108
- background-color: transparent !important;
109
- }
110
-
111
- [data-mode="dark"] .kumo-shiki span:not(.line-highlighted) {
112
- color: var(--shiki-dark) !important;
113
- background-color: transparent !important;
114
- }
115
-
116
- [data-mode="dark"] .kumo-shiki .line-highlighted {
117
- color: var(--shiki-dark) !important;
97
+ /* The Kumo container draws the frame and background. */
98
+ .kumo-code pre.th-code {
99
+ margin: 0;
100
+ background: transparent;
101
+ font-family: var(--font-mono);
102
+ font-size: var(--text-sm);
103
+ line-height: 1.625;
118
104
  }
119
105
 
120
- /*
121
- * Line highlighting - based on VitePress pattern.
122
- * The code element sizes to content (fit-content) but at least 100%,
123
- * then highlighted lines extend into the padding with negative margins.
124
- */
125
- .kumo-shiki code {
106
+ /* Size to content but fill the frame, keeping right padding on overflow. */
107
+ .kumo-code code {
126
108
  display: block;
127
109
  width: fit-content;
128
110
  min-width: 100%;
129
- /* Ensure right padding is preserved when content overflows horizontally */
130
111
  padding-right: 1rem;
131
112
  }
132
113
 
133
- .kumo-shiki {
114
+ .kumo-code {
134
115
  --kumo-code-highlight-bg: rgba(0, 0, 0, 0.05);
135
116
  }
136
117
 
137
- [data-mode="dark"] .kumo-shiki {
118
+ [data-mode="dark"] .kumo-code {
138
119
  --kumo-code-highlight-bg: rgba(255, 255, 255, 0.08);
139
120
  }
140
121
 
141
- .kumo-shiki .line.line-highlighted {
142
- display: inline-block;
122
+ /* Highlighted lines bleed into the frame's padding. */
123
+ .kumo-code .th-line.line-highlighted {
143
124
  width: calc(100% + 2rem);
144
125
  margin: 0 -1rem;
145
126
  padding: 0 1rem;
146
127
  background-color: var(--kumo-code-highlight-bg);
147
128
  }
148
129
 
149
- /* Line numbers - positioned alongside code with matching line-height */
150
- .kumo-line-numbers {
151
- padding-left: 0.75rem;
152
- line-height: 1.625; /* matches leading-relaxed */
130
+ /* A plain block has no padding, so keep highlights within the content. */
131
+ .kumo-code--plain .th-line.line-highlighted {
132
+ width: 100%;
133
+ margin: 0;
134
+ padding: 0;
153
135
  }
@@ -0,0 +1,142 @@
1
+ /* Code highlighting colors. Generated by generateCodeThemeCSS(). */
2
+ @layer base {
3
+ :root,
4
+ [data-mode="light"] {
5
+ --th-background: #ffffff;
6
+ --th-token: #24292f;
7
+ --th-attr: #0550ae;
8
+ --th-code-inline: #953800;
9
+ --th-command: #8250df;
10
+ --th-comment: #6e7781;
11
+ --th-deleted: #cf222e;
12
+ --th-function: #8250df;
13
+ --th-heading: #0550ae;
14
+ --th-inserted: #1a7f37;
15
+ --th-keyword: #cf222e;
16
+ --th-link: #0969da;
17
+ --th-literal: #0550ae;
18
+ --th-meta: #57606a;
19
+ --th-number: #0550ae;
20
+ --th-operator: #8250df;
21
+ --th-property: #0550ae;
22
+ --th-selector: #116329;
23
+ --th-string: #0a7f64;
24
+ --th-tag: #116329;
25
+ --th-type: #953800;
26
+ --th-variable: #953800;
27
+ }
28
+
29
+ :root[data-mode="dark"],
30
+ [data-mode="dark"] {
31
+ --th-background: #0d1117;
32
+ --th-token: #c9d1d9;
33
+ --th-attr: #79c0ff;
34
+ --th-code-inline: #ffa657;
35
+ --th-command: #d2a8ff;
36
+ --th-comment: #8b949e;
37
+ --th-deleted: #ff7b72;
38
+ --th-function: #d2a8ff;
39
+ --th-heading: #79c0ff;
40
+ --th-inserted: #7ee787;
41
+ --th-keyword: #ff7b72;
42
+ --th-link: #58a6ff;
43
+ --th-literal: #79c0ff;
44
+ --th-meta: #8b949e;
45
+ --th-number: #79c0ff;
46
+ --th-operator: #d2a8ff;
47
+ --th-property: #79c0ff;
48
+ --th-selector: #7ee787;
49
+ --th-string: #a5d6ff;
50
+ --th-tag: #7ee787;
51
+ --th-type: #ffa657;
52
+ --th-variable: #ffa657;
53
+ }
54
+
55
+ pre.th-code {
56
+ overflow-x: auto;
57
+ padding: 1rem;
58
+ background: var(--th-background);
59
+ color: var(--th-token);
60
+ }
61
+
62
+ .th-token {
63
+ color: var(--th-token);
64
+ }
65
+ .th-attr {
66
+ color: var(--th-attr);
67
+ }
68
+ .th-code-inline {
69
+ color: var(--th-code-inline);
70
+ }
71
+ .th-command {
72
+ color: var(--th-command);
73
+ }
74
+ .th-comment {
75
+ color: var(--th-comment);
76
+ }
77
+ .th-deleted {
78
+ color: var(--th-deleted);
79
+ }
80
+ .th-function {
81
+ color: var(--th-function);
82
+ }
83
+ .th-heading {
84
+ color: var(--th-heading);
85
+ }
86
+ .th-inserted {
87
+ color: var(--th-inserted);
88
+ }
89
+ .th-keyword {
90
+ color: var(--th-keyword);
91
+ }
92
+ .th-link {
93
+ color: var(--th-link);
94
+ }
95
+ .th-literal {
96
+ color: var(--th-literal);
97
+ }
98
+ .th-meta {
99
+ color: var(--th-meta);
100
+ }
101
+ .th-number {
102
+ color: var(--th-number);
103
+ }
104
+ .th-operator {
105
+ color: var(--th-operator);
106
+ }
107
+ .th-property {
108
+ color: var(--th-property);
109
+ }
110
+ .th-selector {
111
+ color: var(--th-selector);
112
+ }
113
+ .th-string {
114
+ color: var(--th-string);
115
+ }
116
+ .th-tag {
117
+ color: var(--th-tag);
118
+ }
119
+ .th-type {
120
+ color: var(--th-type);
121
+ }
122
+ .th-variable {
123
+ color: var(--th-variable);
124
+ }
125
+ .th-line {
126
+ display: inline-block;
127
+ min-width: 100%;
128
+ width: max-content;
129
+ }
130
+ .th-code--line-numbers code {
131
+ counter-reset: th-line;
132
+ }
133
+ .th-code--line-numbers .th-line::before {
134
+ display: inline-block;
135
+ width: 2.5em;
136
+ padding-right: 1em;
137
+ color: var(--th-comment);
138
+ content: attr(data-line);
139
+ text-align: right;
140
+ user-select: none;
141
+ }
142
+ }