cx 24.11.2 → 24.11.3

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/dist/data.js CHANGED
@@ -293,18 +293,17 @@ function expression(str) {
293
293
  var c = str[i];
294
294
  switch (c) {
295
295
  case "{":
296
- if (curlyBrackets > 0) curlyBrackets++;
297
- else {
298
- if (!quote && termStart < 0 && (str[i + 1] != "{" || str[i - 1] == "%")) {
299
- termStart = i + 1;
300
- curlyBrackets = 1;
301
- percentExpression = str[i - 1] == "%";
302
- if (percentExpression) fb.pop(); //%
303
- } else if (str[i - 1] != "{") fb.push(c);
304
- }
296
+ if (curlyBrackets > 0 && !quote) curlyBrackets++;
297
+ else if (!quote && termStart < 0 && (str[i + 1] != "{" || str[i - 1] == "%")) {
298
+ termStart = i + 1;
299
+ curlyBrackets = 1;
300
+ percentExpression = str[i - 1] == "%";
301
+ if (percentExpression) fb.pop(); //%
302
+ } else if (termStart < 0 && (quote || str[i - 1] != "{")) fb.push(c);
305
303
  break;
306
304
  case "}":
307
305
  if (termStart >= 0) {
306
+ if (quote) continue;
308
307
  if (--curlyBrackets == 0) {
309
308
  var term = str.substring(termStart, i);
310
309
  var formatStart = 0;
@@ -336,11 +335,9 @@ function expression(str) {
336
335
  break;
337
336
  case '"':
338
337
  case "'":
339
- if (curlyBrackets == 0) {
340
- if (!quote) quote = c;
341
- else if (str[i - 1] != "\\" && quote == c) quote = false;
342
- fb.push(c);
343
- }
338
+ if (!quote) quote = c;
339
+ else if (str[i - 1] != "\\" && quote == c) quote = false;
340
+ if (curlyBrackets == 0) fb.push(c);
344
341
  break;
345
342
  default:
346
343
  if (termStart < 0) fb.push(c);
@@ -361,8 +358,8 @@ function expression(str) {
361
358
  formats.map(function (f, i) {
362
359
  return "fmt" + i;
363
360
  }),
364
- keys,
365
361
  helperNames,
362
+ keys,
366
363
  [body],
367
364
  ),
368
365
  )).bind.apply(_Function, [Format, Format.value].concat(formats, helperValues));
package/dist/hooks.js CHANGED
@@ -91,7 +91,7 @@ function useState(defaultValue) {
91
91
  });
92
92
  }
93
93
 
94
- function createLoacalStorageRef(key) {
94
+ function createLocalStorageRef(key) {
95
95
  var store = useStore();
96
96
  return new Ref({
97
97
  get: function get() {
@@ -132,7 +132,7 @@ function invokeCallback(instance, callback) {
132
132
 
133
133
  export {
134
134
  addExploreCallback,
135
- createLoacalStorageRef,
135
+ createLocalStorageRef,
136
136
  invokeCallback,
137
137
  ref,
138
138
  resolveCallback,