@abs-test/absolutejs-test 0.1.0

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 (107) hide show
  1. package/.claude/settings.local.json +10 -0
  2. package/.hmr-temp/App.3e3a3834.js +65 -0
  3. package/.hmr-temp/App.462a6bf2.js +65 -0
  4. package/.hmr-temp/App.9d060aa8.js +65 -0
  5. package/.hmr-temp/Dropdown.4cb79868.js +43 -0
  6. package/.hmr-temp/Head.92c96724.js +51 -0
  7. package/.hmr-temp/ReactExample.031ea6c9.js +28 -0
  8. package/.hmr-temp/ReactExample.3ad8f8c9.js +29 -0
  9. package/.hmr-temp/ReactExample.b28ebc93.js +27 -0
  10. package/.hmr-temp/ReactExample.c4bbd06e.js +27 -0
  11. package/.hmr-temp/ReactExample.dcc8d0d4.js +27 -0
  12. package/CLAUDE.md +65 -0
  13. package/LICENSE +80 -0
  14. package/README.md +163 -0
  15. package/THIRD_PARTY_NOTICES.md +61 -0
  16. package/abs-test-absolutejs-test-0.1.0.tgz +0 -0
  17. package/absolutejs-absolute-0.15.12.tgz +0 -0
  18. package/dist/cli/index.js +98 -0
  19. package/dist/dev/client/cssUtils.ts +288 -0
  20. package/dist/dev/client/domDiff.ts +261 -0
  21. package/dist/dev/client/domState.ts +271 -0
  22. package/dist/dev/client/errorOverlay.ts +168 -0
  23. package/dist/dev/client/frameworkDetect.ts +63 -0
  24. package/dist/dev/client/handlers/html.ts +415 -0
  25. package/dist/dev/client/handlers/htmx.ts +248 -0
  26. package/dist/dev/client/handlers/react.ts +86 -0
  27. package/dist/dev/client/handlers/rebuild.ts +153 -0
  28. package/dist/dev/client/handlers/svelte.ts +129 -0
  29. package/dist/dev/client/handlers/vue.ts +254 -0
  30. package/dist/dev/client/headPatch.ts +213 -0
  31. package/dist/dev/client/hmrClient.ts +237 -0
  32. package/dist/dev/client/moduleVersions.ts +57 -0
  33. package/dist/dev/client/reactRefreshSetup.ts +21 -0
  34. package/dist/index.js +3667 -0
  35. package/dist/index.js.map +65 -0
  36. package/dist/src/build/buildReactVendor.d.ts +8 -0
  37. package/dist/src/build/compileSvelte.d.ts +11 -0
  38. package/dist/src/build/compileVue.d.ts +33 -0
  39. package/dist/src/build/generateManifest.d.ts +2 -0
  40. package/dist/src/build/generateReactIndexes.d.ts +1 -0
  41. package/dist/src/build/htmlScriptHMRPlugin.d.ts +13 -0
  42. package/dist/src/build/outputLogs.d.ts +1 -0
  43. package/dist/src/build/rewriteReactImports.d.ts +8 -0
  44. package/dist/src/build/scanEntryPoints.d.ts +1 -0
  45. package/dist/src/build/updateAssetPaths.d.ts +1 -0
  46. package/dist/src/build/wrapHTMLScript.d.ts +24 -0
  47. package/dist/src/cli/index.d.ts +2 -0
  48. package/dist/src/constants.d.ts +12 -0
  49. package/dist/src/core/build.d.ts +2 -0
  50. package/dist/src/core/devBuild.d.ts +6 -0
  51. package/dist/src/core/devVendorPaths.d.ts +7 -0
  52. package/dist/src/core/index.d.ts +4 -0
  53. package/dist/src/core/lookup.d.ts +3 -0
  54. package/dist/src/core/pageHandlers.d.ts +15 -0
  55. package/dist/src/dev/assetStore.d.ts +12 -0
  56. package/dist/src/dev/buildHMRClient.d.ts +1 -0
  57. package/dist/src/dev/clientManager.d.ts +26 -0
  58. package/dist/src/dev/configResolver.d.ts +13 -0
  59. package/dist/src/dev/dependencyGraph.d.ts +13 -0
  60. package/dist/src/dev/fileHashTracker.d.ts +2 -0
  61. package/dist/src/dev/fileWatcher.d.ts +3 -0
  62. package/dist/src/dev/moduleMapper.d.ts +21 -0
  63. package/dist/src/dev/moduleVersionTracker.d.ts +7 -0
  64. package/dist/src/dev/pathUtils.d.ts +5 -0
  65. package/dist/src/dev/reactComponentClassifier.d.ts +2 -0
  66. package/dist/src/dev/rebuildTrigger.d.ts +10 -0
  67. package/dist/src/dev/simpleHTMLHMR.d.ts +4 -0
  68. package/dist/src/dev/simpleHTMXHMR.d.ts +4 -0
  69. package/dist/src/dev/simpleSvelteHMR.d.ts +1 -0
  70. package/dist/src/dev/simpleVueHMR.d.ts +1 -0
  71. package/dist/src/dev/webSocket.d.ts +9 -0
  72. package/dist/src/index.d.ts +5 -0
  73. package/dist/src/plugins/hmr.d.ts +62 -0
  74. package/dist/src/plugins/index.d.ts +3 -0
  75. package/dist/src/plugins/networking.d.ts +29 -0
  76. package/dist/src/plugins/pageRouter.d.ts +1 -0
  77. package/dist/src/svelte/renderToPipeableStream.d.ts +12 -0
  78. package/dist/src/svelte/renderToReadableStream.d.ts +13 -0
  79. package/dist/src/svelte/renderToString.d.ts +9 -0
  80. package/dist/src/utils/cleanup.d.ts +7 -0
  81. package/dist/src/utils/commonAncestor.d.ts +1 -0
  82. package/dist/src/utils/escapeScriptContent.d.ts +1 -0
  83. package/dist/src/utils/generateHeadElement.d.ts +17 -0
  84. package/dist/src/utils/getDurationString.d.ts +1 -0
  85. package/dist/src/utils/getEnv.d.ts +1 -0
  86. package/dist/src/utils/getRegisterClientScript.d.ts +10 -0
  87. package/dist/src/utils/index.d.ts +6 -0
  88. package/dist/src/utils/logger.d.ts +54 -0
  89. package/dist/src/utils/networking.d.ts +2 -0
  90. package/dist/src/utils/normalizePath.d.ts +9 -0
  91. package/dist/src/utils/registerClientScript.d.ts +51 -0
  92. package/dist/src/utils/stringModifiers.d.ts +2 -0
  93. package/dist/src/utils/validateSafePath.d.ts +1 -0
  94. package/dist/types/build.d.ts +41 -0
  95. package/dist/types/client.d.ts +108 -0
  96. package/dist/types/index.d.ts +4 -0
  97. package/dist/types/messages.d.ts +138 -0
  98. package/dist/types/websocket.d.ts +6 -0
  99. package/eslint.config.mjs +238 -0
  100. package/package.json +67 -0
  101. package/tsconfig.build.json +20 -0
  102. package/types/build.ts +54 -0
  103. package/types/client.ts +111 -0
  104. package/types/index.ts +4 -0
  105. package/types/messages.ts +205 -0
  106. package/types/websocket.ts +12 -0
  107. package/types/window-globals.ts +53 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "WebSearch",
5
+ "WebFetch(domain:elysiajs.com)",
6
+ "WebFetch(domain:deepwiki.com)",
7
+ "Bash(git log:*)"
8
+ ]
9
+ }
10
+ }
@@ -0,0 +1,65 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import { useState } from "react";
3
+ export const App = ({ initialCount }) => {
4
+ const [count, setCount] = useState(initialCount);
5
+ return jsxDEV_7x81h0kn("main", {
6
+ children: [
7
+ jsxDEV_7x81h0kn("nav", {
8
+ children: [
9
+ jsxDEV_7x81h0kn("a", {
10
+ href: "https://absolutejs.com",
11
+ target: "_blank",
12
+ children: jsxDEV_7x81h0kn("img", {
13
+ className: "logo",
14
+ src: "/assets/png/absolutejs-temp.png",
15
+ alt: "AbsoluteJS Logo"
16
+ }, undefined, false, undefined, this)
17
+ }, undefined, false, undefined, this),
18
+ jsxDEV_7x81h0kn("a", {
19
+ href: "https://react.dev/",
20
+ children: jsxDEV_7x81h0kn("img", {
21
+ className: "logo react",
22
+ src: "/assets/svg/react.svg",
23
+ alt: "React Logo"
24
+ }, undefined, false, undefined, this)
25
+ }, undefined, false, undefined, this)
26
+ ]
27
+ }, undefined, true, undefined, this),
28
+ jsxDEV_7x81h0kn("h1", {
29
+ children: "AbsoluteJS + React"
30
+ }, undefined, false, undefined, this),
31
+ jsxDEV_7x81h0kn("button", {
32
+ onClick: () => setCount(count + 1),
33
+ children: [
34
+ "count is ",
35
+ count
36
+ ]
37
+ }, undefined, true, undefined, this),
38
+ jsxDEV_7x81h0kn("p", {
39
+ children: [
40
+ "Edit ",
41
+ jsxDEV_7x81h0kn("code", {
42
+ children: "example/react/pages/ReactExample.tsx"
43
+ }, undefined, false, undefined, this),
44
+ " then save and refresh to update the page."
45
+ ]
46
+ }, undefined, true, undefined, this),
47
+ jsxDEV_7x81h0kn("p", {
48
+ style: { color: "#777" },
49
+ children: "( Hot Module Reloading is coming soon )"
50
+ }, undefined, false, undefined, this),
51
+ jsxDEV_7x81h0kn("p", {
52
+ style: { marginTop: "2rem" },
53
+ children: "Explore the other pages to see how AbsoluteJS seamlessly unifies multiple frameworks on a single server."
54
+ }, undefined, false, undefined, this),
55
+ jsxDEV_7x81h0kn("p", {
56
+ style: {
57
+ color: "#777",
58
+ fontSize: "1rem",
59
+ marginTop: "2rem"
60
+ },
61
+ children: "Click on the AbsoluteJS and React logos to learn more."
62
+ }, undefined, false, undefined, this)
63
+ ]
64
+ }, undefined, true, undefined, this);
65
+ };
@@ -0,0 +1,65 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import { useState } from "react";
3
+ export const App = ({ initialCount }) => {
4
+ const [count, setCount] = useState(initialCount);
5
+ return jsxDEV_7x81h0kn("main", {
6
+ children: [
7
+ jsxDEV_7x81h0kn("nav", {
8
+ children: [
9
+ jsxDEV_7x81h0kn("a", {
10
+ href: "https://absolutejs.com",
11
+ target: "_blank",
12
+ children: jsxDEV_7x81h0kn("img", {
13
+ className: "logo",
14
+ src: "/assets/png/absolutejs-temp.png",
15
+ alt: "AbsoluteJS Logo"
16
+ }, undefined, false, undefined, this)
17
+ }, undefined, false, undefined, this),
18
+ jsxDEV_7x81h0kn("a", {
19
+ href: "https://react.dev/",
20
+ children: jsxDEV_7x81h0kn("img", {
21
+ className: "logo react",
22
+ src: "/assets/svg/react.svg",
23
+ alt: "React Logo"
24
+ }, undefined, false, undefined, this)
25
+ }, undefined, false, undefined, this)
26
+ ]
27
+ }, undefined, true, undefined, this),
28
+ jsxDEV_7x81h0kn("h1", {
29
+ children: "AbsoluteJS + React"
30
+ }, undefined, false, undefined, this),
31
+ jsxDEV_7x81h0kn("button", {
32
+ onClick: () => setCount(count + 1),
33
+ children: [
34
+ "count is ",
35
+ count
36
+ ]
37
+ }, undefined, true, undefined, this),
38
+ jsxDEV_7x81h0kn("p", {
39
+ children: [
40
+ "Edit ",
41
+ jsxDEV_7x81h0kn("code", {
42
+ children: "example/react/pages/ReactExample.tsx"
43
+ }, undefined, false, undefined, this),
44
+ " then save and refresh to update the page."
45
+ ]
46
+ }, undefined, true, undefined, this),
47
+ jsxDEV_7x81h0kn("p", {
48
+ style: { color: "#777" },
49
+ children: "( Hot Module Reloading is coming soon )"
50
+ }, undefined, false, undefined, this),
51
+ jsxDEV_7x81h0kn("p", {
52
+ style: { marginTop: "2rem" },
53
+ children: "Explore the other pages to see how AbsoluteJS seamlessly unifies multiple frameworks on a single server."
54
+ }, undefined, false, undefined, this),
55
+ jsxDEV_7x81h0kn("p", {
56
+ style: {
57
+ color: "#777",
58
+ fontSize: "1rem",
59
+ marginTop: "2rem"
60
+ },
61
+ children: "Click on the AbsoluteJS and React logos to learn more."
62
+ }, undefined, false, undefined, this)
63
+ ]
64
+ }, undefined, true, undefined, this);
65
+ };
@@ -0,0 +1,65 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import { useState } from "react";
3
+ export const App = ({ initialCount }) => {
4
+ const [count, setCount] = useState(initialCount);
5
+ return jsxDEV_7x81h0kn("main", {
6
+ children: [
7
+ jsxDEV_7x81h0kn("nav", {
8
+ children: [
9
+ jsxDEV_7x81h0kn("a", {
10
+ href: "https://absolutejs.com",
11
+ target: "_blank",
12
+ children: jsxDEV_7x81h0kn("img", {
13
+ className: "logo",
14
+ src: "/assets/png/absolutejs-temp.png",
15
+ alt: "AbsoluteJS Logo"
16
+ }, undefined, false, undefined, this)
17
+ }, undefined, false, undefined, this),
18
+ jsxDEV_7x81h0kn("a", {
19
+ href: "https://react.dev/",
20
+ children: jsxDEV_7x81h0kn("img", {
21
+ className: "logo react",
22
+ src: "/assets/svg/react.svg",
23
+ alt: "React Logo"
24
+ }, undefined, false, undefined, this)
25
+ }, undefined, false, undefined, this)
26
+ ]
27
+ }, undefined, true, undefined, this),
28
+ jsxDEV_7x81h0kn("h1", {
29
+ children: "AbsoluteJS + React"
30
+ }, undefined, false, undefined, this),
31
+ jsxDEV_7x81h0kn("button", {
32
+ onClick: () => setCount(count + 1),
33
+ children: [
34
+ "count is ",
35
+ count
36
+ ]
37
+ }, undefined, true, undefined, this),
38
+ jsxDEV_7x81h0kn("p", {
39
+ children: [
40
+ "Edit ",
41
+ jsxDEV_7x81h0kn("code", {
42
+ children: "example/react/pages/ReactExample.tsx"
43
+ }, undefined, false, undefined, this),
44
+ " then save and refresh to update the page."
45
+ ]
46
+ }, undefined, true, undefined, this),
47
+ jsxDEV_7x81h0kn("p", {
48
+ style: { color: "#777" },
49
+ children: "( Hot Module Reloading is coming soon )"
50
+ }, undefined, false, undefined, this),
51
+ jsxDEV_7x81h0kn("p", {
52
+ style: { marginTop: "2rem" },
53
+ children: "Explore the other pages to see how AbsoluteJS seamlessly unifies multiple frameworks on a single server."
54
+ }, undefined, false, undefined, this),
55
+ jsxDEV_7x81h0kn("p", {
56
+ style: {
57
+ color: "#777",
58
+ fontSize: "1rem",
59
+ marginTop: "2rem"
60
+ },
61
+ children: "Click on the AbsoluteJS and React logos to learn more."
62
+ }, undefined, false, undefined, this)
63
+ ]
64
+ }, undefined, true, undefined, this);
65
+ };
@@ -0,0 +1,43 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import { useState } from "react";
3
+ export const Dropdown = () => {
4
+ const [isOpen, setIsOpen] = useState(false);
5
+ return jsxDEV_7x81h0kn("details", {
6
+ onPointerEnter: () => setIsOpen(true),
7
+ onPointerLeave: () => setIsOpen(false),
8
+ open: isOpen,
9
+ children: [
10
+ jsxDEV_7x81h0kn("summary", {
11
+ children: "Pages"
12
+ }, undefined, false, undefined, this),
13
+ jsxDEV_7x81h0kn("nav", {
14
+ children: [
15
+ jsxDEV_7x81h0kn("a", {
16
+ href: "/html",
17
+ children: "HTML"
18
+ }, undefined, false, undefined, this),
19
+ jsxDEV_7x81h0kn("a", {
20
+ href: "/react",
21
+ children: "React"
22
+ }, undefined, false, undefined, this),
23
+ jsxDEV_7x81h0kn("a", {
24
+ href: "/htmx",
25
+ children: "HTMX"
26
+ }, undefined, false, undefined, this),
27
+ jsxDEV_7x81h0kn("a", {
28
+ href: "/svelte",
29
+ children: "Svelte"
30
+ }, undefined, false, undefined, this),
31
+ jsxDEV_7x81h0kn("a", {
32
+ href: "/vue",
33
+ children: "Vue"
34
+ }, undefined, false, undefined, this),
35
+ jsxDEV_7x81h0kn("a", {
36
+ href: "/angular",
37
+ children: "Angular"
38
+ }, undefined, false, undefined, this)
39
+ ]
40
+ }, undefined, true, undefined, this)
41
+ ]
42
+ }, undefined, true, undefined, this);
43
+ };
@@ -0,0 +1,51 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ export const Head = ({
3
+ title = "AbsoluteJS + React",
4
+ description = "AbsoluteJS React Example",
5
+ icon = "/assets/ico/favicon.ico",
6
+ font = "Poppins",
7
+ cssPath
8
+ }) => jsxDEV_7x81h0kn("head", {
9
+ suppressHydrationWarning: true,
10
+ children: [
11
+ jsxDEV_7x81h0kn("meta", {
12
+ charSet: "utf-8"
13
+ }, undefined, false, undefined, this),
14
+ jsxDEV_7x81h0kn("title", {
15
+ children: title
16
+ }, undefined, false, undefined, this),
17
+ jsxDEV_7x81h0kn("meta", {
18
+ name: "description",
19
+ content: description
20
+ }, undefined, false, undefined, this),
21
+ jsxDEV_7x81h0kn("meta", {
22
+ name: "viewport",
23
+ content: "width=device-width, initial-scale=1"
24
+ }, undefined, false, undefined, this),
25
+ jsxDEV_7x81h0kn("link", {
26
+ rel: "icon",
27
+ href: icon
28
+ }, undefined, false, undefined, this),
29
+ jsxDEV_7x81h0kn("link", {
30
+ rel: "preconnect",
31
+ href: "https://fonts.googleapis.com"
32
+ }, undefined, false, undefined, this),
33
+ jsxDEV_7x81h0kn("link", {
34
+ rel: "preconnect",
35
+ href: "https://fonts.gstatic.com",
36
+ crossOrigin: "anonymous",
37
+ suppressHydrationWarning: true
38
+ }, undefined, false, undefined, this),
39
+ jsxDEV_7x81h0kn("link", {
40
+ href: `https://fonts.googleapis.com/css2?family=${font}:wght@100..900&display=swap`,
41
+ rel: "stylesheet",
42
+ suppressHydrationWarning: true
43
+ }, undefined, false, undefined, this),
44
+ cssPath && jsxDEV_7x81h0kn("link", {
45
+ rel: "stylesheet",
46
+ href: cssPath,
47
+ type: "text/css",
48
+ suppressHydrationWarning: true
49
+ }, undefined, false, undefined, this)
50
+ ]
51
+ }, undefined, true, undefined, this);
@@ -0,0 +1,28 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import { App } from './App.9d060aa8.js';
3
+ import { Dropdown } from './Dropdown.4cb79868.js';
4
+ import { Head } from './Head.92c96724.js';
5
+ export const ReactExample = ({ initialCount, cssPath }) => jsxDEV_7x81h0kn(Fragment_8vg9x3sq, {
6
+ children: [
7
+ jsxDEV_7x81h0kn(Head, {
8
+ cssPath
9
+ }, undefined, false, undefined, this),
10
+ jsxDEV_7x81h0kn("div", {
11
+ id: "root",
12
+ children: [
13
+ jsxDEV_7x81h0kn("header", {
14
+ children: [
15
+ jsxDEV_7x81h0kn("a", {
16
+ href: "/",
17
+ children: "AbsoluteJS"
18
+ }, undefined, false, undefined, this),
19
+ jsxDEV_7x81h0kn(Dropdown, {}, undefined, false, undefined, this)
20
+ ]
21
+ }, undefined, true, undefined, this),
22
+ jsxDEV_7x81h0kn(App, {
23
+ initialCount
24
+ }, undefined, false, undefined, this)
25
+ ]
26
+ }, undefined, true, undefined, this)
27
+ ]
28
+ }, undefined, true, undefined, this);
@@ -0,0 +1,29 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import React from "react";
3
+ import { App } from './App.9d060aa8.js';
4
+ import { Dropdown } from './Dropdown.4cb79868.js';
5
+ import { Head } from './Head.92c96724.js';
6
+ export const ReactExample = ({ initialCount, cssPath }) => jsxDEV_7x81h0kn(React.Fragment, {
7
+ children: [
8
+ jsxDEV_7x81h0kn(Head, {
9
+ cssPath
10
+ }, undefined, false, undefined, this),
11
+ jsxDEV_7x81h0kn("div", {
12
+ id: "root",
13
+ children: [
14
+ jsxDEV_7x81h0kn("header", {
15
+ children: [
16
+ jsxDEV_7x81h0kn("a", {
17
+ href: "/",
18
+ children: "AbsoluteJS"
19
+ }, undefined, false, undefined, this),
20
+ jsxDEV_7x81h0kn(Dropdown, {}, undefined, false, undefined, this)
21
+ ]
22
+ }, undefined, true, undefined, this),
23
+ jsxDEV_7x81h0kn(App, {
24
+ initialCount
25
+ }, undefined, false, undefined, this)
26
+ ]
27
+ }, undefined, true, undefined, this)
28
+ ]
29
+ }, undefined, true, undefined, this);
@@ -0,0 +1,27 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import { App } from './App.3e3a3834.js';
3
+ import { Dropdown } from './Dropdown.4cb79868.js';
4
+ import { Head } from './Head.92c96724.js';
5
+ export const ReactExample = ({ initialCount, cssPath }) => jsxDEV_7x81h0kn("html", {
6
+ children: [
7
+ jsxDEV_7x81h0kn(Head, {
8
+ cssPath
9
+ }, undefined, false, undefined, this),
10
+ jsxDEV_7x81h0kn("body", {
11
+ children: [
12
+ jsxDEV_7x81h0kn("header", {
13
+ children: [
14
+ jsxDEV_7x81h0kn("a", {
15
+ href: "/",
16
+ children: "AbsoluteJS"
17
+ }, undefined, false, undefined, this),
18
+ jsxDEV_7x81h0kn(Dropdown, {}, undefined, false, undefined, this)
19
+ ]
20
+ }, undefined, true, undefined, this),
21
+ jsxDEV_7x81h0kn(App, {
22
+ initialCount
23
+ }, undefined, false, undefined, this)
24
+ ]
25
+ }, undefined, true, undefined, this)
26
+ ]
27
+ }, undefined, true, undefined, this);
@@ -0,0 +1,27 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import { App } from './App.462a6bf2.js';
3
+ import { Dropdown } from './Dropdown.4cb79868.js';
4
+ import { Head } from './Head.92c96724.js';
5
+ export const ReactExample = ({ initialCount, cssPath }) => jsxDEV_7x81h0kn("html", {
6
+ children: [
7
+ jsxDEV_7x81h0kn(Head, {
8
+ cssPath
9
+ }, undefined, false, undefined, this),
10
+ jsxDEV_7x81h0kn("body", {
11
+ children: [
12
+ jsxDEV_7x81h0kn("header", {
13
+ children: [
14
+ jsxDEV_7x81h0kn("a", {
15
+ href: "/",
16
+ children: "AbsoluteJS"
17
+ }, undefined, false, undefined, this),
18
+ jsxDEV_7x81h0kn(Dropdown, {}, undefined, false, undefined, this)
19
+ ]
20
+ }, undefined, true, undefined, this),
21
+ jsxDEV_7x81h0kn(App, {
22
+ initialCount
23
+ }, undefined, false, undefined, this)
24
+ ]
25
+ }, undefined, true, undefined, this)
26
+ ]
27
+ }, undefined, true, undefined, this);
@@ -0,0 +1,27 @@
1
+ import { jsxDEV as jsxDEV_7x81h0kn } from 'react/jsx-dev-runtime';
2
+ import { App } from './App.3e3a3834.js';
3
+ import { Dropdown } from './Dropdown.4cb79868.js';
4
+ import { Head } from './Head.92c96724.js';
5
+ export const ReactExample = ({ initialCount, cssPath }) => jsxDEV_7x81h0kn("html", {
6
+ children: [
7
+ jsxDEV_7x81h0kn(Head, {
8
+ cssPath
9
+ }, undefined, false, undefined, this),
10
+ jsxDEV_7x81h0kn("body", {
11
+ children: [
12
+ jsxDEV_7x81h0kn("header", {
13
+ children: [
14
+ jsxDEV_7x81h0kn("a", {
15
+ href: "/",
16
+ children: "AbsoluteJS"
17
+ }, undefined, false, undefined, this),
18
+ jsxDEV_7x81h0kn(Dropdown, {}, undefined, false, undefined, this)
19
+ ]
20
+ }, undefined, true, undefined, this),
21
+ jsxDEV_7x81h0kn(App, {
22
+ initialCount
23
+ }, undefined, false, undefined, this)
24
+ ]
25
+ }, undefined, true, undefined, this)
26
+ ]
27
+ }, undefined, true, undefined, this);
package/CLAUDE.md ADDED
@@ -0,0 +1,65 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ AbsoluteJS is a full-stack, type-safe meta-framework for building web applications with TypeScript. It provides universal server-side rendering (SSR) for multiple frontend frameworks (React, Svelte, Vue, HTML, HTMX) powered by Bun and Elysia.
8
+
9
+ ## Commands
10
+
11
+ ```bash
12
+ bun run typecheck # TypeScript type checking (no emit)
13
+ bun run format # Prettier formatting
14
+ bun run lint # ESLint (do not run)
15
+ bun test # Run tests (do not run)
16
+ bun run dev # Dev server (runs example/server.ts with --hot) (ask before using always)
17
+ bun run build # Build the package to dist/ (do not run)
18
+ ```
19
+
20
+ ## Architecture
21
+
22
+ ### Build Pipeline (`src/core/build.ts`)
23
+
24
+ The central orchestrator. A single `build()` call scans, compiles, and bundles all frameworks:
25
+
26
+ 1. **Path validation** → `validateSafePath()` prevents directory traversal
27
+ 2. **React index generation** → creates hydration entry points in `indexes/`
28
+ 3. **Asset copy** + optional **Tailwind compilation**
29
+ 4. **Entry point scanning** → `scanEntryPoints()` globs each framework directory
30
+ 5. **Framework compilation** → Svelte (`compileSvelte`), Vue (`compileVue`) each produce SSR + client variants
31
+ 6. **Bun bundling** (3 passes): server (target=bun), client (target=browser, minified), CSS
32
+ 7. **Manifest generation** → maps filenames (PascalCased via `toPascal`) to hashed asset paths
33
+ 8. **HTML asset path updating** → regex-based injection of hashed paths
34
+ 9. **Cleanup** → removes `compiled/` intermediates unless `preserveIntermediateFiles` is set
35
+
36
+ ### Key Modules
37
+
38
+ - **`src/core/pageHandlers.ts`** — `handleReactPageRequest`, `handleSveltePageRequest`, `handleVuePageRequest`, `handleHTMLPageRequest`, `handleHTMXPageRequest`. Each renders SSR HTML with hydration scripts.
39
+ - **`src/core/lookup.ts`** — `asset(manifest, name)` resolves build manifest entries.
40
+ - **`src/build/`** — Individual compilation steps: `compileSvelte.ts`, `compileVue.ts`, `generateManifest.ts`, `generateReactIndexes.ts`, `scanEntryPoints.ts`, `updateAssetPaths.ts`.
41
+ - **`src/plugins/networking.ts`** — Elysia plugin for server startup with HOST/PORT config and LAN binding (`--host` flag).
42
+ - **`src/plugins/hmr.ts`** — HMR plugin with WebSocket-based hot reload for dev mode.
43
+ - **`src/dev/`** — Dev tooling: file watcher, HMR client builder, dependency graph, framework-specific HMR handlers (React, Svelte, Vue, HTML, HTMX).
44
+ - **`src/cli/index.ts`** — CLI entry point (`absolutejs dev [entry]`). Spawns server with `--hot`, manages database containers if docker-compose exists.
45
+ - **`src/utils/`** — Path validation, string transforms (`toPascal`/`toKebab`), head element generation, environment variable loading (`getEnv`).
46
+ - **`types/`** — Type definitions: `BuildConfig`, `BuildOptions`, `PropsOf<T>`, `Prettify<T>`.
47
+
48
+ ### Framework SSR Pattern
49
+
50
+ All frameworks follow the same pattern: server renders HTML → props serialized to `window.__INITIAL_PROPS__` → client hydrates with framework-specific entry point. Hydration indexes are auto-generated during build.
51
+
52
+ ### Configuration Type
53
+
54
+ `BuildConfig` accepts optional directory paths for each framework (`reactDirectory`, `svelteDirectory`, `vueDirectory`, `htmlDirectory`, `htmxDirectory`), plus `buildDirectory`, `assetsDirectory`, `tailwind` config, and `options`.
55
+
56
+ ## Code Conventions
57
+
58
+ - **ESLint plugin `eslint-plugin-absolute`** enforces strict rules: max nesting depth of 1, min variable name length of 3 (exceptions: `_`, `id`, `db`, `OK`), explicit return types, sorted exports/keys, no default exports (except config files)
59
+ - **Prettier**: tabs, 4-space width, 80 char print width, single quotes, no trailing commas, semicolons
60
+ - **TypeScript**: strict mode, ESNext target, bundler module resolution, decorator support enabled
61
+ - **Barrel exports**: `index.ts` files re-export alphabetically from each module directory
62
+ - **No default imports** from `react` or `bun` (enforced by linter)
63
+ - **Function expressions only**: `func-style` rule enforces arrow functions over declarations
64
+ - **Blank line before return** statements (enforced by `@stylistic/ts/padding-line-between-statements`)
65
+ - Elysia plugin pattern for server extensibility
package/LICENSE ADDED
@@ -0,0 +1,80 @@
1
+ # Business Source License 1.1
2
+
3
+ **Licensor:** Alex Kahn
4
+
5
+ **Licensed Work:** AbsoluteJS (https://github.com/absolutejs/absolutejs)
6
+
7
+ **Change Date:** February 16, 2036
8
+
9
+ **Change License:** Apache License, Version 2.0
10
+
11
+ ---
12
+
13
+ ## Terms
14
+
15
+ The Licensor hereby grants you the right to copy, modify, create derivative
16
+ works, redistribute, and make non-production use of the Licensed Work. The
17
+ Licensor may make an Additional Use Grant, permitting limited production use.
18
+
19
+ ### Additional Use Grant
20
+
21
+ You may use the Licensed Work in production, provided your use does not include
22
+ any of the following:
23
+
24
+ 1. **Offering a Competing Service.** You may not offer the Licensed Work, or
25
+ any derivative of it, to third parties as a hosted or managed service that
26
+ competes with the Licensed Work itself (for example, a "framework-as-a-service"
27
+ platform, deployment service, or cloud offering where AbsoluteJS or a
28
+ substantial portion of its functionality is a primary component of the value
29
+ provided to users).
30
+
31
+ 2. **Resale or Redistribution as a Standalone Product.** You may not sell,
32
+ license, or distribute the Licensed Work, or any derivative or fork of it,
33
+ as a standalone commercial product or framework.
34
+
35
+ 3. **Removal of Attribution.** Any derivative work, fork, or redistribution of
36
+ the Licensed Work must prominently credit AbsoluteJS and include a link to
37
+ the original project repository (https://github.com/absolutejs/absolutejs).
38
+
39
+ For clarity, the following uses are expressly permitted:
40
+
41
+ - Using AbsoluteJS to build and deploy your own applications, websites, or
42
+ SaaS products (whether commercial or non-commercial).
43
+ - Using AbsoluteJS as a dependency in commercial software that you build and sell,
44
+ as long as the software is not itself a competing framework or hosting service.
45
+ - Providing consulting, development, or professional services to clients using
46
+ AbsoluteJS.
47
+ - Forking and modifying the Licensed Work for your own internal use, provided
48
+ attribution is maintained.
49
+
50
+ ### Change Date and Change License
51
+
52
+ On the Change Date specified above, or on such other date as the Licensor may
53
+ specify by written notice, the Licensed Work will be made available under the
54
+ Change License (Apache License, Version 2.0). Until the Change Date, the terms
55
+ of this Business Source License 1.1 apply.
56
+
57
+ ### Notices
58
+
59
+ You must not remove or obscure any licensing, copyright, or other notices
60
+ included in the Licensed Work.
61
+
62
+ ### No Warranty
63
+
64
+ THE LICENSED WORK IS PROVIDED "AS IS". THE LICENSOR HEREBY DISCLAIMS ALL
65
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
66
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO
67
+ EVENT SHALL THE LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY,
68
+ WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR
69
+ IN CONNECTION WITH THE LICENSED WORK OR THE USE OR OTHER DEALINGS IN THE
70
+ LICENSED WORK.
71
+
72
+ ---
73
+
74
+ ## Contact
75
+
76
+ For commercial licensing inquiries or additional permissions, contact:
77
+
78
+ - **Alex Kahn**
79
+ - alexkahndev@gmail.com
80
+ - alexkahndev.github.io