@barefootjs/hono 0.31.0 → 0.31.2

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 (38) hide show
  1. package/dist/adapter/hono-adapter.d.ts +67 -2
  2. package/dist/adapter/hono-adapter.d.ts.map +1 -1
  3. package/dist/adapter/index.js +46 -187398
  4. package/dist/app.js +0 -71
  5. package/dist/async.js +0 -71
  6. package/dist/client-shim.js +0 -71
  7. package/dist/dev-worker.js +0 -71
  8. package/dist/dialog-context.js +0 -71
  9. package/dist/index.js +46 -187398
  10. package/dist/jsx/jsx-dev-runtime/index.d.ts +3 -1
  11. package/dist/jsx/jsx-dev-runtime/index.d.ts.map +1 -1
  12. package/dist/jsx/jsx-dev-runtime/index.js +14 -69
  13. package/dist/jsx/jsx-runtime/index.d.ts +4 -1
  14. package/dist/jsx/jsx-runtime/index.d.ts.map +1 -1
  15. package/dist/jsx/jsx-runtime/index.js +24 -69
  16. package/dist/jsx/resolve-dangerously-set-inner-html.d.ts +2 -0
  17. package/dist/jsx/resolve-dangerously-set-inner-html.d.ts.map +1 -0
  18. package/dist/portal-ssr.js +0 -71
  19. package/dist/portals.js +0 -71
  20. package/dist/preload.js +0 -71
  21. package/dist/render.js +0 -71
  22. package/dist/request-env.js +0 -71
  23. package/dist/scripts.d.ts +3 -2
  24. package/dist/scripts.d.ts.map +1 -1
  25. package/dist/scripts.js +0 -71
  26. package/dist/utils.js +0 -71
  27. package/dist/vite.js +313 -142
  28. package/package.json +2 -2
  29. package/src/__tests__/aliased-destructured-prop.test.ts +8 -7
  30. package/src/__tests__/consumer-typecheck.test.ts +403 -0
  31. package/src/__tests__/corpus-typecheck.test.ts +130 -0
  32. package/src/__tests__/dangerously-set-inner-html.test.ts +70 -0
  33. package/src/__tests__/nested-ternary-bare-branch.test.ts +70 -0
  34. package/src/adapter/hono-adapter.ts +123 -166
  35. package/src/jsx/jsx-dev-runtime/index.ts +13 -1
  36. package/src/jsx/jsx-runtime/index.ts +24 -1
  37. package/src/jsx/resolve-dangerously-set-inner-html.ts +34 -0
  38. package/src/scripts.tsx +3 -2
package/dist/app.js CHANGED
@@ -1,74 +1,3 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
28
- if (canCache)
29
- cache.set(mod, to);
30
- return to;
31
- };
32
- var __toCommonJS = (from) => {
33
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
34
- if (entry)
35
- return entry;
36
- entry = __defProp({}, "__esModule", { value: true });
37
- if (from && typeof from === "object" || typeof from === "function") {
38
- for (var key of __getOwnPropNames(from))
39
- if (!__hasOwnProp.call(entry, key))
40
- __defProp(entry, key, {
41
- get: __accessProp.bind(from, key),
42
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
43
- });
44
- }
45
- __moduleCache.set(from, entry);
46
- return entry;
47
- };
48
- var __moduleCache;
49
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
50
- var __returnValue = (v) => v;
51
- function __exportSetter(name, newValue) {
52
- this[name] = __returnValue.bind(null, newValue);
53
- }
54
- var __export = (target, all) => {
55
- for (var name in all)
56
- __defProp(target, name, {
57
- get: all[name],
58
- enumerable: true,
59
- configurable: true,
60
- set: __exportSetter.bind(all, name)
61
- });
62
- };
63
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
64
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
65
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
66
- }) : x)(function(x) {
67
- if (typeof require !== "undefined")
68
- return require.apply(this, arguments);
69
- throw Error('Dynamic require of "' + x + '" is not supported');
70
- });
71
-
72
1
  // src/dev-worker.ts
73
2
  var HEARTBEAT_MS = 5000;
74
3
  var BOOT_ID = generateBootId();
package/dist/async.js CHANGED
@@ -1,74 +1,3 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
28
- if (canCache)
29
- cache.set(mod, to);
30
- return to;
31
- };
32
- var __toCommonJS = (from) => {
33
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
34
- if (entry)
35
- return entry;
36
- entry = __defProp({}, "__esModule", { value: true });
37
- if (from && typeof from === "object" || typeof from === "function") {
38
- for (var key of __getOwnPropNames(from))
39
- if (!__hasOwnProp.call(entry, key))
40
- __defProp(entry, key, {
41
- get: __accessProp.bind(from, key),
42
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
43
- });
44
- }
45
- __moduleCache.set(from, entry);
46
- return entry;
47
- };
48
- var __moduleCache;
49
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
50
- var __returnValue = (v) => v;
51
- function __exportSetter(name, newValue) {
52
- this[name] = __returnValue.bind(null, newValue);
53
- }
54
- var __export = (target, all) => {
55
- for (var name in all)
56
- __defProp(target, name, {
57
- get: all[name],
58
- enumerable: true,
59
- configurable: true,
60
- set: __exportSetter.bind(all, name)
61
- });
62
- };
63
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
64
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
65
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
66
- }) : x)(function(x) {
67
- if (typeof require !== "undefined")
68
- return require.apply(this, arguments);
69
- throw Error('Dynamic require of "' + x + '" is not supported');
70
- });
71
-
72
1
  // src/async.tsx
73
2
  import { Suspense } from "hono/jsx/streaming";
74
3
  import { ErrorBoundary } from "hono/jsx";
@@ -1,74 +1,3 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
28
- if (canCache)
29
- cache.set(mod, to);
30
- return to;
31
- };
32
- var __toCommonJS = (from) => {
33
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
34
- if (entry)
35
- return entry;
36
- entry = __defProp({}, "__esModule", { value: true });
37
- if (from && typeof from === "object" || typeof from === "function") {
38
- for (var key of __getOwnPropNames(from))
39
- if (!__hasOwnProp.call(entry, key))
40
- __defProp(entry, key, {
41
- get: __accessProp.bind(from, key),
42
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
43
- });
44
- }
45
- __moduleCache.set(from, entry);
46
- return entry;
47
- };
48
- var __moduleCache;
49
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
50
- var __returnValue = (v) => v;
51
- function __exportSetter(name, newValue) {
52
- this[name] = __returnValue.bind(null, newValue);
53
- }
54
- var __export = (target, all) => {
55
- for (var name in all)
56
- __defProp(target, name, {
57
- get: all[name],
58
- enumerable: true,
59
- configurable: true,
60
- set: __exportSetter.bind(all, name)
61
- });
62
- };
63
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
64
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
65
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
66
- }) : x)(function(x) {
67
- if (typeof require !== "undefined")
68
- return require.apply(this, arguments);
69
- throw Error('Dynamic require of "' + x + '" is not supported');
70
- });
71
-
72
1
  // src/client-shim.ts
73
2
  import { createContext as honoCreateContext, useContext as honoUseContext, jsx } from "hono/jsx";
74
3
  import {
@@ -1,74 +1,3 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
28
- if (canCache)
29
- cache.set(mod, to);
30
- return to;
31
- };
32
- var __toCommonJS = (from) => {
33
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
34
- if (entry)
35
- return entry;
36
- entry = __defProp({}, "__esModule", { value: true });
37
- if (from && typeof from === "object" || typeof from === "function") {
38
- for (var key of __getOwnPropNames(from))
39
- if (!__hasOwnProp.call(entry, key))
40
- __defProp(entry, key, {
41
- get: __accessProp.bind(from, key),
42
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
43
- });
44
- }
45
- __moduleCache.set(from, entry);
46
- return entry;
47
- };
48
- var __moduleCache;
49
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
50
- var __returnValue = (v) => v;
51
- function __exportSetter(name, newValue) {
52
- this[name] = __returnValue.bind(null, newValue);
53
- }
54
- var __export = (target, all) => {
55
- for (var name in all)
56
- __defProp(target, name, {
57
- get: all[name],
58
- enumerable: true,
59
- configurable: true,
60
- set: __exportSetter.bind(all, name)
61
- });
62
- };
63
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
64
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
65
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
66
- }) : x)(function(x) {
67
- if (typeof require !== "undefined")
68
- return require.apply(this, arguments);
69
- throw Error('Dynamic require of "' + x + '" is not supported');
70
- });
71
-
72
1
  // src/dev-worker.ts
73
2
  var HEARTBEAT_MS = 5000;
74
3
  var BOOT_ID = generateBootId();
@@ -1,74 +1,3 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
- var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
- target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
28
- if (canCache)
29
- cache.set(mod, to);
30
- return to;
31
- };
32
- var __toCommonJS = (from) => {
33
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
34
- if (entry)
35
- return entry;
36
- entry = __defProp({}, "__esModule", { value: true });
37
- if (from && typeof from === "object" || typeof from === "function") {
38
- for (var key of __getOwnPropNames(from))
39
- if (!__hasOwnProp.call(entry, key))
40
- __defProp(entry, key, {
41
- get: __accessProp.bind(from, key),
42
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
43
- });
44
- }
45
- __moduleCache.set(from, entry);
46
- return entry;
47
- };
48
- var __moduleCache;
49
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
50
- var __returnValue = (v) => v;
51
- function __exportSetter(name, newValue) {
52
- this[name] = __returnValue.bind(null, newValue);
53
- }
54
- var __export = (target, all) => {
55
- for (var name in all)
56
- __defProp(target, name, {
57
- get: all[name],
58
- enumerable: true,
59
- configurable: true,
60
- set: __exportSetter.bind(all, name)
61
- });
62
- };
63
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
64
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
65
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
66
- }) : x)(function(x) {
67
- if (typeof require !== "undefined")
68
- return require.apply(this, arguments);
69
- throw Error('Dynamic require of "' + x + '" is not supported');
70
- });
71
-
72
1
  // src/dialog-context.tsx
73
2
  import { createContext, useContext } from "hono/jsx";
74
3
  var DialogContext = createContext(null);