@dust-tt/sparkle 0.5.3 → 0.5.4

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.
@@ -41,12 +41,12 @@ declare const animation: {
41
41
  to: number[];
42
42
  ti: number[];
43
43
  } | {
44
- i?: undefined;
45
- o?: undefined;
46
44
  to?: undefined;
47
45
  ti?: undefined;
48
46
  t: number;
49
47
  s: number[];
48
+ i?: undefined;
49
+ o?: undefined;
50
50
  })[];
51
51
  ix: number;
52
52
  l: number;
@@ -68,19 +68,6 @@ declare const animation: {
68
68
  shapes: {
69
69
  ty: string;
70
70
  it: ({
71
- o?: undefined;
72
- c?: undefined;
73
- bm?: undefined;
74
- p?: undefined;
75
- a?: undefined;
76
- s?: undefined;
77
- sk?: undefined;
78
- sa?: undefined;
79
- r?: undefined;
80
- w?: undefined;
81
- lc?: undefined;
82
- lj?: undefined;
83
- ml?: undefined;
84
71
  ind: number;
85
72
  ty: string;
86
73
  ix: number;
@@ -103,8 +90,6 @@ declare const animation: {
103
90
  c: boolean;
104
91
  }[];
105
92
  } | {
106
- i?: undefined;
107
- o?: undefined;
108
93
  t: number;
109
94
  s: {
110
95
  i: number[][];
@@ -112,22 +97,28 @@ declare const animation: {
112
97
  v: number[][];
113
98
  c: boolean;
114
99
  }[];
100
+ i?: undefined;
101
+ o?: undefined;
115
102
  })[];
116
103
  ix: number;
117
104
  };
118
105
  nm: string;
119
106
  mn: string;
120
107
  hd: boolean;
121
- } | {
108
+ o?: undefined;
109
+ c?: undefined;
110
+ w?: undefined;
111
+ lc?: undefined;
112
+ lj?: undefined;
113
+ ml?: undefined;
114
+ bm?: undefined;
122
115
  p?: undefined;
123
116
  a?: undefined;
124
117
  s?: undefined;
118
+ r?: undefined;
125
119
  sk?: undefined;
126
120
  sa?: undefined;
127
- ix?: undefined;
128
- r?: undefined;
129
- ind?: undefined;
130
- ks?: undefined;
121
+ } | {
131
122
  ty: string;
132
123
  c: {
133
124
  a: number;
@@ -151,19 +142,16 @@ declare const animation: {
151
142
  nm: string;
152
143
  mn: string;
153
144
  hd: boolean;
154
- } | {
145
+ ind?: undefined;
146
+ ix?: undefined;
147
+ ks?: undefined;
155
148
  p?: undefined;
156
149
  a?: undefined;
157
150
  s?: undefined;
151
+ r?: undefined;
158
152
  sk?: undefined;
159
153
  sa?: undefined;
160
- ix?: undefined;
161
- ind?: undefined;
162
- ks?: undefined;
163
- w?: undefined;
164
- lc?: undefined;
165
- lj?: undefined;
166
- ml?: undefined;
154
+ } | {
167
155
  ty: string;
168
156
  c: {
169
157
  a: number;
@@ -184,10 +172,10 @@ declare const animation: {
184
172
  t: number;
185
173
  s: number[];
186
174
  } | {
187
- i?: undefined;
188
- o?: undefined;
189
175
  t: number;
190
176
  s: number[];
177
+ i?: undefined;
178
+ o?: undefined;
191
179
  })[];
192
180
  ix: number;
193
181
  };
@@ -196,18 +184,19 @@ declare const animation: {
196
184
  nm: string;
197
185
  mn: string;
198
186
  hd: boolean;
199
- } | {
200
- c?: undefined;
201
- bm?: undefined;
202
- mn?: undefined;
203
- hd?: undefined;
204
- ix?: undefined;
205
187
  ind?: undefined;
188
+ ix?: undefined;
206
189
  ks?: undefined;
207
190
  w?: undefined;
208
191
  lc?: undefined;
209
192
  lj?: undefined;
210
193
  ml?: undefined;
194
+ p?: undefined;
195
+ a?: undefined;
196
+ s?: undefined;
197
+ sk?: undefined;
198
+ sa?: undefined;
199
+ } | {
211
200
  ty: string;
212
201
  p: {
213
202
  a: number;
@@ -245,6 +234,17 @@ declare const animation: {
245
234
  ix: number;
246
235
  };
247
236
  nm: string;
237
+ ind?: undefined;
238
+ ix?: undefined;
239
+ ks?: undefined;
240
+ c?: undefined;
241
+ w?: undefined;
242
+ lc?: undefined;
243
+ lj?: undefined;
244
+ ml?: undefined;
245
+ bm?: undefined;
246
+ mn?: undefined;
247
+ hd?: undefined;
248
248
  })[];
249
249
  nm: string;
250
250
  np: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dust-tt/sparkle",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "scripts": {
5
5
  "build": "rm -rf dist && npm run tailwind && npm run build:esm && npm run build:cjs",
6
6
  "tailwind": "tailwindcss -i ./src/styles/tailwind.css -o dist/sparkle.css",
@@ -25,7 +25,6 @@ import {
25
25
  TableHeaderBlock,
26
26
  } from "@sparkle/components/markdown/TableBlock";
27
27
  import {
28
- preprocessDollarSigns,
29
28
  preserveLineBreaks,
30
29
  sanitizeContent,
31
30
  } from "@sparkle/components/markdown/utils";
@@ -83,7 +82,7 @@ export function Markdown({
83
82
  if (compactSpacing) {
84
83
  sanitized = preserveLineBreaks(sanitized);
85
84
  }
86
- return preprocessDollarSigns(sanitized);
85
+ return sanitized;
87
86
  }, [content, compactSpacing]);
88
87
 
89
88
  // Note on re-renderings. A lot of effort has been put into preventing rerendering across markdown
@@ -233,7 +232,7 @@ export function Markdown({
233
232
  () => [
234
233
  remarkDirective,
235
234
  remarkGfm,
236
- [remarkMath, { singleDollarTextMath: true }],
235
+ [remarkMath, { singleDollarTextMath: false }],
237
236
  ...(additionalMarkdownPlugins || []),
238
237
  showUnsupportedDirective,
239
238
  ],
@@ -54,6 +54,8 @@ export function preserveLineBreaks(content: string): string {
54
54
  * Preprocesses content to escape dollar signs that are likely NOT inlione LaTeX math. This helps
55
55
  * prevent false positives when enabling single $ math rendering.
56
56
  *
57
+ * Currrently not used as this was causing issues. See https://github.com/dust-tt/tasks/issues/5739
58
+ *
57
59
  * Patterns that are escaped:
58
60
  * 1. Solo dollar signs: `$` (not part of a pair)
59
61
  * 1. Currency amounts: $100, $5.99, $1,000, $50k, $2.5M, $1 billion