@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/README.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @getcliqio/hug-frontend
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Write the page people answer a Hug on — a **hug**. A hug is a small web page and a definition of what it is asked
|
|
4
|
+
(params) and what a valid answer is (values); CliqHub and cliqd show it in a sandboxed frame.
|
|
5
|
+
|
|
6
|
+
```ts
|
|
7
|
+
import { define_hug, file } from '@getcliqio/hug-frontend/define'; // the definition (also used by agents)
|
|
8
|
+
import { mount_hug, html } from '@getcliqio/hug-frontend'; // the page
|
|
9
|
+
import '@getcliqio/hug-frontend/ui'; // the UI kit (looks like the Hub)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
| Entry | |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `@getcliqio/hug-frontend` | `mount_hug`, `html`, and the runtime API (`connect`) |
|
|
15
|
+
| `/define` | `define_hug`, `file` — the definition, browser and Node safe |
|
|
16
|
+
| `/ui` | The UI kit: `<cliq-field>`, `<cliq-choice-group>`, `<cliq-file>`, `<cliq-attachment>`, … |
|
|
17
|
+
| `/react` | `useHug`, `<HugRoot>`, `<DefaultView>` |
|
|
18
|
+
| `/testing` | `mock_host` — a stand-in for the Hub page in tests |
|
|
19
|
+
| `/build` | `hug_esbuild_plugins()` for a hug's build |
|
|
20
|
+
| `/host` | The host half of the bridge (the Hub page and cliqd's page) |
|
|
21
|
+
|
|
22
|
+
Start with `cliq hug new <name>`. Docs: [Hugs](https://docs.getcliq.io/hugs/overview), the
|
|
23
|
+
[tutorial](https://docs.getcliq.io/hugs/tutorial), and the [examples](https://github.com/getcliqio/cliq/tree/main/examples/hugs).
|
|
24
|
+
|
|
25
|
+
## Develop
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm run build # syncs the shared modules from ../../src/hug, compiles, embeds the fonts
|
|
29
|
+
npx vitest run
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The shared modules (`src/shared/`) are copied from cliq-sdk's `src/hug` by `npm run sync` — edit them there.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page's base styles: Hub colours on the body, the default view, error panels. Added by `mount_hug` and `useHug`.
|
|
3
|
+
*/
|
|
4
|
+
/** Page styles for the default view and error panels (once per page). */
|
|
5
|
+
export declare function add_base_css(): void;
|
|
6
|
+
//# sourceMappingURL=base_css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base_css.d.ts","sourceRoot":"","sources":["../src/base_css.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkBH,yEAAyE;AACzE,wBAAgB,YAAY,IAAI,IAAI,CAMnC"}
|
package/dist/base_css.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page's base styles: Hub colours on the body, the default view, error panels. Added by `mount_hug` and `useHug`.
|
|
3
|
+
*/
|
|
4
|
+
const BASE_CSS = `
|
|
5
|
+
:root { color-scheme: light dark; }
|
|
6
|
+
body { margin: 0; background: var(--cliq-bg, Canvas); color: var(--cliq-ink, CanvasText);
|
|
7
|
+
font: 14px/1.5 Geist, system-ui, sans-serif; }
|
|
8
|
+
.cliq-hug { padding: 2px; }
|
|
9
|
+
.cliq-error { border: 1px solid var(--cliq-bad, #c33); border-radius: 8px; padding: 12px 14px; color: var(--cliq-bad, #c33); }
|
|
10
|
+
.cliq-error ul { margin: 6px 0 0; padding-left: 18px; }
|
|
11
|
+
.cliq-view dl { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: 6px 16px; margin: 0; }
|
|
12
|
+
.cliq-view dt { color: var(--cliq-ink-2, GrayText); }
|
|
13
|
+
.cliq-view dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
14
|
+
.cliq-view ul { margin: 0; padding-left: 18px; }
|
|
15
|
+
.cliq-view .cliq-file-link { background: none; border: 0; padding: 0; color: var(--cliq-acc, LinkText); cursor: pointer; font: inherit; text-decoration: underline; }
|
|
16
|
+
.cliq-view .cliq-who { color: var(--cliq-ink-3, GrayText); font-size: 12px; margin-bottom: 8px; }
|
|
17
|
+
.cliq-empty { color: var(--cliq-ink-3, GrayText); }
|
|
18
|
+
`;
|
|
19
|
+
/** Page styles for the default view and error panels (once per page). */
|
|
20
|
+
export function add_base_css() {
|
|
21
|
+
if (document.getElementById('cliq-base-css'))
|
|
22
|
+
return;
|
|
23
|
+
const style = document.createElement('style');
|
|
24
|
+
style.id = 'cliq-base-css';
|
|
25
|
+
style.textContent = BASE_CSS;
|
|
26
|
+
document.head.append(style);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=base_css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base_css.js","sourceRoot":"","sources":["../src/base_css.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;CAchB,CAAC;AAEF,yEAAyE;AACzE,MAAM,UAAU,YAAY;IACxB,IAAI,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC;QAAE,OAAO;IACrD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,GAAG,eAAe,CAAC;IAC3B,KAAK,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC"}
|
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@getcliqio/hug-frontend/build` — what a hug's build (its `build.mjs`, run by `cliq hug build`) passes to esbuild.
|
|
3
|
+
* Node-side only; a hug's page never imports it.
|
|
4
|
+
*
|
|
5
|
+
* import { hug_esbuild_plugins } from '@getcliqio/hug-frontend/build';
|
|
6
|
+
* await build({ entryPoints: ['src/main.ts'], bundle: true, plugins: hug_esbuild_plugins(), … });
|
|
7
|
+
*
|
|
8
|
+
* Today it holds one plugin, {@link zod_english_only}. Builds that use this list get later build fixes too.
|
|
9
|
+
*/
|
|
10
|
+
/** The part of esbuild's plugin API used here (structurally an esbuild `Plugin`, without depending on esbuild). */
|
|
11
|
+
export interface EsbuildPlugin {
|
|
12
|
+
name: string;
|
|
13
|
+
setup(build: {
|
|
14
|
+
onResolve(options: {
|
|
15
|
+
filter: RegExp;
|
|
16
|
+
}, callback: (args: {
|
|
17
|
+
path: string;
|
|
18
|
+
importer: string;
|
|
19
|
+
resolveDir: string;
|
|
20
|
+
}) => {
|
|
21
|
+
path: string;
|
|
22
|
+
namespace: string;
|
|
23
|
+
} | undefined): void;
|
|
24
|
+
onLoad(options: {
|
|
25
|
+
filter: RegExp;
|
|
26
|
+
namespace: string;
|
|
27
|
+
}, callback: (args: {
|
|
28
|
+
path: string;
|
|
29
|
+
}) => {
|
|
30
|
+
contents: string;
|
|
31
|
+
resolveDir: string;
|
|
32
|
+
loader: 'js';
|
|
33
|
+
}): void;
|
|
34
|
+
}): void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Zod's error messages in English only. `import { z } from 'zod'` brings `z.locales` — about 40 languages, some
|
|
38
|
+
* 600 KB minified — which a bundler can't drop because the namespace is an object. Hugs only use English (zod's
|
|
39
|
+
* default), so zod's `locales/index.js` is replaced with one that exports `en` alone. A hug that switches zod to
|
|
40
|
+
* another language (`z.config(z.locales.fr())`) would need to leave this plugin out.
|
|
41
|
+
*/
|
|
42
|
+
export declare function zod_english_only(): EsbuildPlugin;
|
|
43
|
+
/** The esbuild plugins every hug's build uses (both builds: the page and `definition.mjs`). */
|
|
44
|
+
export declare function hug_esbuild_plugins(): EsbuildPlugin[];
|
|
45
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mHAAmH;AACnH,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,KAAK,EAAE;QACT,SAAS,CAAC,OAAO,EAAE;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,KAC1G;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,GAAG,SAAS,GAAG,IAAI,CAAC;QAC3D,MAAM,CAAC,OAAO,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,KACpF;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,IAAI,CAAA;SAAE,GAAG,IAAI,CAAC;KACrE,GAAG,IAAI,CAAC;CACZ;AASD;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAiBhD;AAED,+FAA+F;AAC/F,wBAAgB,mBAAmB,IAAI,aAAa,EAAE,CAErD"}
|
package/dist/build.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@getcliqio/hug-frontend/build` — what a hug's build (its `build.mjs`, run by `cliq hug build`) passes to esbuild.
|
|
3
|
+
* Node-side only; a hug's page never imports it.
|
|
4
|
+
*
|
|
5
|
+
* import { hug_esbuild_plugins } from '@getcliqio/hug-frontend/build';
|
|
6
|
+
* await build({ entryPoints: ['src/main.ts'], bundle: true, plugins: hug_esbuild_plugins(), … });
|
|
7
|
+
*
|
|
8
|
+
* Today it holds one plugin, {@link zod_english_only}. Builds that use this list get later build fixes too.
|
|
9
|
+
*/
|
|
10
|
+
const NAMESPACE = 'cliq-zod-locales';
|
|
11
|
+
/** A module path's folder (POSIX paths, as esbuild gives them on macOS and Linux). */
|
|
12
|
+
function folder_of(file) {
|
|
13
|
+
return file.slice(0, file.lastIndexOf('/'));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Zod's error messages in English only. `import { z } from 'zod'` brings `z.locales` — about 40 languages, some
|
|
17
|
+
* 600 KB minified — which a bundler can't drop because the namespace is an object. Hugs only use English (zod's
|
|
18
|
+
* default), so zod's `locales/index.js` is replaced with one that exports `en` alone. A hug that switches zod to
|
|
19
|
+
* another language (`z.config(z.locales.fr())`) would need to leave this plugin out.
|
|
20
|
+
*/
|
|
21
|
+
export function zod_english_only() {
|
|
22
|
+
return {
|
|
23
|
+
name: 'cliq-zod-english-only',
|
|
24
|
+
setup(build) {
|
|
25
|
+
build.onResolve({ filter: /(^|\/)locales\/index\.js$/ }, (args) => {
|
|
26
|
+
if (!/[/\\]node_modules[/\\]zod[/\\]/.test(args.importer))
|
|
27
|
+
return undefined;
|
|
28
|
+
// Where the real index lives, so `./en.js` resolves next to it.
|
|
29
|
+
const file = new URL(args.path, `file://${args.resolveDir}/`).pathname;
|
|
30
|
+
return { path: file, namespace: NAMESPACE };
|
|
31
|
+
});
|
|
32
|
+
build.onLoad({ filter: /.*/, namespace: NAMESPACE }, (args) => ({
|
|
33
|
+
contents: 'export { default as en } from "./en.js";\n',
|
|
34
|
+
resolveDir: folder_of(args.path),
|
|
35
|
+
loader: 'js',
|
|
36
|
+
}));
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** The esbuild plugins every hug's build uses (both builds: the page and `definition.mjs`). */
|
|
41
|
+
export function hug_esbuild_plugins() {
|
|
42
|
+
return [zod_english_only()];
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names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time (`<cliq-file>` uploads through it,
|
|
3
|
+
* `<cliq-attachment>` reads through it). `mount_hug` and `useHug` set it; a page on the raw API calls `use_hug_for_ui`.
|
|
4
|
+
*/
|
|
5
|
+
import type { Hug } from './runtime.js';
|
|
6
|
+
/** Let the UI kit's elements reach this Hug. */
|
|
7
|
+
export declare function use_hug_for_ui(hug: Hug<unknown, never> | null): void;
|
|
8
|
+
/** The Hug the UI kit's elements use, or null before one is connected. */
|
|
9
|
+
export declare function current_hug(): Hug<unknown, Record<string, unknown>> | null;
|
|
10
|
+
//# sourceMappingURL=current.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"current.d.ts","sourceRoot":"","sources":["../src/current.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAIxC,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,IAAI,GAAG,IAAI,CAEpE;AAED,0EAA0E;AAC1E,wBAAgB,WAAW,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAE1E"}
|
package/dist/current.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hug this page is drawing, for the UI kit's elements that need the runtime (`<cliq-file>` uploads through it,
|
|
3
|
+
* `<cliq-attachment>` reads through it). `mount_hug` and `useHug` set it; a page on the raw API calls `use_hug_for_ui`.
|
|
4
|
+
*/
|
|
5
|
+
let current = null;
|
|
6
|
+
/** Let the UI kit's elements reach this Hug. */
|
|
7
|
+
export function use_hug_for_ui(hug) {
|
|
8
|
+
current = hug;
|
|
9
|
+
}
|
|
10
|
+
/** The Hug the UI kit's elements use, or null before one is connected. */
|
|
11
|
+
export function current_hug() {
|
|
12
|
+
return current;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=current.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"current.js","sourceRoot":"","sources":["../src/current.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,IAAI,OAAO,GAAiD,IAAI,CAAC;AAEjE,gDAAgD;AAChD,MAAM,UAAU,cAAc,CAAC,GAA+B;IAC1D,OAAO,GAAG,GAAmD,CAAC;AAClE,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,WAAW;IACvB,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@getcliqio/hug-frontend/define` — what a hug's `hug.ts` imports (PLAN-hug-widgets §9.2.0). Pure (Zod only): the same
|
|
3
|
+
* file runs in the frontend's bundle and in agent code, so it never imports the DOM runtime.
|
|
4
|
+
*/
|
|
5
|
+
export { define_hug, file, file_slots_of, FileRefSchema, HUG_NAME_RE, MAX_FILES_PER_SLOT, MAX_SUMMARY_LENGTH } from './shared/define.js';
|
|
6
|
+
export type { FileRef, FileSlot, HugDefinition, HugDescription, HugSpec } from './shared/define.js';
|
|
7
|
+
export { schema_for_inputs } from './shared/schema_for_inputs.js';
|
|
8
|
+
export { path_of, problems_from_zod, problems_text } from './shared/problems.js';
|
|
9
|
+
export type { Checked, Problem } from './shared/problems.js';
|
|
10
|
+
export { RequestedInputSchema, RequestedInputsSchema } from './shared/requested_inputs.js';
|
|
11
|
+
export type { RequestedInput } from './shared/requested_inputs.js';
|
|
12
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACzI,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACjF,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,YAAY,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/define.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@getcliqio/hug-frontend/define` — what a hug's `hug.ts` imports (PLAN-hug-widgets §9.2.0). Pure (Zod only): the same
|
|
3
|
+
* file runs in the frontend's bundle and in agent code, so it never imports the DOM runtime.
|
|
4
|
+
*/
|
|
5
|
+
export { define_hug, file, file_slots_of, FileRefSchema, HUG_NAME_RE, MAX_FILES_PER_SLOT, MAX_SUMMARY_LENGTH } from './shared/define.js';
|
|
6
|
+
export { schema_for_inputs } from './shared/schema_for_inputs.js';
|
|
7
|
+
export { path_of, problems_from_zod, problems_text } from './shared/problems.js';
|
|
8
|
+
export { RequestedInputSchema, RequestedInputsSchema } from './shared/requested_inputs.js';
|
|
9
|
+
//# sourceMappingURL=define.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEzI,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Errors the runtime raises (PLAN-hug-widgets §9.2.3). Every one has a `code` a frontend can branch on.
|
|
3
|
+
*/
|
|
4
|
+
/** Why a runtime call failed. */
|
|
5
|
+
export type HugErrorCode = 'not_in_runtime' | 'protocol_unsupported' | 'timeout' | 'not_declared' | 'upload_cancelled' | 'file_too_large' | 'file_type' | 'upload_failed' | 'read_denied' | 'rate_limited' | 'read_failed';
|
|
6
|
+
/** An error from the Hug runtime. */
|
|
7
|
+
export declare class HugError extends Error {
|
|
8
|
+
readonly code: HugErrorCode;
|
|
9
|
+
constructor(code: HugErrorCode, message: string);
|
|
10
|
+
}
|
|
11
|
+
/** The error for a failed upload, from the host's error code (anything unknown is `upload_failed`). */
|
|
12
|
+
export declare function upload_error(code: string | undefined): HugError;
|
|
13
|
+
/** The error for a failed read, from the host's error code (anything unknown is `read_failed`). */
|
|
14
|
+
export declare function read_error(code: string | undefined): HugError;
|
|
15
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAClB,gBAAgB,GAChB,sBAAsB,GACtB,SAAS,GACT,cAAc,GACd,kBAAkB,GAClB,gBAAgB,GAChB,WAAW,GACX,eAAe,GACf,aAAa,GACb,cAAc,GACd,aAAa,CAAC;AAEpB,qCAAqC;AACrC,qBAAa,QAAS,SAAQ,KAAK;IACnB,QAAQ,CAAC,IAAI,EAAE,YAAY;gBAAlB,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM;CAI3D;AAKD,uGAAuG;AACvG,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAG/D;AAED,mGAAmG;AACnG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAG7D"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Errors the runtime raises (PLAN-hug-widgets §9.2.3). Every one has a `code` a frontend can branch on.
|
|
3
|
+
*/
|
|
4
|
+
/** An error from the Hug runtime. */
|
|
5
|
+
export class HugError extends Error {
|
|
6
|
+
code;
|
|
7
|
+
constructor(code, message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.name = 'HugError';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const UPLOAD_CODES = ['upload_cancelled', 'file_too_large', 'file_type', 'upload_failed'];
|
|
14
|
+
const READ_CODES = ['read_denied', 'rate_limited', 'read_failed'];
|
|
15
|
+
/** The error for a failed upload, from the host's error code (anything unknown is `upload_failed`). */
|
|
16
|
+
export function upload_error(code) {
|
|
17
|
+
const c = UPLOAD_CODES.find((x) => x === code) ?? 'upload_failed';
|
|
18
|
+
return new HugError(c, c === 'upload_cancelled' ? 'No file was chosen' : `The upload didn't go through (${code ?? 'unknown'})`);
|
|
19
|
+
}
|
|
20
|
+
/** The error for a failed read, from the host's error code (anything unknown is `read_failed`). */
|
|
21
|
+
export function read_error(code) {
|
|
22
|
+
const c = READ_CODES.find((x) => x === code) ?? 'read_failed';
|
|
23
|
+
return new HugError(c, `The file couldn't be read (${code ?? 'unknown'})`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgBH,qCAAqC;AACrC,MAAM,OAAO,QAAS,SAAQ,KAAK;IACV;IAArB,YAAqB,IAAkB,EAAE,OAAe;QACpD,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,SAAI,GAAJ,IAAI,CAAc;QAEnC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IAC3B,CAAC;CACJ;AAED,MAAM,YAAY,GAA4B,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;AACnH,MAAM,UAAU,GAA4B,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;AAE3F,uGAAuG;AACvG,MAAM,UAAU,YAAY,CAAC,IAAwB;IACjD,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,eAAe,CAAC;IAClE,OAAO,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,kBAAkB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,iCAAiC,IAAI,IAAI,SAAS,GAAG,CAAC,CAAC;AACpI,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,UAAU,CAAC,IAAwB;IAC/C,MAAM,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,aAAa,CAAC;IAC9D,OAAO,IAAI,QAAQ,CAAC,CAAC,EAAE,8BAA8B,IAAI,IAAI,SAAS,GAAG,CAAC,CAAC;AAC/E,CAAC"}
|
package/dist/host.d.ts
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@getcliqio/hug-frontend/host` — the host half of the bridge (PLAN-hug-widgets §6, §9.3): the sandboxed frame, the
|
|
3
|
+
* host's checks on every message (§6.3), uploads, reads, downloads and links through callbacks the page supplies (the
|
|
4
|
+
* Hub page calls Core; cliqd's page calls cliqd), and the answer state the page's own Submit button draws from. One
|
|
5
|
+
* implementation for the Hub page and cliqd's local page.
|
|
6
|
+
*
|
|
7
|
+
* The frontend never submits: the page calls `submit()` from its own button.
|
|
8
|
+
*/
|
|
9
|
+
import './zod_config.js';
|
|
10
|
+
import type { HugErrorCode } from './errors.js';
|
|
11
|
+
import type { Answer, FileRef, HugInfo, HugStatus, Mode, Values, Viewer } from './runtime.js';
|
|
12
|
+
import { type BridgeTheme } from './shared/bridge/messages.js';
|
|
13
|
+
import type { FileSlot } from './shared/define.js';
|
|
14
|
+
import type { Problem } from './shared/problems.js';
|
|
15
|
+
/** What the frame starts with (the `init` message, less the protocol fields). */
|
|
16
|
+
export interface HostInit<V extends Values = Values> {
|
|
17
|
+
readonly hug: HugInfo;
|
|
18
|
+
readonly params: unknown;
|
|
19
|
+
readonly files: readonly FileSlot[];
|
|
20
|
+
readonly attachments: readonly FileRef[];
|
|
21
|
+
readonly viewer: Viewer;
|
|
22
|
+
readonly mine: Answer<V> | null;
|
|
23
|
+
readonly viewing: Answer<V> | null;
|
|
24
|
+
readonly draft: V | null;
|
|
25
|
+
readonly progress: string | null;
|
|
26
|
+
readonly theme: BridgeTheme;
|
|
27
|
+
readonly locale: string;
|
|
28
|
+
readonly mode: Mode;
|
|
29
|
+
}
|
|
30
|
+
/** The frontend's latest answer state: what the page's Submit button draws from. */
|
|
31
|
+
export interface AnswerSnapshot<V extends Values = Values> {
|
|
32
|
+
readonly values: V;
|
|
33
|
+
readonly valid: boolean;
|
|
34
|
+
readonly problems: readonly Problem[];
|
|
35
|
+
readonly submit: {
|
|
36
|
+
readonly label: string;
|
|
37
|
+
readonly tone: 'primary' | 'danger';
|
|
38
|
+
};
|
|
39
|
+
readonly summary?: string;
|
|
40
|
+
}
|
|
41
|
+
/** What Submit got back from Core. */
|
|
42
|
+
export type SubmitOutcome<V extends Values = Values> = {
|
|
43
|
+
readonly ok: true;
|
|
44
|
+
readonly answer: Answer<V>;
|
|
45
|
+
} | {
|
|
46
|
+
readonly ok: false;
|
|
47
|
+
readonly problems: readonly Problem[];
|
|
48
|
+
};
|
|
49
|
+
/** A host error the page may want to log (a message refused, a check failed). */
|
|
50
|
+
export interface HostIssue {
|
|
51
|
+
readonly reason: string;
|
|
52
|
+
readonly message?: unknown;
|
|
53
|
+
}
|
|
54
|
+
/** How the page hosts a hug. */
|
|
55
|
+
export interface HugHostOptions<V extends Values = Values> {
|
|
56
|
+
/** Where the frame goes. */
|
|
57
|
+
readonly container: HTMLElement;
|
|
58
|
+
/** The bundle's entry, on the content origin (`https://content…/hb/<sha256>/index.html`). */
|
|
59
|
+
readonly src: string;
|
|
60
|
+
readonly init: HostInit<V>;
|
|
61
|
+
/** The frame's accessible name (default: the Hug's title). */
|
|
62
|
+
readonly title?: string;
|
|
63
|
+
/** `lazy` for frames in a responses list. */
|
|
64
|
+
readonly loading?: 'eager' | 'lazy';
|
|
65
|
+
/** Highest frame height in px (default 10 000). */
|
|
66
|
+
readonly max_height?: number;
|
|
67
|
+
/** Per page, total bytes the frame may read (default 50 MB). */
|
|
68
|
+
readonly max_read_bytes?: number;
|
|
69
|
+
/**
|
|
70
|
+
* The page's read budget, shared by every frame on it (a responses list has one frame per answer): pass the same
|
|
71
|
+
* object to each. Default: this frame's own.
|
|
72
|
+
*/
|
|
73
|
+
readonly read_budget?: ReadBudget;
|
|
74
|
+
/** The person picks a file for a declared slot and it's uploaded (through Core): its reference, or an error code. */
|
|
75
|
+
upload(slot: FileSlot): Promise<FileRef | HugErrorCode>;
|
|
76
|
+
/** A file's bytes, with the viewer's permissions: a Blob, or an error code. */
|
|
77
|
+
read(ref: FileRef): Promise<Blob | HugErrorCode>;
|
|
78
|
+
/** Save a file for the person. */
|
|
79
|
+
download(ref: FileRef): void;
|
|
80
|
+
/**
|
|
81
|
+
* Open a link. `listed` is true when the URL appears in the Hug's params (open it directly); otherwise show the
|
|
82
|
+
* person the full URL first. Resolve when done (one link dialog at a time).
|
|
83
|
+
*/
|
|
84
|
+
open_link(url: string, listed: boolean): Promise<void> | void;
|
|
85
|
+
/** The answer state changed: redraw Submit (label, tone, enabled), the problems count, keep the draft. */
|
|
86
|
+
on_state?(state: AnswerSnapshot<V>): void;
|
|
87
|
+
/** The frame's height changed. */
|
|
88
|
+
on_resize?(height: number): void;
|
|
89
|
+
/** A message was refused or a check failed. */
|
|
90
|
+
on_issue?(issue: HostIssue): void;
|
|
91
|
+
}
|
|
92
|
+
/** A hosted hug. */
|
|
93
|
+
export interface HugHost<V extends Values = Values> {
|
|
94
|
+
readonly frame: HTMLIFrameElement;
|
|
95
|
+
/** The latest answer state, or null before the frontend sent one. */
|
|
96
|
+
state(): AnswerSnapshot<V> | null;
|
|
97
|
+
/** The current mode. */
|
|
98
|
+
mode(): Mode;
|
|
99
|
+
/**
|
|
100
|
+
* The page's Submit: sends the latest valid answer through `send` (Core), tells the frame the result and, when it
|
|
101
|
+
* was stored, shows it read-only (§6.4 state 2). Does nothing in view mode or without a valid answer.
|
|
102
|
+
*/
|
|
103
|
+
submit(send: (values: V, summary: string | undefined) => Promise<SubmitOutcome<V>>): Promise<SubmitOutcome<V> | null>;
|
|
104
|
+
/** "Change answer" (`answer`, from `mine`) or "Cancel" / show an answer (`view`). */
|
|
105
|
+
set_mode(mode: Mode, viewing?: Answer<V> | null): void;
|
|
106
|
+
/** The Hug closed, expired or was cancelled: view mode. */
|
|
107
|
+
close(status: Exclude<HugStatus, 'open'>, viewing: Answer<V> | null): void;
|
|
108
|
+
/** The requester's progress or expiry changed. */
|
|
109
|
+
update(u: {
|
|
110
|
+
progress?: string | null;
|
|
111
|
+
expires_at?: string | null;
|
|
112
|
+
}): void;
|
|
113
|
+
/** Remove the frame and stop listening. */
|
|
114
|
+
destroy(): void;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The URLs in a Hug's params: every string that is one, and every one inside text (a markdown note, a prompt), also
|
|
118
|
+
* without trailing punctuation ("see https://x.example/a."). A link counts as listed only if it is one of these
|
|
119
|
+
* exactly — not a prefix of one.
|
|
120
|
+
*/
|
|
121
|
+
export declare function urls_in(value: unknown, out?: Set<string>, depth?: number): Set<string>;
|
|
122
|
+
/** Every file reference in an answer (objects with an `artifact_id`). */
|
|
123
|
+
export declare function file_refs_in(value: unknown, out?: FileRef[], depth?: number): FileRef[];
|
|
124
|
+
/**
|
|
125
|
+
* An answer as the bridge carries it (§6.1): its values, summary, responder and time — nothing else. Whatever else the
|
|
126
|
+
* page's own answer holds (a dev check, store ids) would make the frame drop the message as malformed.
|
|
127
|
+
*/
|
|
128
|
+
export declare function bridge_answer<V extends Values>(a: Answer<V> | null | undefined): Answer<V> | null;
|
|
129
|
+
/** Host a hug's frontend in a sandboxed frame. */
|
|
130
|
+
export declare function host_hug<V extends Values = Values>(opts: HugHostOptions<V>): HugHost<V>;
|
|
131
|
+
/** Bytes read so far by the frames sharing it (see {@link HugHostOptions.read_budget}). */
|
|
132
|
+
export interface ReadBudget {
|
|
133
|
+
used: number;
|
|
134
|
+
}
|
|
135
|
+
/** A read budget for one page, to share between its frames. */
|
|
136
|
+
export declare function read_budget(): ReadBudget;
|
|
137
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9F,OAAO,EAEH,KAAK,WAAW,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,iFAAiF;AACjF,MAAM,WAAW,QAAQ,CAAC,CAAC,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