litzjs 0.0.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.
@@ -0,0 +1,21 @@
1
+ //#region src/client/bindings.ts
2
+ let clientBindings = null;
3
+ function installClientBindings(bindings) {
4
+ clientBindings = bindings;
5
+ }
6
+ function getClientBindings() {
7
+ return clientBindings;
8
+ }
9
+ //#endregion
10
+ Object.defineProperty(exports, "getClientBindings", {
11
+ enumerable: true,
12
+ get: function() {
13
+ return getClientBindings;
14
+ }
15
+ });
16
+ Object.defineProperty(exports, "installClientBindings", {
17
+ enumerable: true,
18
+ get: function() {
19
+ return installClientBindings;
20
+ }
21
+ });
@@ -0,0 +1,10 @@
1
+ //#region src/client/bindings.ts
2
+ let clientBindings = null;
3
+ function installClientBindings(bindings) {
4
+ clientBindings = bindings;
5
+ }
6
+ function getClientBindings() {
7
+ return clientBindings;
8
+ }
9
+ //#endregion
10
+ export { installClientBindings as n, getClientBindings as t };
@@ -0,0 +1,28 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ Object.defineProperty(exports, "__toESM", {
24
+ enumerable: true,
25
+ get: function() {
26
+ return __toESM;
27
+ }
28
+ });
@@ -0,0 +1,35 @@
1
+ import { LayoutReference } from "./index.mjs";
2
+ import * as React from "react";
3
+
4
+ //#region src/client/link.d.ts
5
+ type LinkProps = Omit<React.ComponentPropsWithoutRef<"a">, "href"> & {
6
+ href: string;
7
+ replace?: boolean;
8
+ };
9
+ //#endregion
10
+ //#region src/client/index.d.ts
11
+ declare function mountApp(element: Element, options?: {
12
+ component?: React.JSXElementConstructor<{
13
+ children: React.ReactNode;
14
+ }>;
15
+ layout?: LayoutReference;
16
+ }): void;
17
+ declare function useNavigate(): (href: string, options?: {
18
+ replace?: boolean;
19
+ }) => void;
20
+ declare function useMatches(): Array<{
21
+ id: string;
22
+ path: string;
23
+ params: Record<string, string>;
24
+ search: URLSearchParams;
25
+ }>;
26
+ declare function usePathname(): string;
27
+ declare function useLocation(): {
28
+ href: string;
29
+ pathname: string;
30
+ search: URLSearchParams;
31
+ hash: string;
32
+ };
33
+ declare const Link: React.ComponentType<LinkProps>;
34
+ //#endregion
35
+ export { Link, mountApp, useLocation, useMatches, useNavigate, usePathname };
@@ -0,0 +1,35 @@
1
+ import { LayoutReference } from "./index.js";
2
+ import * as React from "react";
3
+
4
+ //#region src/client/link.d.ts
5
+ type LinkProps = Omit<React.ComponentPropsWithoutRef<"a">, "href"> & {
6
+ href: string;
7
+ replace?: boolean;
8
+ };
9
+ //#endregion
10
+ //#region src/client/index.d.ts
11
+ declare function mountApp(element: Element, options?: {
12
+ component?: React.JSXElementConstructor<{
13
+ children: React.ReactNode;
14
+ }>;
15
+ layout?: LayoutReference;
16
+ }): void;
17
+ declare function useNavigate(): (href: string, options?: {
18
+ replace?: boolean;
19
+ }) => void;
20
+ declare function useMatches(): Array<{
21
+ id: string;
22
+ path: string;
23
+ params: Record<string, string>;
24
+ search: URLSearchParams;
25
+ }>;
26
+ declare function usePathname(): string;
27
+ declare function useLocation(): {
28
+ href: string;
29
+ pathname: string;
30
+ search: URLSearchParams;
31
+ hash: string;
32
+ };
33
+ declare const Link: React.ComponentType<LinkProps>;
34
+ //#endregion
35
+ export { Link, mountApp, useLocation, useMatches, useNavigate, usePathname };