@rtc-agent/component 0.2.9-rc.1 → 0.3.0-rc.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.
Files changed (54) hide show
  1. package/dist/.generated/locales/en-US.d.ts +15 -0
  2. package/dist/.generated/locales/en-US.d.ts.map +1 -1
  3. package/dist/assets/index.browser-D4SG7v3Y.js +201 -0
  4. package/dist/assets/shared-worker-Bw4_Rekb.js +77502 -0
  5. package/dist/components/chat-layout/rtc-chat-layout.d.ts +12 -0
  6. package/dist/components/chat-layout/rtc-chat-layout.d.ts.map +1 -1
  7. package/dist/components/chat-layout/rtc-chat-layout.styles.d.ts.map +1 -1
  8. package/dist/components/content-area/rtc-error-message.d.ts +1 -2
  9. package/dist/components/content-area/rtc-error-message.d.ts.map +1 -1
  10. package/dist/components/content-area/rtc-user-message.d.ts +17 -1
  11. package/dist/components/content-area/rtc-user-message.d.ts.map +1 -1
  12. package/dist/components/content-area/rtc-user-message.styles.d.ts +3 -1
  13. package/dist/components/content-area/rtc-user-message.styles.d.ts.map +1 -1
  14. package/dist/components/file-preview/rtc-file-preview-area.d.ts +48 -0
  15. package/dist/components/file-preview/rtc-file-preview-area.d.ts.map +1 -0
  16. package/dist/components/file-preview/rtc-file-preview-area.styles.d.ts +2 -0
  17. package/dist/components/file-preview/rtc-file-preview-area.styles.d.ts.map +1 -0
  18. package/dist/components/file-preview/rtc-file-preview-modal.d.ts +108 -0
  19. package/dist/components/file-preview/rtc-file-preview-modal.d.ts.map +1 -0
  20. package/dist/components/file-preview/rtc-file-preview-modal.styles.d.ts +2 -0
  21. package/dist/components/file-preview/rtc-file-preview-modal.styles.d.ts.map +1 -0
  22. package/dist/components/file-preview/rtc-file-thumbnail.d.ts +81 -0
  23. package/dist/components/file-preview/rtc-file-thumbnail.d.ts.map +1 -0
  24. package/dist/components/file-preview/rtc-file-thumbnail.styles.d.ts +2 -0
  25. package/dist/components/file-preview/rtc-file-thumbnail.styles.d.ts.map +1 -0
  26. package/dist/components/input-area/rtc-input-area.d.ts +64 -2
  27. package/dist/components/input-area/rtc-input-area.d.ts.map +1 -1
  28. package/dist/components/input-area/rtc-input-area.styles.d.ts.map +1 -1
  29. package/dist/components/rtc-agent/rtc-agent.d.ts +11 -0
  30. package/dist/components/rtc-agent/rtc-agent.d.ts.map +1 -1
  31. package/dist/contexts/file-storage.d.ts +17 -0
  32. package/dist/contexts/file-storage.d.ts.map +1 -0
  33. package/dist/controllers/persistence.controller.d.ts +11 -0
  34. package/dist/controllers/persistence.controller.d.ts.map +1 -1
  35. package/dist/{en-US-DUdx4QEY.js → en-US-5v3M5mKE.js} +17 -2
  36. package/dist/{highlight-languages-BVzldaaL.js → highlight-languages-DNn7E0hV.js} +1 -1
  37. package/dist/icons/icons.d.ts +2 -0
  38. package/dist/icons/icons.d.ts.map +1 -1
  39. package/dist/icons/index.d.ts +1 -1
  40. package/dist/icons/index.d.ts.map +1 -1
  41. package/dist/{index-BOwm7U7f.js → index-B1wkXAVX.js} +34897 -30745
  42. package/dist/index.js +1 -1
  43. package/dist/index.umd.js +1761 -1012
  44. package/dist/stats.html +1 -1
  45. package/dist/utils/file-id.d.ts +23 -0
  46. package/dist/utils/file-id.d.ts.map +1 -0
  47. package/dist/utils/file-md5.d.ts +51 -0
  48. package/dist/utils/file-md5.d.ts.map +1 -0
  49. package/dist/utils/file-storage.d.ts +527 -0
  50. package/dist/utils/file-storage.d.ts.map +1 -0
  51. package/dist/worker-bridge.d.ts +186 -2
  52. package/dist/worker-bridge.d.ts.map +1 -1
  53. package/package.json +7 -5
  54. package/dist/assets/shared-worker-vIZKoWv_.js +0 -2667
@@ -264,5 +264,20 @@ export declare const templates: {
264
264
  sfcf02d7fbb1eef49: string;
265
265
  sfd3a5046f19f54d0: string;
266
266
  sfea2ebf059badaef: string;
267
+ s473e939112690a50: string;
268
+ s9d1b66ae2017a0e5: string;
269
+ s19701948ff347238: string;
270
+ sac77b3a437c0f21d: string;
271
+ s2f015ae7a7bb3cec: string;
272
+ sf3bfb0839acc4bb7: import("@lit/localize").StrResult;
273
+ sf3090d705d4de077: import("@lit/localize").StrResult;
274
+ sa0903f2fc0126db5: string;
275
+ sf3349f071f2bab10: string;
276
+ s795fca7acd5146f2: string;
277
+ se03b0995736ec63d: string;
278
+ s631275c801a0881f: string;
279
+ s132a9d11517f52d1: string;
280
+ sea0723ac2f4955af: string;
281
+ s9a9759b2d054bbdc: string;
267
282
  };
268
283
  //# sourceMappingURL=en-US.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../src/.generated/locales/en-US.ts"],"names":[],"mappings":"AAUI,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0QrB,CAAC"}
1
+ {"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../src/.generated/locales/en-US.ts"],"names":[],"mappings":"AAUI,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyRrB,CAAC"}
@@ -0,0 +1,201 @@
1
+ var I = Object.defineProperty;
2
+ var R = (E, e, s) => e in E ? I(E, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : E[e] = s;
3
+ var w = (E, e, s) => R(E, typeof e != "symbol" ? e + "" : e, s);
4
+ import { h as C, t as B, T as U, f as H, e as N } from "./shared-worker-Bw4_Rekb.js";
5
+ import { E as D, a as $, H as F, I as K, M as L, b as q, S as G, c as J, d as Q, g as V, i as W, j as X, r as Y, k as Z } from "./shared-worker-Bw4_Rekb.js";
6
+ class O {
7
+ constructor({ marshaller: e, serializer: s, deserializer: l, serdeContext: c, defaultContentType: d, compositeErrorRegistry: o }) {
8
+ w(this, "marshaller");
9
+ w(this, "serializer");
10
+ w(this, "deserializer");
11
+ w(this, "serdeContext");
12
+ w(this, "defaultContentType");
13
+ w(this, "compositeErrorRegistry");
14
+ this.marshaller = e, this.serializer = s, this.deserializer = l, this.serdeContext = c, this.defaultContentType = d, this.compositeErrorRegistry = o;
15
+ }
16
+ async serializeEventStream({ eventStream: e, requestSchema: s, initialRequest: l, initialMessageType: c }) {
17
+ const d = this.marshaller, o = s.getEventStreamMember(), f = s.getMemberSchema(o), S = this.serializer, y = this.defaultContentType, m = Symbol("initialRequestMarker"), u = {
18
+ async *[Symbol.asyncIterator]() {
19
+ if (l) {
20
+ const t = {
21
+ ":event-type": { type: "string", value: c ?? "initial-request" },
22
+ ":message-type": { type: "string", value: "event" },
23
+ ":content-type": { type: "string", value: y }
24
+ };
25
+ S.write(s, l);
26
+ const n = S.flush();
27
+ yield {
28
+ [m]: !0,
29
+ headers: t,
30
+ body: n
31
+ };
32
+ }
33
+ for await (const t of e)
34
+ yield t;
35
+ }
36
+ };
37
+ return d.serialize(u, (t) => {
38
+ if (t[m])
39
+ return {
40
+ headers: t.headers,
41
+ body: t.body
42
+ };
43
+ let n = "";
44
+ for (const a in t)
45
+ if (C(t, a) && a !== "__type") {
46
+ n = a;
47
+ break;
48
+ }
49
+ const { additionalHeaders: r, body: i, eventType: h, explicitPayloadContentType: M } = this.writeEventBody(n, f, t);
50
+ return {
51
+ headers: {
52
+ ":event-type": { type: "string", value: h },
53
+ ":message-type": { type: "string", value: "event" },
54
+ ":content-type": { type: "string", value: M ?? y },
55
+ ...r
56
+ },
57
+ body: i
58
+ };
59
+ });
60
+ }
61
+ async deserializeEventStream({ response: e, responseSchema: s, initialResponseContainer: l, initialMessageType: c }) {
62
+ var n;
63
+ const d = this.marshaller, o = s.getEventStreamMember(), S = s.getMemberSchema(o).getMemberSchemas(), y = Symbol("initialResponseMarker"), m = d.deserialize(e.body, async (r) => {
64
+ var M, g;
65
+ let i = "";
66
+ for (const a in r)
67
+ if (C(r, a) && a !== "__type") {
68
+ i = a;
69
+ break;
70
+ }
71
+ const h = r[i].body;
72
+ if (i === (c ?? "initial-response")) {
73
+ const a = await this.deserializer.read(s, h);
74
+ return delete a[o], {
75
+ [y]: !0,
76
+ ...a
77
+ };
78
+ } else if (i in S) {
79
+ const a = S[i];
80
+ if (a.isStructSchema()) {
81
+ const p = {};
82
+ let T = !1;
83
+ for (const [b, z] of a.structIterator()) {
84
+ const { eventHeader: k, eventPayload: x } = z.getMergedTraits();
85
+ if (T = T || !!(k || x), x)
86
+ z.isBlobSchema() ? p[b] = h : z.isStringSchema() ? p[b] = (((M = this.serdeContext) == null ? void 0 : M.utf8Encoder) ?? B)(h) : z.isStructSchema() && (p[b] = await this.deserializer.read(z, h));
87
+ else if (k) {
88
+ const v = (g = r[i].headers[b]) == null ? void 0 : g.value;
89
+ v != null && (z.isNumericSchema() ? v && typeof v == "object" && "bytes" in v ? p[b] = BigInt(v.toString()) : p[b] = Number(v) : p[b] = v);
90
+ }
91
+ }
92
+ return {
93
+ [i]: await this.readEventMember(a, h, T, p)
94
+ };
95
+ }
96
+ return {
97
+ [i]: await this.deserializer.read(a, h)
98
+ };
99
+ } else
100
+ return {
101
+ $unknown: r
102
+ };
103
+ }), u = m[Symbol.asyncIterator](), t = await u.next();
104
+ if (t.done)
105
+ return m;
106
+ if ((n = t.value) != null && n[y]) {
107
+ if (!s)
108
+ throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
109
+ for (const r in t.value)
110
+ C(t.value, r) && (l[r] = t.value[r]);
111
+ }
112
+ return {
113
+ async *[Symbol.asyncIterator]() {
114
+ var r;
115
+ for ((r = t == null ? void 0 : t.value) != null && r[y] || (yield t.value); ; ) {
116
+ const { done: i, value: h } = await u.next();
117
+ if (i)
118
+ break;
119
+ yield h;
120
+ }
121
+ }
122
+ };
123
+ }
124
+ async readEventMember(e, s, l, c) {
125
+ var S, y;
126
+ let d;
127
+ const o = e.getSchema();
128
+ if (Array.isArray(o) && o[0] === -3) {
129
+ const m = o[1], u = U.for(m);
130
+ (S = this.compositeErrorRegistry) == null || S.copyFrom(u), d = (y = this.compositeErrorRegistry ?? u) == null ? void 0 : y.getErrorCtor(o);
131
+ }
132
+ const f = l ? c : s.byteLength === 0 ? {} : await this.deserializer.read(e, s);
133
+ if (d) {
134
+ const m = f.message ?? f.Message ?? "Unknown", u = {}, t = e.getMergedTraits().error;
135
+ return t && (u.$fault = t), Object.assign(new d({}), u, {
136
+ message: m
137
+ }, f);
138
+ }
139
+ return f;
140
+ }
141
+ writeEventBody(e, s, l) {
142
+ var t;
143
+ const c = this.serializer;
144
+ let d = e, o = null, f;
145
+ const S = s.getSchema()[4].includes(e), y = {};
146
+ if (S) {
147
+ const n = s.getMemberSchema(e);
148
+ if (n.isStructSchema()) {
149
+ for (const [r, i] of n.structIterator()) {
150
+ const { eventHeader: h, eventPayload: M } = i.getMergedTraits();
151
+ if (M)
152
+ o = r;
153
+ else if (h) {
154
+ const g = l[e][r];
155
+ let a = "binary";
156
+ i.isNumericSchema() ? (-2) ** 31 <= g && g <= 2 ** 31 - 1 ? a = "integer" : a = "long" : i.isTimestampSchema() ? a = "timestamp" : i.isStringSchema() ? a = "string" : i.isBooleanSchema() && (a = "boolean"), g != null && (y[r] = {
157
+ type: a,
158
+ value: g
159
+ }, delete l[e][r]);
160
+ }
161
+ }
162
+ if (o !== null) {
163
+ const r = n.getMemberSchema(o);
164
+ r.isBlobSchema() ? f = "application/octet-stream" : r.isStringSchema() && (f = "text/plain"), c.write(r, l[e][o]);
165
+ } else
166
+ c.write(n, l[e]);
167
+ } else if (n.isUnitSchema())
168
+ c.write(n, {});
169
+ else
170
+ throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
171
+ } else {
172
+ const [n, r] = l[e];
173
+ d = n, c.write(15, r);
174
+ }
175
+ const m = c.flush() ?? new Uint8Array();
176
+ return {
177
+ body: typeof m == "string" ? (((t = this.serdeContext) == null ? void 0 : t.utf8Decoder) ?? H)(m) : m,
178
+ eventType: d,
179
+ explicitPayloadContentType: f,
180
+ additionalHeaders: y
181
+ };
182
+ }
183
+ }
184
+ export {
185
+ D as EventStreamCodec,
186
+ $ as EventStreamMarshaller,
187
+ O as EventStreamSerde,
188
+ F as HeaderMarshaller,
189
+ K as Int64,
190
+ L as MessageDecoderStream,
191
+ q as MessageEncoderStream,
192
+ G as SmithyMessageDecoderStream,
193
+ J as SmithyMessageEncoderStream,
194
+ Q as UniversalEventStreamMarshaller,
195
+ N as eventStreamSerdeProvider,
196
+ V as getChunkedStream,
197
+ W as getMessageUnmarshaller,
198
+ X as iterableToReadableStream,
199
+ Y as readableStreamToIterable,
200
+ Z as resolveEventStreamSerdeConfig
201
+ };