langgraph-ui-components 0.0.17 → 0.0.18
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/index.es100.js +20 -354
- package/dist/index.es100.js.map +1 -1
- package/dist/index.es101.js +172 -127
- package/dist/index.es101.js.map +1 -1
- package/dist/index.es102.js +231 -60
- package/dist/index.es102.js.map +1 -1
- package/dist/index.es103.js +352 -34
- package/dist/index.es103.js.map +1 -1
- package/dist/index.es104.js +134 -34
- package/dist/index.es104.js.map +1 -1
- package/dist/index.es105.js +65 -161
- package/dist/index.es105.js.map +1 -1
- package/dist/index.es106.js +30 -196
- package/dist/index.es106.js.map +1 -1
- package/dist/index.es107.js +36 -13
- package/dist/index.es107.js.map +1 -1
- package/dist/index.es108.js +162 -26
- package/dist/index.es108.js.map +1 -1
- package/dist/index.es109.js +196 -27
- package/dist/index.es109.js.map +1 -1
- package/dist/index.es110.js +13 -3156
- package/dist/index.es110.js.map +1 -1
- package/dist/index.es111.js +27 -34
- package/dist/index.es111.js.map +1 -1
- package/dist/index.es112.js +34 -5
- package/dist/index.es112.js.map +1 -1
- package/dist/index.es113.js +3145 -61
- package/dist/index.es113.js.map +1 -1
- package/dist/index.es114.js +33 -33
- package/dist/index.es114.js.map +1 -1
- package/dist/index.es115.js +5 -21
- package/dist/index.es115.js.map +1 -1
- package/dist/index.es116.js +69 -64
- package/dist/index.es116.js.map +1 -1
- package/dist/index.es117.js +37 -3
- package/dist/index.es117.js.map +1 -1
- package/dist/index.es12.js +1 -1
- package/dist/index.es121.js +9 -9
- package/dist/index.es122.js +1 -1
- package/dist/index.es126.js +1 -1
- package/dist/index.es128.js +2 -2
- package/dist/index.es13.js +9 -3
- package/dist/index.es13.js.map +1 -1
- package/dist/index.es136.js +1 -1
- package/dist/index.es137.js +6 -6
- package/dist/index.es139.js +1 -1
- package/dist/index.es14.js +6 -6
- package/dist/index.es140.js +1 -1
- package/dist/index.es143.js +1 -1
- package/dist/index.es144.js +1 -1
- package/dist/index.es145.js +1 -1
- package/dist/index.es146.js +1 -1
- package/dist/index.es147.js +1 -1
- package/dist/index.es148.js +1 -1
- package/dist/index.es149.js +1 -1
- package/dist/index.es150.js +1 -1
- package/dist/index.es151.js +1 -1
- package/dist/index.es152.js +1 -1
- package/dist/index.es153.js +1 -1
- package/dist/index.es154.js +1 -1
- package/dist/index.es155.js +1 -1
- package/dist/index.es156.js +1 -1
- package/dist/index.es157.js +1 -1
- package/dist/index.es158.js +1 -1
- package/dist/index.es159.js +1 -1
- package/dist/index.es16.js +10 -5
- package/dist/index.es16.js.map +1 -1
- package/dist/index.es160.js +1 -1
- package/dist/index.es161.js +1 -1
- package/dist/index.es162.js +1 -1
- package/dist/index.es163.js +1 -1
- package/dist/index.es164.js +1 -1
- package/dist/index.es165.js +1 -1
- package/dist/index.es166.js +1 -1
- package/dist/index.es167.js +1 -1
- package/dist/index.es168.js +1 -1
- package/dist/index.es169.js +1 -1
- package/dist/index.es170.js +1 -1
- package/dist/index.es171.js +1 -1
- package/dist/index.es172.js +1 -1
- package/dist/index.es173.js +1 -1
- package/dist/index.es174.js +1 -1
- package/dist/index.es175.js +1 -1
- package/dist/index.es176.js +1 -1
- package/dist/index.es177.js +1 -1
- package/dist/index.es178.js +1 -1
- package/dist/index.es179.js +1 -1
- package/dist/index.es18.js +7 -7
- package/dist/index.es180.js +1 -1
- package/dist/index.es181.js +1 -1
- package/dist/index.es182.js +1 -1
- package/dist/index.es183.js +1 -1
- package/dist/index.es184.js +1 -1
- package/dist/index.es185.js +1 -1
- package/dist/index.es186.js +1 -1
- package/dist/index.es187.js +1 -1
- package/dist/index.es191.js +2 -56
- package/dist/index.es191.js.map +1 -1
- package/dist/index.es192.js +2 -100
- package/dist/index.es192.js.map +1 -1
- package/dist/index.es193.js +2 -191
- package/dist/index.es193.js.map +1 -1
- package/dist/index.es194.js +2 -110
- package/dist/index.es194.js.map +1 -1
- package/dist/index.es195.js +2 -35
- package/dist/index.es195.js.map +1 -1
- package/dist/index.es196.js +2 -10
- package/dist/index.es196.js.map +1 -1
- package/dist/index.es197.js +2 -11
- package/dist/index.es197.js.map +1 -1
- package/dist/index.es198.js +2 -12
- package/dist/index.es198.js.map +1 -1
- package/dist/index.es199.js +2 -91
- package/dist/index.es199.js.map +1 -1
- package/dist/index.es2.js +96 -11
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es20.js +2 -2
- package/dist/index.es200.js +2 -275
- package/dist/index.es200.js.map +1 -1
- package/dist/index.es201.js +2 -2
- package/dist/index.es202.js +2 -164
- package/dist/index.es202.js.map +1 -1
- package/dist/index.es203.js +2 -51
- package/dist/index.es203.js.map +1 -1
- package/dist/index.es204.js +2 -40
- package/dist/index.es204.js.map +1 -1
- package/dist/index.es205.js +2 -35
- package/dist/index.es205.js.map +1 -1
- package/dist/index.es206.js +2 -40
- package/dist/index.es206.js.map +1 -1
- package/dist/index.es207.js +2 -24
- package/dist/index.es207.js.map +1 -1
- package/dist/index.es208.js +2 -591
- package/dist/index.es208.js.map +1 -1
- package/dist/index.es209.js +2 -125
- package/dist/index.es209.js.map +1 -1
- package/dist/index.es210.js +2 -164
- package/dist/index.es210.js.map +1 -1
- package/dist/index.es211.js +2 -2
- package/dist/index.es212.js +2 -2
- package/dist/index.es213.js +2 -2
- package/dist/index.es214.js +2 -2
- package/dist/index.es215.js +2 -2
- package/dist/index.es216.js +2 -2
- package/dist/index.es217.js +2 -2
- package/dist/index.es218.js +2 -2
- package/dist/index.es219.js +2 -2
- package/dist/index.es22.js +35 -119
- package/dist/index.es22.js.map +1 -1
- package/dist/index.es220.js +2 -2
- package/dist/index.es221.js +2 -2
- package/dist/index.es222.js +2 -2
- package/dist/index.es223.js +2 -2
- package/dist/index.es224.js +2 -2
- package/dist/index.es225.js +2 -2
- package/dist/index.es226.js +2 -2
- package/dist/index.es227.js +2 -2
- package/dist/index.es228.js +2 -2
- package/dist/index.es229.js +2 -2
- package/dist/index.es23.js +66 -36
- package/dist/index.es23.js.map +1 -1
- package/dist/index.es230.js +2 -2
- package/dist/index.es231.js +2 -2
- package/dist/index.es232.js +2 -2
- package/dist/index.es233.js +2 -2
- package/dist/index.es234.js +2 -2
- package/dist/index.es235.js +2 -2
- package/dist/index.es236.js +56 -2
- package/dist/index.es236.js.map +1 -1
- package/dist/index.es237.js +100 -2
- package/dist/index.es237.js.map +1 -1
- package/dist/index.es238.js +191 -2
- package/dist/index.es238.js.map +1 -1
- package/dist/index.es239.js +110 -2
- package/dist/index.es239.js.map +1 -1
- package/dist/index.es24.js +30 -64
- package/dist/index.es24.js.map +1 -1
- package/dist/index.es240.js +35 -2
- package/dist/index.es240.js.map +1 -1
- package/dist/index.es241.js +10 -2
- package/dist/index.es241.js.map +1 -1
- package/dist/index.es242.js +11 -2
- package/dist/index.es242.js.map +1 -1
- package/dist/index.es243.js +12 -2
- package/dist/index.es243.js.map +1 -1
- package/dist/index.es244.js +91 -2
- package/dist/index.es244.js.map +1 -1
- package/dist/index.es245.js +275 -2
- package/dist/index.es245.js.map +1 -1
- package/dist/index.es246.js +2 -2
- package/dist/index.es247.js +164 -2
- package/dist/index.es247.js.map +1 -1
- package/dist/index.es248.js +51 -2
- package/dist/index.es248.js.map +1 -1
- package/dist/index.es249.js +40 -2
- package/dist/index.es249.js.map +1 -1
- package/dist/index.es25.js +120 -29
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es250.js +35 -2
- package/dist/index.es250.js.map +1 -1
- package/dist/index.es251.js +40 -2
- package/dist/index.es251.js.map +1 -1
- package/dist/index.es252.js +24 -2
- package/dist/index.es252.js.map +1 -1
- package/dist/index.es253.js +591 -2
- package/dist/index.es253.js.map +1 -1
- package/dist/index.es254.js +125 -2
- package/dist/index.es254.js.map +1 -1
- package/dist/index.es255.js +164 -2
- package/dist/index.es255.js.map +1 -1
- package/dist/index.es256.js +2 -2
- package/dist/index.es26.js +102 -123
- package/dist/index.es26.js.map +1 -1
- package/dist/index.es267.js +1 -1
- package/dist/index.es27.js +66 -101
- package/dist/index.es27.js.map +1 -1
- package/dist/index.es28.js +139 -66
- package/dist/index.es28.js.map +1 -1
- package/dist/index.es29.js +295 -131
- package/dist/index.es29.js.map +1 -1
- package/dist/index.es30.js +114 -298
- package/dist/index.es30.js.map +1 -1
- package/dist/index.es305.js +1 -1
- package/dist/index.es307.js +1 -1
- package/dist/index.es319.js +1 -1
- package/dist/index.es32.js +7 -7
- package/dist/index.es33.js +1 -1
- package/dist/index.es339.js +2 -2
- package/dist/index.es36.js +4 -4
- package/dist/index.es37.js +289 -114
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es38.js +44 -70
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es39.js +145 -19
- package/dist/index.es39.js.map +1 -1
- package/dist/index.es40.js +5 -261
- package/dist/index.es40.js.map +1 -1
- package/dist/index.es41.js +247 -38
- package/dist/index.es41.js.map +1 -1
- package/dist/index.es42.js +110 -207
- package/dist/index.es42.js.map +1 -1
- package/dist/index.es43.js +68 -64
- package/dist/index.es43.js.map +1 -1
- package/dist/index.es44.js +17 -141
- package/dist/index.es44.js.map +1 -1
- package/dist/index.es45.js +251 -14
- package/dist/index.es45.js.map +1 -1
- package/dist/index.es46.js +36 -223
- package/dist/index.es46.js.map +1 -1
- package/dist/index.es47.js +213 -7
- package/dist/index.es47.js.map +1 -1
- package/dist/index.es48.js +55 -1180
- package/dist/index.es48.js.map +1 -1
- package/dist/index.es49.js +141 -6
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es50.js +21 -144
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +230 -5
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +8 -292
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +1190 -43
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es54.js +7 -144
- package/dist/index.es54.js.map +1 -1
- package/dist/index.es55.js +136 -241
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es59.js +1 -1
- package/dist/index.es6.js +21 -8
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es60.js +1 -1
- package/dist/index.es61.js +1 -1
- package/dist/index.es62.js +7 -7
- package/dist/index.es67.js +3 -3
- package/dist/index.es69.js +2 -2
- package/dist/index.es70.js +1 -1
- package/dist/index.es71.js +1 -1
- package/dist/index.es72.js +1 -1
- package/dist/index.es77.js +7 -7
- package/dist/index.es78.js +17 -17
- package/dist/index.es82.js +1 -1
- package/dist/index.es83.js +4 -4
- package/dist/index.es84.js +20 -11
- package/dist/index.es84.js.map +1 -1
- package/dist/index.es85.js +66 -38
- package/dist/index.es85.js.map +1 -1
- package/dist/index.es86.js +3 -34
- package/dist/index.es86.js.map +1 -1
- package/dist/index.es87.js +10 -230
- package/dist/index.es87.js.map +1 -1
- package/dist/index.es88.js +39 -29
- package/dist/index.es88.js.map +1 -1
- package/dist/index.es89.js +32 -73
- package/dist/index.es89.js.map +1 -1
- package/dist/index.es90.js +200 -44
- package/dist/index.es90.js.map +1 -1
- package/dist/index.es91.js +15 -37
- package/dist/index.es91.js.map +1 -1
- package/dist/index.es92.js +71 -26
- package/dist/index.es92.js.map +1 -1
- package/dist/index.es93.js +72 -39
- package/dist/index.es93.js.map +1 -1
- package/dist/index.es94.js +48 -53
- package/dist/index.es94.js.map +1 -1
- package/dist/index.es95.js +30 -13
- package/dist/index.es95.js.map +1 -1
- package/dist/index.es96.js +40 -134
- package/dist/index.es96.js.map +1 -1
- package/dist/index.es97.js +56 -20
- package/dist/index.es97.js.map +1 -1
- package/dist/index.es98.js +11 -180
- package/dist/index.es98.js.map +1 -1
- package/dist/index.es99.js +129 -233
- package/dist/index.es99.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.es209.js
CHANGED
|
@@ -1,128 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const schemaArrayKeyword = {
|
|
3
|
-
prefixItems: true,
|
|
4
|
-
items: true,
|
|
5
|
-
allOf: true,
|
|
6
|
-
anyOf: true,
|
|
7
|
-
oneOf: true
|
|
8
|
-
};
|
|
9
|
-
const schemaMapKeyword = {
|
|
10
|
-
$defs: true,
|
|
11
|
-
definitions: true,
|
|
12
|
-
properties: true,
|
|
13
|
-
patternProperties: true,
|
|
14
|
-
dependentSchemas: true
|
|
15
|
-
};
|
|
16
|
-
const ignoredKeyword = {
|
|
17
|
-
id: true,
|
|
18
|
-
$id: true,
|
|
19
|
-
$ref: true,
|
|
20
|
-
$schema: true,
|
|
21
|
-
$anchor: true,
|
|
22
|
-
$vocabulary: true,
|
|
23
|
-
$comment: true,
|
|
24
|
-
default: true,
|
|
25
|
-
enum: true,
|
|
26
|
-
const: true,
|
|
27
|
-
required: true,
|
|
28
|
-
type: true,
|
|
29
|
-
maximum: true,
|
|
30
|
-
minimum: true,
|
|
31
|
-
exclusiveMaximum: true,
|
|
32
|
-
exclusiveMinimum: true,
|
|
33
|
-
multipleOf: true,
|
|
34
|
-
maxLength: true,
|
|
35
|
-
minLength: true,
|
|
36
|
-
pattern: true,
|
|
37
|
-
format: true,
|
|
38
|
-
maxItems: true,
|
|
39
|
-
minItems: true,
|
|
40
|
-
uniqueItems: true,
|
|
41
|
-
maxProperties: true,
|
|
42
|
-
minProperties: true
|
|
43
|
-
};
|
|
44
|
-
let initialBaseURI = typeof self !== "undefined" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker");
|
|
45
|
-
function dereference(schema, lookup = /* @__PURE__ */ Object.create(null), baseURI = initialBaseURI, basePointer = "") {
|
|
46
|
-
if (schema && typeof schema === "object" && !Array.isArray(schema)) {
|
|
47
|
-
const id = schema.$id || schema.id;
|
|
48
|
-
if (id) {
|
|
49
|
-
const url = new URL(id, baseURI.href);
|
|
50
|
-
if (url.hash.length > 1) {
|
|
51
|
-
lookup[url.href] = schema;
|
|
52
|
-
} else {
|
|
53
|
-
url.hash = "";
|
|
54
|
-
if (basePointer === "") {
|
|
55
|
-
baseURI = url;
|
|
56
|
-
} else {
|
|
57
|
-
dereference(schema, lookup, baseURI);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
} else if (schema !== true && schema !== false) {
|
|
62
|
-
return lookup;
|
|
63
|
-
}
|
|
64
|
-
const schemaURI = baseURI.href + (basePointer ? "#" + basePointer : "");
|
|
65
|
-
if (lookup[schemaURI] !== void 0) {
|
|
66
|
-
throw new Error(`Duplicate schema URI "${schemaURI}".`);
|
|
67
|
-
}
|
|
68
|
-
lookup[schemaURI] = schema;
|
|
69
|
-
if (schema === true || schema === false) {
|
|
70
|
-
return lookup;
|
|
71
|
-
}
|
|
72
|
-
if (schema.__absolute_uri__ === void 0) {
|
|
73
|
-
Object.defineProperty(schema, "__absolute_uri__", {
|
|
74
|
-
enumerable: false,
|
|
75
|
-
value: schemaURI
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
if (schema.$ref && schema.__absolute_ref__ === void 0) {
|
|
79
|
-
const url = new URL(schema.$ref, baseURI.href);
|
|
80
|
-
url.hash = url.hash;
|
|
81
|
-
Object.defineProperty(schema, "__absolute_ref__", {
|
|
82
|
-
enumerable: false,
|
|
83
|
-
value: url.href
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === void 0) {
|
|
87
|
-
const url = new URL(schema.$recursiveRef, baseURI.href);
|
|
88
|
-
url.hash = url.hash;
|
|
89
|
-
Object.defineProperty(schema, "__absolute_recursive_ref__", {
|
|
90
|
-
enumerable: false,
|
|
91
|
-
value: url.href
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
if (schema.$anchor) {
|
|
95
|
-
const url = new URL("#" + schema.$anchor, baseURI.href);
|
|
96
|
-
lookup[url.href] = schema;
|
|
97
|
-
}
|
|
98
|
-
for (let key in schema) {
|
|
99
|
-
if (ignoredKeyword[key]) {
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
const keyBase = `${basePointer}/${encodePointer(key)}`;
|
|
103
|
-
const subSchema = schema[key];
|
|
104
|
-
if (Array.isArray(subSchema)) {
|
|
105
|
-
if (schemaArrayKeyword[key]) {
|
|
106
|
-
const length = subSchema.length;
|
|
107
|
-
for (let i = 0; i < length; i++) {
|
|
108
|
-
dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
} else if (schemaMapKeyword[key]) {
|
|
112
|
-
for (let subKey in subSchema) {
|
|
113
|
-
dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`);
|
|
114
|
-
}
|
|
115
|
-
} else {
|
|
116
|
-
dereference(subSchema, lookup, baseURI, keyBase);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return lookup;
|
|
120
|
-
}
|
|
1
|
+
var duotoneDark = {};
|
|
121
2
|
export {
|
|
122
|
-
|
|
123
|
-
ignoredKeyword,
|
|
124
|
-
initialBaseURI,
|
|
125
|
-
schemaArrayKeyword,
|
|
126
|
-
schemaMapKeyword
|
|
3
|
+
duotoneDark as __exports
|
|
127
4
|
};
|
|
128
5
|
//# sourceMappingURL=index.es209.js.map
|
package/dist/index.es209.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es209.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es209.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es210.js
CHANGED
|
@@ -1,167 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
var hasRequiredEventemitter3;
|
|
3
|
-
function requireEventemitter3() {
|
|
4
|
-
if (hasRequiredEventemitter3) return eventemitter3.exports;
|
|
5
|
-
hasRequiredEventemitter3 = 1;
|
|
6
|
-
(function(module) {
|
|
7
|
-
var has = Object.prototype.hasOwnProperty, prefix = "~";
|
|
8
|
-
function Events() {
|
|
9
|
-
}
|
|
10
|
-
if (Object.create) {
|
|
11
|
-
Events.prototype = /* @__PURE__ */ Object.create(null);
|
|
12
|
-
if (!new Events().__proto__) prefix = false;
|
|
13
|
-
}
|
|
14
|
-
function EE(fn, context, once) {
|
|
15
|
-
this.fn = fn;
|
|
16
|
-
this.context = context;
|
|
17
|
-
this.once = once || false;
|
|
18
|
-
}
|
|
19
|
-
function addListener(emitter, event, fn, context, once) {
|
|
20
|
-
if (typeof fn !== "function") {
|
|
21
|
-
throw new TypeError("The listener must be a function");
|
|
22
|
-
}
|
|
23
|
-
var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
|
|
24
|
-
if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
|
|
25
|
-
else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
|
|
26
|
-
else emitter._events[evt] = [emitter._events[evt], listener];
|
|
27
|
-
return emitter;
|
|
28
|
-
}
|
|
29
|
-
function clearEvent(emitter, evt) {
|
|
30
|
-
if (--emitter._eventsCount === 0) emitter._events = new Events();
|
|
31
|
-
else delete emitter._events[evt];
|
|
32
|
-
}
|
|
33
|
-
function EventEmitter() {
|
|
34
|
-
this._events = new Events();
|
|
35
|
-
this._eventsCount = 0;
|
|
36
|
-
}
|
|
37
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
38
|
-
var names = [], events, name;
|
|
39
|
-
if (this._eventsCount === 0) return names;
|
|
40
|
-
for (name in events = this._events) {
|
|
41
|
-
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
|
|
42
|
-
}
|
|
43
|
-
if (Object.getOwnPropertySymbols) {
|
|
44
|
-
return names.concat(Object.getOwnPropertySymbols(events));
|
|
45
|
-
}
|
|
46
|
-
return names;
|
|
47
|
-
};
|
|
48
|
-
EventEmitter.prototype.listeners = function listeners(event) {
|
|
49
|
-
var evt = prefix ? prefix + event : event, handlers = this._events[evt];
|
|
50
|
-
if (!handlers) return [];
|
|
51
|
-
if (handlers.fn) return [handlers.fn];
|
|
52
|
-
for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
|
|
53
|
-
ee[i] = handlers[i].fn;
|
|
54
|
-
}
|
|
55
|
-
return ee;
|
|
56
|
-
};
|
|
57
|
-
EventEmitter.prototype.listenerCount = function listenerCount(event) {
|
|
58
|
-
var evt = prefix ? prefix + event : event, listeners = this._events[evt];
|
|
59
|
-
if (!listeners) return 0;
|
|
60
|
-
if (listeners.fn) return 1;
|
|
61
|
-
return listeners.length;
|
|
62
|
-
};
|
|
63
|
-
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
|
64
|
-
var evt = prefix ? prefix + event : event;
|
|
65
|
-
if (!this._events[evt]) return false;
|
|
66
|
-
var listeners = this._events[evt], len = arguments.length, args, i;
|
|
67
|
-
if (listeners.fn) {
|
|
68
|
-
if (listeners.once) this.removeListener(event, listeners.fn, void 0, true);
|
|
69
|
-
switch (len) {
|
|
70
|
-
case 1:
|
|
71
|
-
return listeners.fn.call(listeners.context), true;
|
|
72
|
-
case 2:
|
|
73
|
-
return listeners.fn.call(listeners.context, a1), true;
|
|
74
|
-
case 3:
|
|
75
|
-
return listeners.fn.call(listeners.context, a1, a2), true;
|
|
76
|
-
case 4:
|
|
77
|
-
return listeners.fn.call(listeners.context, a1, a2, a3), true;
|
|
78
|
-
case 5:
|
|
79
|
-
return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
|
|
80
|
-
case 6:
|
|
81
|
-
return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
|
|
82
|
-
}
|
|
83
|
-
for (i = 1, args = new Array(len - 1); i < len; i++) {
|
|
84
|
-
args[i - 1] = arguments[i];
|
|
85
|
-
}
|
|
86
|
-
listeners.fn.apply(listeners.context, args);
|
|
87
|
-
} else {
|
|
88
|
-
var length = listeners.length, j;
|
|
89
|
-
for (i = 0; i < length; i++) {
|
|
90
|
-
if (listeners[i].once) this.removeListener(event, listeners[i].fn, void 0, true);
|
|
91
|
-
switch (len) {
|
|
92
|
-
case 1:
|
|
93
|
-
listeners[i].fn.call(listeners[i].context);
|
|
94
|
-
break;
|
|
95
|
-
case 2:
|
|
96
|
-
listeners[i].fn.call(listeners[i].context, a1);
|
|
97
|
-
break;
|
|
98
|
-
case 3:
|
|
99
|
-
listeners[i].fn.call(listeners[i].context, a1, a2);
|
|
100
|
-
break;
|
|
101
|
-
case 4:
|
|
102
|
-
listeners[i].fn.call(listeners[i].context, a1, a2, a3);
|
|
103
|
-
break;
|
|
104
|
-
default:
|
|
105
|
-
if (!args) for (j = 1, args = new Array(len - 1); j < len; j++) {
|
|
106
|
-
args[j - 1] = arguments[j];
|
|
107
|
-
}
|
|
108
|
-
listeners[i].fn.apply(listeners[i].context, args);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return true;
|
|
113
|
-
};
|
|
114
|
-
EventEmitter.prototype.on = function on(event, fn, context) {
|
|
115
|
-
return addListener(this, event, fn, context, false);
|
|
116
|
-
};
|
|
117
|
-
EventEmitter.prototype.once = function once(event, fn, context) {
|
|
118
|
-
return addListener(this, event, fn, context, true);
|
|
119
|
-
};
|
|
120
|
-
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
|
|
121
|
-
var evt = prefix ? prefix + event : event;
|
|
122
|
-
if (!this._events[evt]) return this;
|
|
123
|
-
if (!fn) {
|
|
124
|
-
clearEvent(this, evt);
|
|
125
|
-
return this;
|
|
126
|
-
}
|
|
127
|
-
var listeners = this._events[evt];
|
|
128
|
-
if (listeners.fn) {
|
|
129
|
-
if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
|
|
130
|
-
clearEvent(this, evt);
|
|
131
|
-
}
|
|
132
|
-
} else {
|
|
133
|
-
for (var i = 0, events = [], length = listeners.length; i < length; i++) {
|
|
134
|
-
if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {
|
|
135
|
-
events.push(listeners[i]);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
|
|
139
|
-
else clearEvent(this, evt);
|
|
140
|
-
}
|
|
141
|
-
return this;
|
|
142
|
-
};
|
|
143
|
-
EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
|
|
144
|
-
var evt;
|
|
145
|
-
if (event) {
|
|
146
|
-
evt = prefix ? prefix + event : event;
|
|
147
|
-
if (this._events[evt]) clearEvent(this, evt);
|
|
148
|
-
} else {
|
|
149
|
-
this._events = new Events();
|
|
150
|
-
this._eventsCount = 0;
|
|
151
|
-
}
|
|
152
|
-
return this;
|
|
153
|
-
};
|
|
154
|
-
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
155
|
-
EventEmitter.prototype.addListener = EventEmitter.prototype.on;
|
|
156
|
-
EventEmitter.prefixed = prefix;
|
|
157
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
158
|
-
{
|
|
159
|
-
module.exports = EventEmitter;
|
|
160
|
-
}
|
|
161
|
-
})(eventemitter3);
|
|
162
|
-
return eventemitter3.exports;
|
|
163
|
-
}
|
|
1
|
+
var duotoneEarth = {};
|
|
164
2
|
export {
|
|
165
|
-
|
|
3
|
+
duotoneEarth as __exports
|
|
166
4
|
};
|
|
167
5
|
//# sourceMappingURL=index.es210.js.map
|
package/dist/index.es210.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es210.js","sources":["../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"],"sourcesContent":["'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n"],"names":[],"mappings":";;;;;;AAEA,QAAI,MAAM,OAAO,UAAU,gBACvB,SAAS;AASb,aAAS,SAAS;AAAA,IAAA;AASlB,QAAI,OAAO,QAAQ;AACjB,aAAO,YAAY,uBAAO,OAAO,IAAI;AAMrC,UAAI,CAAC,IAAI,OAAM,EAAG,UAAW,UAAS;AAAA,IACxC;AAWA,aAAS,GAAG,IAAI,SAAS,MAAM;AAC7B,WAAK,KAAK;AACV,WAAK,UAAU;AACf,WAAK,OAAO,QAAQ;AAAA,IACtB;AAaA,aAAS,YAAY,SAAS,OAAO,IAAI,SAAS,MAAM;AACtD,UAAI,OAAO,OAAO,YAAY;AAC5B,cAAM,IAAI,UAAU,iCAAiC;AAAA,MACzD;AAEE,UAAI,WAAW,IAAI,GAAG,IAAI,WAAW,SAAS,IAAI,GAC9C,MAAM,SAAS,SAAS,QAAQ;AAEpC,UAAI,CAAC,QAAQ,QAAQ,GAAG,EAAG,SAAQ,QAAQ,GAAG,IAAI,UAAU,QAAQ;AA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AA,MACX;AAEE,UAAI,YAAY,KAAK,QAAQ,GAAG;AAEhC,UAAI,UAAU,IAAI;AAChB,YACE,UAAU,OAAO,OAChB,CAAC,QAAQ,UAAU,UACnB,CAAC,WAAW,UAAU,YAAY,UACnC;AACA,qBAAW,MAAM,GAAG;AAAA,QAC1B;AAAA,MACA,OAAS;AACL,iBAAS,IAAI,GAAG,SAAS,CAAA,GAAI,SAAS,UAAU,QAAQ,IAAI,QAAQ,KAAK;AACvE,cACE,UAAU,CAAC,EAAE,OAAO,MACnB,QAAQ,CAAC,UAAU,CAAC,EAAE,QACtB,WAAW,UAAU,CAAC,EAAE,YAAY,SACrC;AACA,mBAAO,KAAK,UAAU,CAAC,CAAC;AAAA,UAChC;AAAA,QACA;AAKI,YAAI,OAAO,OAAQ,MAAK,QAAQ,GAAG,IAAI,OAAO,WAAW,IAAI,OAAO,CAAC,IAAI;AAAA,YACpE,YAAW,MAAM,GAAG;AAAA,MAC7B;AAEE,aAAO;AAAA,IACT;AASA,iBAAa,UAAU,qBAAqB,SAAS,mBAAmB,OAAO;AAC7E,UAAI;AAEJ,UAAI,OAAO;AACT,cAAM,SAAS,SAAS,QAAQ;AAChC,YAAI,KAAK,QAAQ,GAAG,EAAG,YAAW,MAAM,GAAG;AAAA,MAC/C,OAAS;AACL,aAAK,UAAU,IAAI,OAAM;AACzB,aAAK,eAAe;AAAA,MACxB;AAEE,aAAO;AAAA,IACT;AAKA,iBAAa,UAAU,MAAM,aAAa,UAAU;AACpD,iBAAa,UAAU,cAAc,aAAa,UAAU;AAK5D,iBAAa,WAAW;AAKxB,iBAAa,eAAe;AAKO;AACjC,uBAAiB;AAAA,IACnB;AAAA;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.es210.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es211.js
CHANGED
package/dist/index.es212.js
CHANGED
package/dist/index.es213.js
CHANGED
package/dist/index.es214.js
CHANGED
package/dist/index.es215.js
CHANGED
package/dist/index.es216.js
CHANGED
package/dist/index.es217.js
CHANGED
package/dist/index.es218.js
CHANGED
package/dist/index.es219.js
CHANGED
package/dist/index.es22.js
CHANGED
|
@@ -1,125 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import * as JsxRuntime from "react/jsx-runtime";
|
|
6
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
7
|
-
const UseStreamContext = React.createContext(null);
|
|
8
|
-
function useStreamContext() {
|
|
9
|
-
const ctx = React.useContext(UseStreamContext);
|
|
10
|
-
if (!ctx) throw new Error("useStreamContext must be used within a LoadExternalComponent");
|
|
11
|
-
return new Proxy(ctx, { get(target, prop) {
|
|
12
|
-
if (prop === "meta") return target.meta;
|
|
13
|
-
return target.stream[prop];
|
|
14
|
-
} });
|
|
1
|
+
function getContentString(content) {
|
|
2
|
+
if (typeof content === "string") return content;
|
|
3
|
+
const texts = content.filter((c) => c.type === "text").map((c) => c.text);
|
|
4
|
+
return texts.join(" ");
|
|
15
5
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
boundCache = {};
|
|
19
|
-
callbacks = {};
|
|
20
|
-
respond(shadowRootId, comp, targetElement) {
|
|
21
|
-
this.cache[shadowRootId] = {
|
|
22
|
-
comp,
|
|
23
|
-
target: targetElement
|
|
24
|
-
};
|
|
25
|
-
this.callbacks[shadowRootId]?.forEach((c) => c(comp, targetElement));
|
|
26
|
-
}
|
|
27
|
-
getBoundStore(shadowRootId) {
|
|
28
|
-
this.boundCache[shadowRootId] ??= {
|
|
29
|
-
subscribe: (onStoreChange) => {
|
|
30
|
-
this.callbacks[shadowRootId] ??= [];
|
|
31
|
-
this.callbacks[shadowRootId].push(onStoreChange);
|
|
32
|
-
return () => {
|
|
33
|
-
this.callbacks[shadowRootId] = this.callbacks[shadowRootId].filter((c) => c !== onStoreChange);
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
getSnapshot: () => this.cache[shadowRootId]
|
|
37
|
-
};
|
|
38
|
-
return this.boundCache[shadowRootId];
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const COMPONENT_STORE = new ComponentStore();
|
|
42
|
-
const EXT_STORE_SYMBOL = /* @__PURE__ */ Symbol.for("LGUI_EXT_STORE");
|
|
43
|
-
const REQUIRE_SYMBOL = /* @__PURE__ */ Symbol.for("LGUI_REQUIRE");
|
|
44
|
-
const REQUIRE_EXTRA_SYMBOL = /* @__PURE__ */ Symbol.for("LGUI_REQUIRE_EXTRA");
|
|
45
|
-
const isIterable = (value) => value != null && typeof value === "object" && Symbol.iterator in value;
|
|
46
|
-
const isPromise = (value) => value != null && typeof value === "object" && "then" in value && typeof value.then === "function";
|
|
47
|
-
const isReactNode = (value) => {
|
|
48
|
-
if (React.isValidElement(value)) return true;
|
|
49
|
-
if (value == null) return true;
|
|
50
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") return true;
|
|
51
|
-
if (isIterable(value)) return true;
|
|
52
|
-
if (isPromise(value)) return true;
|
|
53
|
-
return false;
|
|
54
|
-
};
|
|
55
|
-
function LoadExternalComponent({ stream, namespace, message, meta, fallback, components, ...props }) {
|
|
56
|
-
const ref = React.useRef(null);
|
|
57
|
-
const shadowRootId = `child-shadow-${React.useId()}`;
|
|
58
|
-
const store = React.useMemo(() => COMPONENT_STORE.getBoundStore(shadowRootId), [shadowRootId]);
|
|
59
|
-
const state = React.useSyncExternalStore(store.subscribe, store.getSnapshot);
|
|
60
|
-
const clientComponent = components?.[message.name];
|
|
61
|
-
const hasClientComponent = clientComponent != null;
|
|
62
|
-
let fallbackComponent = null;
|
|
63
|
-
if (isReactNode(fallback)) fallbackComponent = fallback;
|
|
64
|
-
else if (typeof fallback === "object" && fallback != null) fallbackComponent = fallback?.[message.name];
|
|
65
|
-
const uiNamespace = namespace ?? stream.assistantId;
|
|
66
|
-
const uiClient = stream.client["~ui"];
|
|
67
|
-
React.useEffect(() => {
|
|
68
|
-
if (hasClientComponent) return;
|
|
69
|
-
uiClient.getComponent(uiNamespace, message.name).then((html) => {
|
|
70
|
-
const dom = ref.current;
|
|
71
|
-
if (!dom) return;
|
|
72
|
-
const root = dom.shadowRoot ?? dom.attachShadow({ mode: "open" });
|
|
73
|
-
const fragment = document.createRange().createContextualFragment(html.replace("{{shadowRootId}}", shadowRootId));
|
|
74
|
-
root.appendChild(fragment);
|
|
75
|
-
});
|
|
76
|
-
}, [
|
|
77
|
-
uiClient,
|
|
78
|
-
uiNamespace,
|
|
79
|
-
message.name,
|
|
80
|
-
shadowRootId,
|
|
81
|
-
hasClientComponent
|
|
82
|
-
]);
|
|
83
|
-
if (hasClientComponent) return /* @__PURE__ */ jsx(UseStreamContext.Provider, {
|
|
84
|
-
value: {
|
|
85
|
-
stream,
|
|
86
|
-
meta
|
|
87
|
-
},
|
|
88
|
-
children: React.createElement(clientComponent, message.props)
|
|
89
|
-
});
|
|
90
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
91
|
-
id: shadowRootId,
|
|
92
|
-
ref,
|
|
93
|
-
...props
|
|
94
|
-
}), /* @__PURE__ */ jsx(UseStreamContext.Provider, {
|
|
95
|
-
value: {
|
|
96
|
-
stream,
|
|
97
|
-
meta
|
|
98
|
-
},
|
|
99
|
-
children: state?.target != null ? ReactDOM.createPortal(React.createElement(state.comp, message.props), state.target) : fallbackComponent
|
|
100
|
-
})] });
|
|
6
|
+
function isAIMessage(message) {
|
|
7
|
+
return message.type === "ai";
|
|
101
8
|
}
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
9
|
+
function isAiWithToolCalls(message) {
|
|
10
|
+
return isAIMessage(message) && message.tool_calls && message.tool_calls.length > 0;
|
|
11
|
+
}
|
|
12
|
+
function isToolMessage(message) {
|
|
13
|
+
return message.type === "tool";
|
|
14
|
+
}
|
|
15
|
+
function formatRelativeTime(timestamp) {
|
|
16
|
+
const now = /* @__PURE__ */ new Date();
|
|
17
|
+
const date = new Date(timestamp);
|
|
18
|
+
const diffTime = now.getTime() - date.getTime();
|
|
19
|
+
const diffDays = Math.floor(diffTime / (1e3 * 60 * 60 * 24));
|
|
20
|
+
if (diffDays === 0) {
|
|
21
|
+
return "Today";
|
|
22
|
+
} else if (diffDays === 1) {
|
|
23
|
+
return "Yesterday";
|
|
24
|
+
} else if (diffDays < 7) {
|
|
25
|
+
return `${diffDays} day${diffDays > 1 ? "s" : ""} ago`;
|
|
26
|
+
} else if (diffDays < 30) {
|
|
27
|
+
const weeks = Math.floor(diffDays / 7);
|
|
28
|
+
return `${weeks} week${weeks > 1 ? "s" : ""} ago`;
|
|
29
|
+
} else {
|
|
30
|
+
const months = Math.floor(diffDays / 30);
|
|
31
|
+
return `${months} month${months > 1 ? "s" : ""} ago`;
|
|
32
|
+
}
|
|
119
33
|
}
|
|
120
34
|
export {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
35
|
+
formatRelativeTime,
|
|
36
|
+
getContentString,
|
|
37
|
+
isAIMessage,
|
|
38
|
+
isAiWithToolCalls,
|
|
39
|
+
isToolMessage
|
|
124
40
|
};
|
|
125
41
|
//# sourceMappingURL=index.es22.js.map
|
package/dist/index.es22.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es22.js","sources":["../
|
|
1
|
+
{"version":3,"file":"index.es22.js","sources":["../src/utils/utils.ts"],"sourcesContent":["import type { AIMessage, Message } from \"@langchain/langgraph-sdk\";\n\n/**\n * Extracts a string summary from a message's content, supporting multimodal (text, image, file, etc.).\n * - If text is present, returns the joined text.\n * - If not, returns a label for the first non-text modality (e.g., 'Image', 'Other').\n * - If unknown, returns 'Multimodal message'.\n */\nexport function getContentString(content: Message[\"content\"]): string {\n if (typeof content === \"string\") return content;\n const texts = content\n .filter((c): c is { type: \"text\"; text: string } => c.type === \"text\")\n .map((c) => c.text);\n return texts.join(\" \");\n}\n\nexport function isAIMessage(message: Message): message is AIMessage {\n return message.type === \"ai\";\n}\n\nexport function isAiWithToolCalls(message: Message) {\n return (\n isAIMessage(message) && message.tool_calls && message.tool_calls.length > 0\n );\n}\n\nexport function isToolMessage(message: Message) {\n return message.type === \"tool\";\n}\n\n\nexport function formatRelativeTime(timestamp: string): string {\n const now = new Date();\n const date = new Date(timestamp);\n const diffTime = now.getTime() - date.getTime();\n const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));\n\n if (diffDays === 0) {\n return \"Today\";\n } else if (diffDays === 1) {\n return \"Yesterday\";\n } else if (diffDays < 7) {\n return `${diffDays} day${diffDays > 1 ? 's' : ''} ago`;\n } else if (diffDays < 30) {\n const weeks = Math.floor(diffDays / 7);\n return `${weeks} week${weeks > 1 ? 's' : ''} ago`;\n } else {\n const months = Math.floor(diffDays / 30);\n return `${months} month${months > 1 ? 's' : ''} ago`;\n }\n}\n"],"names":[],"mappings":"AAQO,SAAS,iBAAiB,SAAqC;AACpE,MAAI,OAAO,YAAY,SAAU,QAAO;AACxC,QAAM,QAAQ,QACX,OAAO,CAAC,MAA2C,EAAE,SAAS,MAAM,EACpE,IAAI,CAAC,MAAM,EAAE,IAAI;AACpB,SAAO,MAAM,KAAK,GAAG;AACvB;AAEO,SAAS,YAAY,SAAwC;AAClE,SAAO,QAAQ,SAAS;AAC1B;AAEO,SAAS,kBAAkB,SAAkB;AAClD,SACE,YAAY,OAAO,KAAK,QAAQ,cAAc,QAAQ,WAAW,SAAS;AAE9E;AAEO,SAAS,cAAc,SAAkB;AAC9C,SAAO,QAAQ,SAAS;AAC1B;AAGO,SAAS,mBAAmB,WAA2B;AAC5D,QAAM,0BAAU,KAAA;AAChB,QAAM,OAAO,IAAI,KAAK,SAAS;AAC/B,QAAM,WAAW,IAAI,QAAA,IAAY,KAAK,QAAA;AACtC,QAAM,WAAW,KAAK,MAAM,YAAY,MAAO,KAAK,KAAK,GAAG;AAE5D,MAAI,aAAa,GAAG;AAClB,WAAO;AAAA,EACT,WAAW,aAAa,GAAG;AACzB,WAAO;AAAA,EACT,WAAW,WAAW,GAAG;AACvB,WAAO,GAAG,QAAQ,OAAO,WAAW,IAAI,MAAM,EAAE;AAAA,EAClD,WAAW,WAAW,IAAI;AACxB,UAAM,QAAQ,KAAK,MAAM,WAAW,CAAC;AACrC,WAAO,GAAG,KAAK,QAAQ,QAAQ,IAAI,MAAM,EAAE;AAAA,EAC7C,OAAO;AACL,UAAM,SAAS,KAAK,MAAM,WAAW,EAAE;AACvC,WAAO,GAAG,MAAM,SAAS,SAAS,IAAI,MAAM,EAAE;AAAA,EAChD;AACF;"}
|
package/dist/index.es220.js
CHANGED