ziex 0.1.0-dev.1389 → 0.1.0-dev.1466
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 +4 -1
- package/app.d.ts +6 -6
- package/build.zig.zon +1 -1
- package/index.js +490 -174
- package/package.json +7 -5
- package/{aws-lambda → platforms/aws-lambda}/index.js +1 -1
- package/platforms/cloudflare/app.d.ts +2 -0
- package/platforms/cloudflare/db.d.ts +6 -0
- package/{cloudflare → platforms/cloudflare}/do.d.ts +5 -5
- package/platforms/cloudflare/index.d.ts +4 -0
- package/{cloudflare → platforms/cloudflare}/index.js +1959 -1532
- package/platforms/cloudflare/kv.d.ts +5 -0
- package/platforms/cloudflare/worker.d.ts +3 -0
- package/{vercel → platforms/vercel}/index.js +1 -1
- package/runtime/db/extern.d.ts +38 -0
- package/runtime/db/sqlite.d.ts +7 -0
- package/runtime/db.d.ts +3 -0
- package/runtime/db.js +419 -0
- package/{fetch.d.ts → runtime/fetch.d.ts} +1 -1
- package/{runtime.d.ts → runtime/index.d.ts} +6 -15
- package/runtime/kv/extern.d.ts +11 -0
- package/runtime/kv/indexdb.d.ts +7 -0
- package/runtime/kv/localstorage.d.ts +6 -0
- package/runtime/kv/memory.d.ts +6 -0
- package/runtime/kv.d.ts +45 -0
- package/runtime/kv.js +543 -0
- package/wasm/constants.d.ts +33 -0
- package/wasm/core.d.ts +23 -33
- package/wasm/dom_cmd.d.ts +15 -0
- package/wasm/generated/event_bits.d.ts +2 -0
- package/wasm/generated/events.d.ts +1 -0
- package/wasm/generated/tag_indices.d.ts +2 -0
- package/wasm/generated/tags.d.ts +1 -0
- package/wasm/index.d.ts +15 -13
- package/wasm/index.js +911 -676
- package/wasm/init.dev.js +895 -674
- package/wasm/init.js +3 -3
- package/wasm/wasi.d.ts +1 -5
- package/browser/kv.d.ts +0 -13
- package/cloudflare/app.d.ts +0 -2
- package/cloudflare/db.d.ts +0 -2
- package/cloudflare/index.d.ts +0 -4
- package/cloudflare/kv.d.ts +0 -2
- package/cloudflare/worker.d.ts +0 -3
- package/db.d.ts +0 -22
- package/kv.d.ts +0 -42
- /package/{aws-lambda → platforms/aws-lambda}/index.d.ts +0 -0
- /package/{vercel → platforms/vercel}/index.d.ts +0 -0
- /package/{wasi.d.ts → runtime/wasi.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TAG_NAMES: readonly ['aside', 'fragment', 'iframe', 'slot', 'img', 'html', 'base', 'head', 'link', 'meta', 'script', 'style', 'title', 'address', 'article', 'body', 'h1', 'h6', 'footer', 'header', 'h2', 'h3', 'h4', 'h5', 'hgroup', 'nav', 'section', 'dd', 'dl', 'dt', 'div', 'figcaption', 'figure', 'hr', 'li', 'ol', 'ul', 'menu', 'main', 'p', 'picture', 'pre', 'a', 'abbr', 'b', 'bdi', 'bdo', 'br', 'cite', 'code', 'data', 'time', 'dfn', 'em', 'i', 'kbd', 'mark', 'q', 'blockquote', 'rp', 'ruby', 'rt', 'rtc', 'rb', 's', 'del', 'ins', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'u', 'var', 'wbr', 'area', 'map', 'audio', 'source', 'track', 'video', 'embed', 'object', 'param', 'canvas', 'noscript', 'caption', 'table', 'col', 'colgroup', 'tbody', 'tr', 'thead', 'tfoot', 'td', 'th', 'button', 'datalist', 'option', 'fieldset', 'label', 'form', 'input', 'keygen', 'legend', 'meter', 'optgroup', 'select', 'output', 'progress', 'textarea', 'details', 'dialog', 'menuitem', 'summary', 'content', 'element', 'shadow', 'template', 'acronym', 'applet', 'basefont', 'font', 'big', 'blink', 'center', 'command', 'dir', 'frame', 'frameset', 'isindex', 'listing', 'marquee', 'noembed', 'plaintext', 'spacer', 'strike', 'tt', 'xmp', 'animate', 'animateMotion', 'animateTransform', 'circle', 'clipPath', 'defs', 'desc', 'ellipse', 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'stop', 'svg', 'switch', 'symbol', 'text', 'textPath', 'tspan', 'use', 'view', 'custom'];
|
package/wasm/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { CallbackType_Event, CallbackType_FetchSuccess, CallbackType_FetchError, CallbackType_Timeout, CallbackType_Interval, CallbackType_WebSocketOpen, CallbackType_WebSocketMessage, CallbackType_WebSocketError, CallbackType_WebSocketClose, } from "./constants";
|
|
2
|
+
export { jsz, storeValueGetRef, loadValueFromRef, releaseValueRef, textDecoder, textEncoder, getMemoryView, readString, writeBytes, writeBytesOut, writeJsonOut, bindWasmAlloc, ZxBridgeCore, } from "./core";
|
|
3
|
+
export type { CallbackTypeValue, WasmAllocRef } from "./core";
|
|
3
4
|
import { ZxBridgeCore } from "./core";
|
|
4
|
-
import { type KVNamespace } from "../kv";
|
|
5
|
+
import { type KVNamespace } from "../runtime/kv";
|
|
5
6
|
/**
|
|
6
7
|
* Browser ZX Bridge - extends ZxBridgeCore with DOM, WebSocket, and form-action support.
|
|
7
8
|
* Import this from environments that have access to browser globals.
|
|
@@ -10,14 +11,15 @@ import { type KVNamespace } from "../kv";
|
|
|
10
11
|
export declare class ZxBridge extends ZxBridgeCore {
|
|
11
12
|
#private;
|
|
12
13
|
constructor(exports: WebAssembly.Exports);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
hasEventHandler(velementId: number, eventTypeId: number): boolean;
|
|
15
|
+
eventMaySuspend(velementId: number, eventTypeId: number): boolean;
|
|
16
|
+
setEventHandlerMode(velementId: number, eventTypeId: number, maySuspend: boolean): void;
|
|
17
|
+
clearEventHandlerModes(velementId: number): void;
|
|
16
18
|
/** Submit a form action with bound-state round-trip. */
|
|
17
19
|
submitFormActionAsync(form: HTMLFormElement, actionId: number, statesJson: string, fetchId: bigint): void;
|
|
18
20
|
/**
|
|
19
21
|
* Create and connect a WebSocket.
|
|
20
|
-
*
|
|
22
|
+
* Completes via `__zx_cb(ws_open|ws_message|ws_error|ws_close, ...)`.
|
|
21
23
|
*/
|
|
22
24
|
wsConnect(wsId: bigint, urlPtr: number, urlLen: number, protocolsPtr: number, protocolsLen: number): void;
|
|
23
25
|
/** Send data over WebSocket */
|
|
@@ -25,12 +27,13 @@ export declare class ZxBridge extends ZxBridgeCore {
|
|
|
25
27
|
/** Close WebSocket connection */
|
|
26
28
|
wsClose(wsId: bigint, code: number, reasonPtr: number, reasonLen: number): void;
|
|
27
29
|
dispose(): void;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Dispatch to WASM for one vnode. Caller owns `eventRef` lifetime
|
|
32
|
+
* (store once per bubble, release after sync/async work completes).
|
|
33
|
+
*/
|
|
34
|
+
eventbridge(velementId: number, eventTypeId: number, eventRef: bigint): void | Promise<void>;
|
|
30
35
|
/** Create the full browser import object for WASM instantiation (includes DOM + WebSocket). */
|
|
31
|
-
static createImportObject(bridgeRef:
|
|
32
|
-
current: ZxBridge | null;
|
|
33
|
-
}): WebAssembly.Imports;
|
|
36
|
+
static createImportObject(bridgeRef: [ZxBridge | null]): WebAssembly.Imports;
|
|
34
37
|
}
|
|
35
38
|
/** Initialize event delegation */
|
|
36
39
|
export declare function initEventDelegation(bridge: ZxBridge, rootSelector?: string): () => void;
|
|
@@ -58,7 +61,6 @@ export declare function init(options?: InitOptions): Promise<{
|
|
|
58
61
|
bridge: ZxBridge;
|
|
59
62
|
}>;
|
|
60
63
|
declare global {
|
|
61
|
-
const __DEV__: boolean;
|
|
62
64
|
interface HTMLElement {
|
|
63
65
|
__zx_ref?: number;
|
|
64
66
|
}
|