@getcliqio/hug-frontend 0.0.0-stage → 1.15.33
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/README.md +31 -2
- package/dist/base_css.d.ts +6 -0
- package/dist/base_css.d.ts.map +1 -0
- package/dist/base_css.js +28 -0
- package/dist/base_css.js.map +1 -0
- package/dist/build.d.ts +45 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +44 -0
- package/dist/build.js.map +1 -0
- package/dist/current.d.ts +10 -0
- package/dist/current.d.ts.map +1 -0
- package/dist/current.js +14 -0
- package/dist/current.js.map +1 -0
- package/dist/define.d.ts +12 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +9 -0
- package/dist/define.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +25 -0
- package/dist/errors.js.map +1 -0
- package/dist/host.d.ts +137 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +368 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/mount.d.ts +64 -0
- package/dist/mount.d.ts.map +1 -0
- package/dist/mount.js +106 -0
- package/dist/mount.js.map +1 -0
- package/dist/paths.d.ts +12 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +42 -0
- package/dist/paths.js.map +1 -0
- package/dist/react.d.ts +63 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +149 -0
- package/dist/react.js.map +1 -0
- package/dist/runtime.d.ts +140 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +284 -0
- package/dist/runtime.js.map +1 -0
- package/dist/shared/bridge/index.d.ts +16 -0
- package/dist/shared/bridge/index.d.ts.map +1 -0
- package/dist/shared/bridge/index.js +14 -0
- package/dist/shared/bridge/index.js.map +1 -0
- package/dist/shared/bridge/messages.d.ts +559 -0
- package/dist/shared/bridge/messages.d.ts.map +1 -0
- package/dist/shared/bridge/messages.js +166 -0
- package/dist/shared/bridge/messages.js.map +1 -0
- package/dist/shared/context.d.ts +54 -0
- package/dist/shared/context.d.ts.map +1 -0
- package/dist/shared/context.js +28 -0
- package/dist/shared/context.js.map +1 -0
- package/dist/shared/define.d.ts +116 -0
- package/dist/shared/define.d.ts.map +1 -0
- package/dist/shared/define.js +120 -0
- package/dist/shared/define.js.map +1 -0
- package/dist/shared/definitions/approval.d.ts +216 -0
- package/dist/shared/definitions/approval.d.ts.map +1 -0
- package/dist/shared/definitions/approval.js +51 -0
- package/dist/shared/definitions/approval.js.map +1 -0
- package/dist/shared/definitions/common.d.ts +122 -0
- package/dist/shared/definitions/common.d.ts.map +1 -0
- package/dist/shared/definitions/common.js +71 -0
- package/dist/shared/definitions/common.js.map +1 -0
- package/dist/shared/definitions/form.d.ts +197 -0
- package/dist/shared/definitions/form.d.ts.map +1 -0
- package/dist/shared/definitions/form.js +30 -0
- package/dist/shared/definitions/form.js.map +1 -0
- package/dist/shared/definitions/index.d.ts +10 -0
- package/dist/shared/definitions/index.d.ts.map +1 -0
- package/dist/shared/definitions/index.js +9 -0
- package/dist/shared/definitions/index.js.map +1 -0
- package/dist/shared/problems.d.ts +35 -0
- package/dist/shared/problems.d.ts.map +1 -0
- package/dist/shared/problems.js +54 -0
- package/dist/shared/problems.js.map +1 -0
- package/dist/shared/requested_inputs.d.ts +190 -0
- package/dist/shared/requested_inputs.d.ts.map +1 -0
- package/dist/shared/requested_inputs.js +221 -0
- package/dist/shared/requested_inputs.js.map +1 -0
- package/dist/shared/schema_for_inputs.d.ts +20 -0
- package/dist/shared/schema_for_inputs.d.ts.map +1 -0
- package/dist/shared/schema_for_inputs.js +96 -0
- package/dist/shared/schema_for_inputs.js.map +1 -0
- package/dist/state.d.ts +58 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +124 -0
- package/dist/state.js.map +1 -0
- package/dist/testing.d.ts +96 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +156 -0
- package/dist/testing.js.map +1 -0
- package/dist/theme.d.ts +15 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +18 -0
- package/dist/theme.js.map +1 -0
- package/dist/transport.d.ts +19 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +21 -0
- package/dist/transport.js.map +1 -0
- package/dist/ui/base.d.ts +33 -0
- package/dist/ui/base.d.ts.map +1 -0
- package/dist/ui/base.js +99 -0
- package/dist/ui/base.js.map +1 -0
- package/dist/ui/choices.d.ts +46 -0
- package/dist/ui/choices.d.ts.map +1 -0
- package/dist/ui/choices.js +121 -0
- package/dist/ui/choices.js.map +1 -0
- package/dist/ui/fields.d.ts +46 -0
- package/dist/ui/fields.d.ts.map +1 -0
- package/dist/ui/fields.js +169 -0
- package/dist/ui/fields.js.map +1 -0
- package/dist/ui/files.d.ts +80 -0
- package/dist/ui/files.d.ts.map +1 -0
- package/dist/ui/files.js +342 -0
- package/dist/ui/files.js.map +1 -0
- package/dist/ui/fonts.css +7 -0
- package/dist/ui/fonts_css.d.ts +3 -0
- package/dist/ui/fonts_css.d.ts.map +1 -0
- package/dist/ui/fonts_css.js +4 -0
- package/dist/ui/fonts_css.js.map +1 -0
- package/dist/ui/index.d.ts +24 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +32 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/markdown.d.ts +46 -0
- package/dist/ui/markdown.d.ts.map +1 -0
- package/dist/ui/markdown.js +318 -0
- package/dist/ui/markdown.js.map +1 -0
- package/dist/view.d.ts +49 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +136 -0
- package/dist/view.js.map +1 -0
- package/dist/zod_config.d.ts +2 -0
- package/dist/zod_config.d.ts.map +1 -0
- package/dist/zod_config.js +10 -0
- package/dist/zod_config.js.map +1 -0
- package/fonts/LICENSE.txt +92 -0
- package/package.json +82 -5
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The runtime API (PLAN-hug-widgets §9.2.3): `connect()` and the `Hug` object a frontend reads and writes. It speaks
|
|
3
|
+
* the bridge (§6) — every message checked with the shared schemas — and reaches nothing outside the frame itself:
|
|
4
|
+
* uploads, file reads, downloads and links all go to the host, which goes to Core with the viewer's permissions.
|
|
5
|
+
*
|
|
6
|
+
* `mount_hug` (the easy path) is built on this; frameworks without an adapter can use it directly.
|
|
7
|
+
*/
|
|
8
|
+
import './zod_config.js'; // before anything parses: no eval probe in the sandbox
|
|
9
|
+
import { HugError, read_error, upload_error } from './errors.js';
|
|
10
|
+
import { make_theme } from './theme.js';
|
|
11
|
+
import { window_transport } from './transport.js';
|
|
12
|
+
import { BRIDGE_PROTOCOLS, BRIDGE_VERSION, MAX_SUBMIT_LABEL, MAX_VALUES_PER_SECOND, negotiate_protocol, parse_host_message, } from './shared/bridge/messages.js';
|
|
13
|
+
import { MAX_SUMMARY_LENGTH } from './shared/define.js';
|
|
14
|
+
const DEFAULT_TIMEOUT_MS = 5_000;
|
|
15
|
+
const VALUES_INTERVAL_MS = Math.ceil(1000 / MAX_VALUES_PER_SECOND);
|
|
16
|
+
/** Shows why the page did nothing, when it was opened outside a Hug runtime. */
|
|
17
|
+
function explain_not_in_runtime() {
|
|
18
|
+
if (typeof document === 'undefined' || !document.body)
|
|
19
|
+
return;
|
|
20
|
+
const box = document.createElement('div');
|
|
21
|
+
box.setAttribute('role', 'alert');
|
|
22
|
+
box.style.cssText = 'font: 14px system-ui; margin: 24px; padding: 16px; border: 1px solid #ccc; border-radius: 8px';
|
|
23
|
+
box.textContent = 'This is a hug: it runs inside a Hug page on CliqHub or cliqd. To work on it, run `cliq hug dev <folder>`.';
|
|
24
|
+
document.body.append(box);
|
|
25
|
+
}
|
|
26
|
+
/** Waits for the host's `init`. */
|
|
27
|
+
function await_init(transport, timeout_ms) {
|
|
28
|
+
return new Promise((resolve, reject) => {
|
|
29
|
+
const stop = transport.listen((data) => {
|
|
30
|
+
const parsed = parse_host_message(data);
|
|
31
|
+
if (!parsed.ok || parsed.message.type !== 'init')
|
|
32
|
+
return;
|
|
33
|
+
clearTimeout(timer);
|
|
34
|
+
stop();
|
|
35
|
+
resolve(parsed.message);
|
|
36
|
+
});
|
|
37
|
+
const timer = setTimeout(() => { stop(); reject(new HugError('timeout', `The host didn't start this hug within ${timeout_ms} ms`)); }, timeout_ms);
|
|
38
|
+
transport.send({ v: BRIDGE_VERSION, type: 'ready', protocols: [...BRIDGE_PROTOCOLS] });
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Connect to the Hug runtime: say `ready`, wait for the host's `init`, and return the Hug.
|
|
43
|
+
*
|
|
44
|
+
* @throws HugError `not_in_runtime` when there is no host (the page was opened on its own — it says so on the page),
|
|
45
|
+
* `timeout` when the host doesn't start the hug, `protocol_unsupported` when no bridge version is shared.
|
|
46
|
+
*/
|
|
47
|
+
export async function connect(opts = {}) {
|
|
48
|
+
const transport = opts.transport ?? window_transport();
|
|
49
|
+
if (!transport.attached) {
|
|
50
|
+
explain_not_in_runtime();
|
|
51
|
+
throw new HugError('not_in_runtime', 'This page is a hug and runs inside a Hug runtime (CliqHub, cliqd, or `cliq hug dev`)');
|
|
52
|
+
}
|
|
53
|
+
const init = await await_init(transport, opts.timeout_ms ?? DEFAULT_TIMEOUT_MS);
|
|
54
|
+
const protocol = negotiate_protocol(init.protocols);
|
|
55
|
+
if (protocol === null)
|
|
56
|
+
throw new HugError('protocol_unsupported', `The host speaks bridge versions ${init.protocols.join(', ')}; this SDK speaks ${BRIDGE_PROTOCOLS.join(', ')}`);
|
|
57
|
+
return new RuntimeHug(transport, init, protocol);
|
|
58
|
+
}
|
|
59
|
+
/** The Hug, connected. */
|
|
60
|
+
class RuntimeHug {
|
|
61
|
+
transport;
|
|
62
|
+
protocol;
|
|
63
|
+
hug;
|
|
64
|
+
params;
|
|
65
|
+
viewer;
|
|
66
|
+
files;
|
|
67
|
+
attachments;
|
|
68
|
+
theme;
|
|
69
|
+
locale;
|
|
70
|
+
mode;
|
|
71
|
+
mine;
|
|
72
|
+
viewing;
|
|
73
|
+
draft;
|
|
74
|
+
progress;
|
|
75
|
+
listeners = new Map();
|
|
76
|
+
uploads = new Map();
|
|
77
|
+
reads = new Map();
|
|
78
|
+
object_urls = [];
|
|
79
|
+
stop;
|
|
80
|
+
next_id = 0;
|
|
81
|
+
status;
|
|
82
|
+
pending_values = null;
|
|
83
|
+
values_timer = null;
|
|
84
|
+
last_values_at = 0;
|
|
85
|
+
constructor(transport, init, protocol) {
|
|
86
|
+
this.transport = transport;
|
|
87
|
+
this.protocol = protocol;
|
|
88
|
+
this.hug = init.hug;
|
|
89
|
+
this.params = init.params;
|
|
90
|
+
this.viewer = init.viewer;
|
|
91
|
+
this.files = init.files;
|
|
92
|
+
this.attachments = init.attachments;
|
|
93
|
+
this.theme = make_theme(init.theme);
|
|
94
|
+
this.locale = init.locale;
|
|
95
|
+
this.mode = init.mode;
|
|
96
|
+
this.mine = init.mine;
|
|
97
|
+
this.viewing = init.viewing;
|
|
98
|
+
this.draft = init.draft;
|
|
99
|
+
this.progress = init.progress;
|
|
100
|
+
this.status = init.hug.status;
|
|
101
|
+
this.stop = transport.listen((data) => this.receive(data));
|
|
102
|
+
}
|
|
103
|
+
set_values(values, state) {
|
|
104
|
+
if (this.mode === 'view' || this.status !== 'open')
|
|
105
|
+
return;
|
|
106
|
+
this.pending_values = { values, state };
|
|
107
|
+
if (this.values_timer)
|
|
108
|
+
return;
|
|
109
|
+
const wait = Math.max(0, this.last_values_at + VALUES_INTERVAL_MS - Date.now());
|
|
110
|
+
this.values_timer = setTimeout(() => this.flush_values(), wait);
|
|
111
|
+
}
|
|
112
|
+
flush_values() {
|
|
113
|
+
this.values_timer = null;
|
|
114
|
+
const pending = this.pending_values;
|
|
115
|
+
this.pending_values = null;
|
|
116
|
+
if (!pending)
|
|
117
|
+
return;
|
|
118
|
+
this.last_values_at = Date.now();
|
|
119
|
+
const { values, state } = pending;
|
|
120
|
+
// Fitted to the bridge's limits: a label, summary or problem list over them would make the host refuse the
|
|
121
|
+
// whole message, and the answer would silently stop updating.
|
|
122
|
+
const label = state.submit ? one_line(state.submit.label, MAX_SUBMIT_LABEL) : '';
|
|
123
|
+
this.send({
|
|
124
|
+
type: 'values', values, valid: state.valid,
|
|
125
|
+
...(state.problems?.length ? { problems: state.problems.slice(0, MAX_PROBLEMS).map((p) => ({ ...p })) } : {}),
|
|
126
|
+
...(state.submit && label ? { submit: { ...state.submit, label } } : {}),
|
|
127
|
+
...(state.summary !== undefined ? { summary: one_line(state.summary, MAX_SUMMARY_LENGTH) } : {}),
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
upload(key) {
|
|
131
|
+
if (!this.files.some((f) => f.name === key)) {
|
|
132
|
+
return Promise.reject(new HugError('not_declared', `'${key}' is not one of this Hug's upload slots (${this.files.map((f) => f.name).join(', ') || 'none'})`));
|
|
133
|
+
}
|
|
134
|
+
const id = this.id('u');
|
|
135
|
+
return new Promise((resolve, reject) => {
|
|
136
|
+
this.uploads.set(id, { resolve, reject });
|
|
137
|
+
this.send({ type: 'upload', id, key });
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
read_file(ref) {
|
|
141
|
+
const id = this.id('r');
|
|
142
|
+
return new Promise((resolve, reject) => {
|
|
143
|
+
this.reads.set(id, { resolve, reject });
|
|
144
|
+
this.send({ type: 'read_file', id, ref });
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
async file_url(ref) {
|
|
148
|
+
const url = URL.createObjectURL(await this.read_file(ref));
|
|
149
|
+
this.object_urls.push(url);
|
|
150
|
+
return url;
|
|
151
|
+
}
|
|
152
|
+
download(ref) {
|
|
153
|
+
this.send({ type: 'download', ref });
|
|
154
|
+
}
|
|
155
|
+
open_link(url) {
|
|
156
|
+
this.send({ type: 'open_link', url });
|
|
157
|
+
}
|
|
158
|
+
on(event, fn) {
|
|
159
|
+
const set = this.listeners.get(event) ?? new Set();
|
|
160
|
+
set.add(fn);
|
|
161
|
+
this.listeners.set(event, set);
|
|
162
|
+
return () => { set.delete(fn); };
|
|
163
|
+
}
|
|
164
|
+
resize(height) {
|
|
165
|
+
this.send({ type: 'resize', height: Math.max(0, Math.ceil(height)) });
|
|
166
|
+
}
|
|
167
|
+
auto_resize(el = document.documentElement) {
|
|
168
|
+
let last = -1;
|
|
169
|
+
const measure = () => {
|
|
170
|
+
const h = Math.ceil(el.scrollHeight);
|
|
171
|
+
if (h !== last) {
|
|
172
|
+
last = h;
|
|
173
|
+
this.resize(h);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
measure();
|
|
177
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
178
|
+
const ro = new ResizeObserver(measure);
|
|
179
|
+
ro.observe(el);
|
|
180
|
+
return () => ro.disconnect();
|
|
181
|
+
}
|
|
182
|
+
const mo = new MutationObserver(measure);
|
|
183
|
+
mo.observe(el, { subtree: true, childList: true, attributes: true, characterData: true });
|
|
184
|
+
return () => mo.disconnect();
|
|
185
|
+
}
|
|
186
|
+
dispose() {
|
|
187
|
+
this.stop();
|
|
188
|
+
if (this.values_timer)
|
|
189
|
+
clearTimeout(this.values_timer);
|
|
190
|
+
for (const p of [...this.uploads.values(), ...this.reads.values()])
|
|
191
|
+
p.reject(new HugError('upload_failed', 'The hug was closed'));
|
|
192
|
+
this.uploads.clear();
|
|
193
|
+
this.reads.clear();
|
|
194
|
+
for (const url of this.object_urls.splice(0))
|
|
195
|
+
URL.revokeObjectURL(url);
|
|
196
|
+
this.listeners.clear();
|
|
197
|
+
}
|
|
198
|
+
id(prefix) {
|
|
199
|
+
this.next_id += 1;
|
|
200
|
+
return `${prefix}${this.next_id}`;
|
|
201
|
+
}
|
|
202
|
+
send(body) {
|
|
203
|
+
this.transport.send({ v: BRIDGE_VERSION, ...body });
|
|
204
|
+
}
|
|
205
|
+
emit(event, payload) {
|
|
206
|
+
for (const fn of this.listeners.get(event) ?? [])
|
|
207
|
+
fn(payload);
|
|
208
|
+
}
|
|
209
|
+
/** Handle one message from the host (anything malformed is ignored). */
|
|
210
|
+
receive(data) {
|
|
211
|
+
const parsed = parse_host_message(data);
|
|
212
|
+
if (!parsed.ok)
|
|
213
|
+
return;
|
|
214
|
+
const m = parsed.message;
|
|
215
|
+
switch (m.type) {
|
|
216
|
+
case 'init':
|
|
217
|
+
return;
|
|
218
|
+
case 'update':
|
|
219
|
+
return this.on_update(m);
|
|
220
|
+
case 'status':
|
|
221
|
+
return this.on_status(m);
|
|
222
|
+
case 'mode':
|
|
223
|
+
return this.on_mode(m);
|
|
224
|
+
case 'upload_result':
|
|
225
|
+
return this.settle(this.uploads, m.id, m.ok && m.ref ? m.ref : null, () => upload_error(m.error));
|
|
226
|
+
case 'file':
|
|
227
|
+
return this.settle(this.reads, m.id, m.ok && m.blob ? m.blob : null, () => read_error(m.error));
|
|
228
|
+
case 'submit_result':
|
|
229
|
+
return this.on_submit_result(m);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
on_update(m) {
|
|
233
|
+
if (m.progress !== undefined)
|
|
234
|
+
this.progress = m.progress;
|
|
235
|
+
const payload = {};
|
|
236
|
+
if (m.progress !== undefined)
|
|
237
|
+
payload.progress = m.progress;
|
|
238
|
+
if (m.expires_at !== undefined)
|
|
239
|
+
payload.expires_at = m.expires_at;
|
|
240
|
+
this.emit('update', payload);
|
|
241
|
+
}
|
|
242
|
+
on_status(m) {
|
|
243
|
+
this.status = m.status;
|
|
244
|
+
this.mode = 'view';
|
|
245
|
+
this.viewing = m.viewing;
|
|
246
|
+
this.emit('status', { status: m.status, mode: 'view' });
|
|
247
|
+
}
|
|
248
|
+
on_mode(m) {
|
|
249
|
+
this.mode = m.mode;
|
|
250
|
+
this.viewing = m.viewing;
|
|
251
|
+
this.mine = m.mine;
|
|
252
|
+
this.draft = m.draft;
|
|
253
|
+
const start = (this.draft ?? this.mine?.values ?? null);
|
|
254
|
+
this.emit('mode', { mode: m.mode, viewing: this.viewing, start });
|
|
255
|
+
}
|
|
256
|
+
on_submit_result(m) {
|
|
257
|
+
if (!m.ok) {
|
|
258
|
+
this.emit('submit_failed', m.problems ?? []);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (!m.answer)
|
|
262
|
+
return;
|
|
263
|
+
this.mine = m.answer;
|
|
264
|
+
this.emit('submitted', this.mine);
|
|
265
|
+
}
|
|
266
|
+
settle(map, id, value, error) {
|
|
267
|
+
const pending = map.get(id);
|
|
268
|
+
if (!pending)
|
|
269
|
+
return;
|
|
270
|
+
map.delete(id);
|
|
271
|
+
if (value === null)
|
|
272
|
+
pending.reject(error());
|
|
273
|
+
else
|
|
274
|
+
pending.resolve(value);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/** Most problems one `values` message carries (the bridge's limit). */
|
|
278
|
+
const MAX_PROBLEMS = 200;
|
|
279
|
+
/** Text on one line, at most `max` characters (an ellipsis when cut). */
|
|
280
|
+
function one_line(text, max) {
|
|
281
|
+
const line = text.replace(/\s+/g, ' ').trim();
|
|
282
|
+
return line.length <= max ? line : `${line.slice(0, max - 1)}…`;
|
|
283
|
+
}
|
|
284
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,iBAAiB,CAAC,CAAG,uDAAuD;AACnF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,UAAU,EAAc,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAkB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EACH,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAA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;QACX,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,MAAM;YAAE,OAAO;QACtB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,MAAmB,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAEO,MAAM,CAAI,GAA4B,EAAE,EAAU,EAAE,KAAe,EAAE,KAAkB;QAC3F,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACf,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;;YACvC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACJ;AAID,uEAAuE;AACvE,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB,yEAAyE;AACzE,SAAS,QAAQ,CAAC,IAAY,EAAE,GAAW;IACvC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,OAAO,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared hug modules (PLAN-hug-widgets §9.2), published as `@getcliqio/cliq-sdk/hug-bridge`: the bridge message
|
|
3
|
+
* schemas, `define_hug` and `file`, `schema_for_inputs`, and the problem helpers. Used by the host half of the bridge
|
|
4
|
+
* (the Hub page, cliqd's local page), compiled into `@getcliqio/hug-frontend`, and imported by agent code.
|
|
5
|
+
*
|
|
6
|
+
* Browser-safe and Node-safe: imports only `zod` and these modules — never Node APIs, never the rest of the SDK.
|
|
7
|
+
*/
|
|
8
|
+
export * from './messages.js';
|
|
9
|
+
export { define_hug, file, file_slots_of, FileRefSchema, HUG_NAME_RE, MAX_FILES_PER_SLOT, MAX_SUMMARY_LENGTH } from '../define.js';
|
|
10
|
+
export type { FileRef, FileSlot, HugDefinition, HugDescription, HugSpec } from '../define.js';
|
|
11
|
+
export { schema_for_inputs } from '../schema_for_inputs.js';
|
|
12
|
+
export { path_of, problems_from_zod, problems_text } from '../problems.js';
|
|
13
|
+
export type { Checked, Problem } from '../problems.js';
|
|
14
|
+
export { RequestedInputSchema, RequestedInputsSchema, validate_values } from '../requested_inputs.js';
|
|
15
|
+
export type { RequestedInput } from '../requested_inputs.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/bridge/index.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACnI,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC3E,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACtG,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// GENERATED by packages/hug-frontend/scripts/sync_shared.mjs from cliq-sdk/src/hug — do not edit.
|
|
2
|
+
/**
|
|
3
|
+
* The shared hug modules (PLAN-hug-widgets §9.2), published as `@getcliqio/cliq-sdk/hug-bridge`: the bridge message
|
|
4
|
+
* schemas, `define_hug` and `file`, `schema_for_inputs`, and the problem helpers. Used by the host half of the bridge
|
|
5
|
+
* (the Hub page, cliqd's local page), compiled into `@getcliqio/hug-frontend`, and imported by agent code.
|
|
6
|
+
*
|
|
7
|
+
* Browser-safe and Node-safe: imports only `zod` and these modules — never Node APIs, never the rest of the SDK.
|
|
8
|
+
*/
|
|
9
|
+
export * from './messages.js';
|
|
10
|
+
export { define_hug, file, file_slots_of, FileRefSchema, HUG_NAME_RE, MAX_FILES_PER_SLOT, MAX_SUMMARY_LENGTH } from '../define.js';
|
|
11
|
+
export { schema_for_inputs } from '../schema_for_inputs.js';
|
|
12
|
+
export { path_of, problems_from_zod, problems_text } from '../problems.js';
|
|
13
|
+
export { RequestedInputSchema, RequestedInputsSchema, validate_values } from '../requested_inputs.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/bridge/index.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG;;;;;;GAMG;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEnI,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|