@wandzai/utils 1.0.74-gen-ai-activations-comparison-11 → 1.0.75-benchmark-classifications-1
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/package.json +1 -1
- package/src/bee-free.d.ts +2 -2
- package/src/bee-free.js +148 -62
- package/src/bee-free.js.map +1 -1
- package/src/common.d.ts +1 -1
package/package.json
CHANGED
package/src/bee-free.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InteractionViewModes } from '@wandzai/wandz-interfaces';
|
|
2
|
-
export declare const extractAllTextFromEntityJson: (json: any, device?: InteractionViewModes | null) =>
|
|
1
|
+
import { InteractionViewModes, PopupDescriptor } from '@wandzai/wandz-interfaces';
|
|
2
|
+
export declare const extractAllTextFromEntityJson: (json: any, device?: InteractionViewModes | null) => PopupDescriptor;
|
|
3
3
|
export declare const STUDIO_SETTINGS_WIDTH_PATH: {
|
|
4
4
|
desktop: string;
|
|
5
5
|
mobile: string;
|
package/src/bee-free.js
CHANGED
|
@@ -5,7 +5,16 @@ const lodash_1 = require("lodash");
|
|
|
5
5
|
const html_entities_1 = require("html-entities");
|
|
6
6
|
const wandz_interfaces_1 = require("@wandzai/wandz-interfaces");
|
|
7
7
|
const extractAllTextFromEntityJson = (json, device = null) => {
|
|
8
|
-
const
|
|
8
|
+
const elements = [];
|
|
9
|
+
const texts = [];
|
|
10
|
+
let index = 0;
|
|
11
|
+
const initialContent = { isButton: false,
|
|
12
|
+
isHeading: false,
|
|
13
|
+
isParagraph: false,
|
|
14
|
+
isImageAlt: false,
|
|
15
|
+
isListItem: false,
|
|
16
|
+
isTableCell: false,
|
|
17
|
+
isRawHtml: false, };
|
|
9
18
|
const stripHtml = (html) => (0, html_entities_1.decode)(html
|
|
10
19
|
.replace(/<style[^>]*>.*?<\/style>/gis, '')
|
|
11
20
|
.replace(/<script[^>]*>.*?<\/script>/gis, '')
|
|
@@ -23,73 +32,150 @@ const extractAllTextFromEntityJson = (json, device = null) => {
|
|
|
23
32
|
return !hideMobile;
|
|
24
33
|
return true;
|
|
25
34
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
const pushElement = (text, style, rowIndex, columnIndex, moduleIndex, totalRows, contentFlags) => {
|
|
36
|
+
texts.push(text);
|
|
37
|
+
elements.push({
|
|
38
|
+
id: `${rowIndex}-${columnIndex}-${moduleIndex}-${index}`,
|
|
39
|
+
text,
|
|
40
|
+
index: index++,
|
|
41
|
+
signals: {
|
|
42
|
+
content: contentFlags,
|
|
43
|
+
typography: {
|
|
44
|
+
fontSizePx: Number(style?.fontSize?.replace('px', '')) || undefined,
|
|
45
|
+
fontWeight: Number(style?.fontWeight) || undefined,
|
|
46
|
+
isItalic: style?.fontStyle === 'italic',
|
|
47
|
+
isUppercase: style?.textTransform === 'uppercase',
|
|
48
|
+
isUnderlined: style?.textDecoration === 'underline',
|
|
49
|
+
},
|
|
50
|
+
color: {
|
|
51
|
+
textColor: style?.color,
|
|
52
|
+
backgroundColor: style?.backgroundColor,
|
|
53
|
+
},
|
|
54
|
+
layout: {
|
|
55
|
+
textAlign: style?.textAlign,
|
|
56
|
+
rowIndex,
|
|
57
|
+
columnIndex,
|
|
58
|
+
moduleIndex,
|
|
59
|
+
verticalRatio: rowIndex / Math.max(totalRows - 1, 1),
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const rows = json.page?.rows ?? [];
|
|
65
|
+
rows.forEach((row, rowIndex) => {
|
|
66
|
+
if (!isVisibleForDevice(row.content?.computedStyle))
|
|
29
67
|
return;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (t)
|
|
48
|
-
values.push(t);
|
|
49
|
-
}
|
|
50
|
-
if (Array.isArray(d.list?.items)) {
|
|
51
|
-
for (const item of d.list.items) {
|
|
52
|
-
if (typeof item?.text === 'string') {
|
|
53
|
-
const t = stripHtml(item.text);
|
|
54
|
-
if (t)
|
|
55
|
-
values.push(t);
|
|
68
|
+
row.columns?.forEach((column, columnIndex) => {
|
|
69
|
+
column.modules?.forEach((module, moduleIndex) => {
|
|
70
|
+
const d = module.descriptor;
|
|
71
|
+
if (!d)
|
|
72
|
+
return;
|
|
73
|
+
if (!isVisibleForDevice(d.computedStyle))
|
|
74
|
+
return;
|
|
75
|
+
const style = d.computedStyle ?? {};
|
|
76
|
+
if (typeof d.heading?.text === 'string' || typeof d.heading?.html === 'string') {
|
|
77
|
+
const raw = d.heading.text ?? d.heading.html;
|
|
78
|
+
const text = stripHtml(raw);
|
|
79
|
+
if (text) {
|
|
80
|
+
pushElement(text, style, rowIndex, columnIndex, moduleIndex, rows.length, {
|
|
81
|
+
...initialContent,
|
|
82
|
+
isHeading: true,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
56
85
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (typeof d.image?.alt === 'string') {
|
|
65
|
-
const t = stripHtml(d.image.alt);
|
|
66
|
-
if (t)
|
|
67
|
-
values.push(t);
|
|
68
|
-
}
|
|
69
|
-
if (d.table?.content?.rows) {
|
|
70
|
-
for (const row of d.table.content.rows) {
|
|
71
|
-
for (const cell of row.cells ?? []) {
|
|
72
|
-
if (typeof cell.html === 'string') {
|
|
73
|
-
const t = stripHtml(cell.html);
|
|
74
|
-
if (t)
|
|
75
|
-
values.push(t);
|
|
86
|
+
if (typeof d.paragraph?.html === 'string') {
|
|
87
|
+
const text = stripHtml(d.paragraph.html);
|
|
88
|
+
if (text) {
|
|
89
|
+
pushElement(text, style, rowIndex, columnIndex, moduleIndex, rows.length, {
|
|
90
|
+
...initialContent,
|
|
91
|
+
isParagraph: true,
|
|
92
|
+
});
|
|
76
93
|
}
|
|
77
94
|
}
|
|
95
|
+
if (typeof d.button?.label === 'string') {
|
|
96
|
+
const text = stripHtml(d.button.label);
|
|
97
|
+
if (text) {
|
|
98
|
+
pushElement(text, style, rowIndex, columnIndex, moduleIndex, rows.length, {
|
|
99
|
+
...initialContent,
|
|
100
|
+
isButton: true,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (Array.isArray(d.list?.items)) {
|
|
105
|
+
for (const item of d.list.items) {
|
|
106
|
+
if (typeof item?.text === 'string') {
|
|
107
|
+
const text = stripHtml(item.text);
|
|
108
|
+
if (text) {
|
|
109
|
+
pushElement(text, style, rowIndex, columnIndex, moduleIndex, rows.length, {
|
|
110
|
+
...initialContent,
|
|
111
|
+
isListItem: true,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (typeof d.html?.html === 'string') {
|
|
118
|
+
const text = stripHtml(d.html.html);
|
|
119
|
+
if (text) {
|
|
120
|
+
pushElement(text, style, rowIndex, columnIndex, moduleIndex, rows.length, {
|
|
121
|
+
...initialContent,
|
|
122
|
+
isRawHtml: true,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (typeof d.image?.alt === 'string') {
|
|
127
|
+
const text = stripHtml(d.image.alt);
|
|
128
|
+
if (text) {
|
|
129
|
+
pushElement(text, style, rowIndex, columnIndex, moduleIndex, rows.length, {
|
|
130
|
+
...initialContent,
|
|
131
|
+
isImageAlt: true,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (d.table?.content?.rows) {
|
|
136
|
+
for (const row of d.table.content.rows) {
|
|
137
|
+
for (const cell of row.cells ?? []) {
|
|
138
|
+
if (typeof cell.html === 'string') {
|
|
139
|
+
const text = stripHtml(cell.html);
|
|
140
|
+
if (text) {
|
|
141
|
+
pushElement(text, style, rowIndex, columnIndex, moduleIndex, rows.length, {
|
|
142
|
+
...initialContent,
|
|
143
|
+
isTableCell: true,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
const fontSizes = elements
|
|
154
|
+
.map(e => e.signals.typography.fontSizePx)
|
|
155
|
+
.filter((v) => typeof v === 'number');
|
|
156
|
+
const stats = {
|
|
157
|
+
elementCount: elements.length,
|
|
158
|
+
headingCount: elements.filter(e => e.signals.content.isHeading).length,
|
|
159
|
+
buttonCount: elements.filter(e => e.signals.content.isButton).length,
|
|
160
|
+
paragraphCount: elements.filter(e => e.signals.content.isParagraph).length,
|
|
161
|
+
alignmentDistribution: elements.reduce((acc, e) => {
|
|
162
|
+
const a = e.signals.layout.textAlign ?? 'unknown';
|
|
163
|
+
acc[a] = (acc[a] || 0) + 1;
|
|
164
|
+
return acc;
|
|
165
|
+
}, {}),
|
|
166
|
+
fontSize: fontSizes.length
|
|
167
|
+
? {
|
|
168
|
+
min: Math.min(...fontSizes),
|
|
169
|
+
max: Math.max(...fontSizes),
|
|
170
|
+
avg: Math.round(fontSizes.reduce((a, b) => a + b, 0) / fontSizes.length),
|
|
78
171
|
}
|
|
79
|
-
|
|
172
|
+
: undefined,
|
|
173
|
+
};
|
|
174
|
+
return {
|
|
175
|
+
elements,
|
|
176
|
+
stats,
|
|
177
|
+
texts
|
|
80
178
|
};
|
|
81
|
-
for (const row of json.page?.rows ?? []) {
|
|
82
|
-
if (!isVisibleForDevice(row.content?.computedStyle))
|
|
83
|
-
continue;
|
|
84
|
-
for (const column of row.columns ?? []) {
|
|
85
|
-
for (const module of column.modules ?? []) {
|
|
86
|
-
if (!isVisibleForDevice(module.descriptor?.computedStyle))
|
|
87
|
-
continue;
|
|
88
|
-
extractTextFromModule(module);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return device == null ? Array.from(new Set(values)) : values;
|
|
93
179
|
};
|
|
94
180
|
exports.extractAllTextFromEntityJson = extractAllTextFromEntityJson;
|
|
95
181
|
exports.STUDIO_SETTINGS_WIDTH_PATH = {
|
package/src/bee-free.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bee-free.js","sourceRoot":"","sources":["../../../../libs/utils/src/bee-free.ts"],"names":[],"mappings":";;;AAAA,mCAA6B;AAC7B,iDAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"bee-free.js","sourceRoot":"","sources":["../../../../libs/utils/src/bee-free.ts"],"names":[],"mappings":";;;AAAA,mCAA6B;AAC7B,iDAAuC;AACvC,gEAKmC;AAE5B,MAAM,4BAA4B,GAAG,CAC1C,IAAS,EACT,SAAsC,IAAI,EACzB,EAAE;IACnB,MAAM,QAAQ,GAAmB,EAAE,CAAC;IACpC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,cAAc,GAAG,EAAE,QAAQ,EAAE,KAAK;QACtC,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,KAAK;QAClB,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,KAAK,GAAE,CAAA;IAEpB,MAAM,SAAS,GAAG,CAAC,IAAY,EAAU,EAAE,CACzC,IAAA,sBAAM,EACJ,IAAI;SACD,OAAO,CAAC,6BAA6B,EAAE,EAAE,CAAC;SAC1C,OAAO,CAAC,+BAA+B,EAAE,EAAE,CAAC;SAC5C,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CACV,CAAC;IAEJ,MAAM,kBAAkB,GAAG,CAAC,KAAU,EAAW,EAAE;Q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AAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAE,CAAC;QAEN,QAAQ,EAAE,SAAS,CAAC,MAAM;YACxB,CAAC,CAAC;gBACA,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;gBAC3B,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;gBAC3B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;aACzE;YACD,CAAC,CAAC,SAAS;KACd,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,KAAK;QACL,KAAK;KACN,CAAC;AACJ,CAAC,CAAC;AA9QW,QAAA,4BAA4B,gCA8QvC;AAEW,QAAA,0BAA0B,GAAG;IACxC,CAAC,uCAAoB,CAAC,OAAO,CAAC,EAAE,8CAA8C;IAC9E,CAAC,uCAAoB,CAAC,MAAM,CAAC,EAAE,oDAAoD;CACpF,CAAC;AAEK,MAAM,yBAAyB,GAAG,CAAC,IAAS,EAA4B,IAA0B,EAAE,EAAE;IAC3G,MAAM,YAAY,GAAG,IAAA,YAAG,EAAC,IAAI,EAAE,kCAA0B,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,OAAO,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,0CAAuB,CAAC,IAAI,CAAC;AAC9F,CAAC,CAAC;AAHW,QAAA,yBAAyB,6BAGpC"}
|
package/src/common.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const upperCaseFirstCharOfEachWord: (str: string) => string;
|
|
|
12
12
|
export declare const upperCaseFirstCharOfEachWordSplitBySpace: (str: string) => string;
|
|
13
13
|
export declare const jsonToConsistentString: (jsonObj: any) => string;
|
|
14
14
|
export declare const booleanStringToBoolean: (value: string) => value is "true";
|
|
15
|
-
export declare const booleanStringToNumber: (value: string) =>
|
|
15
|
+
export declare const booleanStringToNumber: (value: string) => 0 | 1;
|
|
16
16
|
export declare const normalizeSfResponseObjKeys: (obj: Record<string, any>) => {
|
|
17
17
|
[k: string]: any;
|
|
18
18
|
};
|