@yaoxiu/marketing-dsl 2.1.0 → 2.1.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/dist/{chunk-7TWWOK7Q.js → chunk-DTHKC5AL.js} +3 -1
- package/dist/docs/index.cjs +6 -0
- package/dist/docs/index.js +7 -1
- package/dist/index.cjs +11 -3
- package/dist/index.js +10 -4
- package/package.json +1 -1
|
@@ -618,9 +618,11 @@ function validateUserFields(dsl, allowed) {
|
|
|
618
618
|
names.forEach((name) => {
|
|
619
619
|
if (allowed.indexOf(name) > -1) return;
|
|
620
620
|
const guess = closestField(name, allowed);
|
|
621
|
+
const tail = guess ? `\uFF0C\u662F\u4E0D\u662F\u60F3\u5199 "user.${guess}"\uFF1F` : "\u3002";
|
|
621
622
|
issues.push({
|
|
622
623
|
path,
|
|
623
|
-
|
|
624
|
+
// 猜中候选时用问号收句,猜不中才补句号 —— 两个都加会写出「?。」这种重复标点
|
|
625
|
+
message: `\u7528\u6237\u4FE1\u606F\u91CC\u6CA1\u6709 "user.${name}" \u8FD9\u4E2A\u5B57\u6BB5${tail}\u53EF\u7528\u5B57\u6BB5\uFF1A${allowed.join(" / ")}`
|
|
624
626
|
});
|
|
625
627
|
});
|
|
626
628
|
return;
|
package/dist/docs/index.cjs
CHANGED
|
@@ -1488,6 +1488,12 @@ var sections_default = sections9;
|
|
|
1488
1488
|
|
|
1489
1489
|
// src/docs/meta.ts
|
|
1490
1490
|
var changelog = [
|
|
1491
|
+
{
|
|
1492
|
+
date: "2026-08-24",
|
|
1493
|
+
items: [
|
|
1494
|
+
"\u3010\u4FEE\u590D\u3011\u5173\u95ED\u6309\u94AE\u4E0A\u914D\u7684\u57CB\u70B9\uFF08sequence: [track, close]\uFF09\u4E4B\u524D\u4F1A\u4E22\u5931\u3001\u8FD8\u4F1A\u4E32\u5230\u4E0B\u4E00\u6B21\u5173\u95ED\u7684\u4E0A\u62A5\u91CC \u2014\u2014 \u89E3\u91CA\u5668\u6D3E\u53D1 close \u4E8B\u4EF6\u65F6\u6162\u4E86\u4E00\u62CD\uFF0C\u5BBF\u4E3B\u8BFB\u4E0D\u5230\u57CB\u70B9\u540D\u3002\u73B0\u5DF2\u4FEE\u6B63\u987A\u5E8F\uFF0C\u8FD0\u8425\u7684\u914D\u7F6E\u5199\u6CD5\u4E0D\u7528\u6539"
|
|
1495
|
+
]
|
|
1496
|
+
},
|
|
1491
1497
|
{
|
|
1492
1498
|
date: "2026-08-22",
|
|
1493
1499
|
items: [
|
package/dist/docs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TRACK_EVENT_PATTERN, DEFAULT_USER_FIELDS, USER_FIELD_LABELS, DSL_VERSION, ACTION_TYPES, NODE_TYPES, ALLOWED_STYLE_KEYS, CLOSE_POSITIONS } from '../chunk-
|
|
1
|
+
import { TRACK_EVENT_PATTERN, DEFAULT_USER_FIELDS, USER_FIELD_LABELS, DSL_VERSION, ACTION_TYPES, NODE_TYPES, ALLOWED_STYLE_KEYS, CLOSE_POSITIONS } from '../chunk-DTHKC5AL.js';
|
|
2
2
|
|
|
3
3
|
// src/docs/reconcile.ts
|
|
4
4
|
function pickTokens(rows, columnIndex) {
|
|
@@ -1363,6 +1363,12 @@ var sections_default = sections9;
|
|
|
1363
1363
|
|
|
1364
1364
|
// src/docs/meta.ts
|
|
1365
1365
|
var changelog = [
|
|
1366
|
+
{
|
|
1367
|
+
date: "2026-08-24",
|
|
1368
|
+
items: [
|
|
1369
|
+
"\u3010\u4FEE\u590D\u3011\u5173\u95ED\u6309\u94AE\u4E0A\u914D\u7684\u57CB\u70B9\uFF08sequence: [track, close]\uFF09\u4E4B\u524D\u4F1A\u4E22\u5931\u3001\u8FD8\u4F1A\u4E32\u5230\u4E0B\u4E00\u6B21\u5173\u95ED\u7684\u4E0A\u62A5\u91CC \u2014\u2014 \u89E3\u91CA\u5668\u6D3E\u53D1 close \u4E8B\u4EF6\u65F6\u6162\u4E86\u4E00\u62CD\uFF0C\u5BBF\u4E3B\u8BFB\u4E0D\u5230\u57CB\u70B9\u540D\u3002\u73B0\u5DF2\u4FEE\u6B63\u987A\u5E8F\uFF0C\u8FD0\u8425\u7684\u914D\u7F6E\u5199\u6CD5\u4E0D\u7528\u6539"
|
|
1370
|
+
]
|
|
1371
|
+
},
|
|
1366
1372
|
{
|
|
1367
1373
|
date: "2026-08-22",
|
|
1368
1374
|
items: [
|
package/dist/index.cjs
CHANGED
|
@@ -1172,6 +1172,12 @@ function createRuntime(dsl, options = {}) {
|
|
|
1172
1172
|
notify();
|
|
1173
1173
|
fireLifecycle(name, "onShow");
|
|
1174
1174
|
}
|
|
1175
|
+
function emitClose(why) {
|
|
1176
|
+
Promise.resolve().then(() => {
|
|
1177
|
+
if (destroyed) return;
|
|
1178
|
+
emit("close", { reason: why });
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1175
1181
|
function closeTop(reason) {
|
|
1176
1182
|
const why = reason || "action";
|
|
1177
1183
|
if (viewStack.length > 1) {
|
|
@@ -1188,12 +1194,12 @@ function createRuntime(dsl, options = {}) {
|
|
|
1188
1194
|
return;
|
|
1189
1195
|
}
|
|
1190
1196
|
fireLifecycle(viewStack[0], "onClose", { closeReason: why });
|
|
1191
|
-
|
|
1197
|
+
emitClose(why);
|
|
1192
1198
|
}
|
|
1193
1199
|
function closeAll(reason) {
|
|
1194
1200
|
const why = reason || "action";
|
|
1195
1201
|
viewStack.slice().reverse().forEach((name) => fireLifecycle(name, "onClose", { closeReason: why }));
|
|
1196
|
-
|
|
1202
|
+
emitClose(why);
|
|
1197
1203
|
}
|
|
1198
1204
|
const dispatch = createDispatcher({
|
|
1199
1205
|
setState,
|
|
@@ -1387,9 +1393,11 @@ function validateUserFields(dsl, allowed) {
|
|
|
1387
1393
|
names.forEach((name) => {
|
|
1388
1394
|
if (allowed.indexOf(name) > -1) return;
|
|
1389
1395
|
const guess = closestField(name, allowed);
|
|
1396
|
+
const tail = guess ? `\uFF0C\u662F\u4E0D\u662F\u60F3\u5199 "user.${guess}"\uFF1F` : "\u3002";
|
|
1390
1397
|
issues.push({
|
|
1391
1398
|
path,
|
|
1392
|
-
|
|
1399
|
+
// 猜中候选时用问号收句,猜不中才补句号 —— 两个都加会写出「?。」这种重复标点
|
|
1400
|
+
message: `\u7528\u6237\u4FE1\u606F\u91CC\u6CA1\u6709 "user.${name}" \u8FD9\u4E2A\u5B57\u6BB5${tail}\u53EF\u7528\u5B57\u6BB5\uFF1A${allowed.join(" / ")}`
|
|
1393
1401
|
});
|
|
1394
1402
|
});
|
|
1395
1403
|
return;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { normalizeViews, createTicker, evaluate, resolveNodeStyle, interpolateDeep, interpolate, toLength, toCssStyle, parseEndTime, computeParts, formatParts } from './chunk-
|
|
2
|
-
export { ACTION_TYPES, ALLOWED_STYLE_KEYS, BANNER_MIN_ASPECT_RATIO, CLOSE_POSITIONS, DEFAULT_USER_FIELDS, DSL_VERSION, NODE_TYPES, SINGLE_VIEW_NAME, TRACK_EVENT_PATTERN, USER_FIELD_LABELS, check, computeParts, evaluate, formatIssues, formatParts, interpolate, interpolateDeep, isLength, isValidEndTime, normalizeViews, parseEndTime, toCssStyle, toLength, validate, validateUserFields } from './chunk-
|
|
1
|
+
import { normalizeViews, createTicker, evaluate, resolveNodeStyle, interpolateDeep, interpolate, toLength, toCssStyle, parseEndTime, computeParts, formatParts } from './chunk-DTHKC5AL.js';
|
|
2
|
+
export { ACTION_TYPES, ALLOWED_STYLE_KEYS, BANNER_MIN_ASPECT_RATIO, CLOSE_POSITIONS, DEFAULT_USER_FIELDS, DSL_VERSION, NODE_TYPES, SINGLE_VIEW_NAME, TRACK_EVENT_PATTERN, USER_FIELD_LABELS, check, computeParts, evaluate, formatIssues, formatParts, interpolate, interpolateDeep, isLength, isValidEndTime, normalizeViews, parseEndTime, toCssStyle, toLength, validate, validateUserFields } from './chunk-DTHKC5AL.js';
|
|
3
3
|
|
|
4
4
|
// src/url.ts
|
|
5
5
|
var SAFE_PROTOCOLS = ["http:", "https:", "mailto:", "tel:"];
|
|
@@ -644,6 +644,12 @@ function createRuntime(dsl, options = {}) {
|
|
|
644
644
|
notify();
|
|
645
645
|
fireLifecycle(name, "onShow");
|
|
646
646
|
}
|
|
647
|
+
function emitClose(why) {
|
|
648
|
+
Promise.resolve().then(() => {
|
|
649
|
+
if (destroyed) return;
|
|
650
|
+
emit("close", { reason: why });
|
|
651
|
+
});
|
|
652
|
+
}
|
|
647
653
|
function closeTop(reason) {
|
|
648
654
|
const why = reason || "action";
|
|
649
655
|
if (viewStack.length > 1) {
|
|
@@ -660,12 +666,12 @@ function createRuntime(dsl, options = {}) {
|
|
|
660
666
|
return;
|
|
661
667
|
}
|
|
662
668
|
fireLifecycle(viewStack[0], "onClose", { closeReason: why });
|
|
663
|
-
|
|
669
|
+
emitClose(why);
|
|
664
670
|
}
|
|
665
671
|
function closeAll(reason) {
|
|
666
672
|
const why = reason || "action";
|
|
667
673
|
viewStack.slice().reverse().forEach((name) => fireLifecycle(name, "onClose", { closeReason: why }));
|
|
668
|
-
|
|
674
|
+
emitClose(why);
|
|
669
675
|
}
|
|
670
676
|
const dispatch = createDispatcher({
|
|
671
677
|
setState,
|