@reservi/solid 1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Reservi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("solid-js"),l=require("@reservi/preact"),t=require("@reservi/core");function o(n){const r=document.createElement("div");let e=null;return u.onMount(()=>{var i;e=l.mount(r,n),(i=n.onReady)==null||i.call(n,e.api)}),u.onCleanup(()=>{e==null||e.destroy(),e=null}),r}Object.defineProperty(exports,"dayGridPlugin",{enumerable:!0,get:()=>t.dayGridPlugin});Object.defineProperty(exports,"listPlugin",{enumerable:!0,get:()=>t.listPlugin});Object.defineProperty(exports,"multiMonthPlugin",{enumerable:!0,get:()=>t.multiMonthPlugin});Object.defineProperty(exports,"resourcePlugin",{enumerable:!0,get:()=>t.resourcePlugin});Object.defineProperty(exports,"timeGridPlugin",{enumerable:!0,get:()=>t.timeGridPlugin});Object.defineProperty(exports,"timelinePlugin",{enumerable:!0,get:()=>t.timelinePlugin});exports.ReserviCalendar=o;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { onCleanup, onMount } from \"solid-js\";\nimport { mount, type ReserviCalendarHandle, type ReserviCalendarOptions } from \"@reservi/preact\";\nimport type { CalendarApi } from \"@reservi/core\";\n\nexport interface ReserviCalendarProps extends ReserviCalendarOptions {\n onReady?: (api: CalendarApi) => void;\n}\n\n/**\n * Componente SolidJS sin JSX: devuelve el nodo host y gestiona el ciclo de vida\n * con onMount/onCleanup. Usable como `<ReserviCalendar {...props} />`.\n */\nexport function ReserviCalendar(props: ReserviCalendarProps): HTMLDivElement {\n const host = document.createElement(\"div\");\n let handle: ReserviCalendarHandle | null = null;\n\n onMount(() => {\n handle = mount(host, props);\n props.onReady?.(handle.api);\n });\n onCleanup(() => {\n handle?.destroy();\n handle = null;\n });\n\n return host;\n}\n\nexport type { ReserviCalendarOptions } from \"@reservi/preact\";\nexport {\n dayGridPlugin,\n timeGridPlugin,\n listPlugin,\n multiMonthPlugin,\n timelinePlugin,\n resourcePlugin,\n} from \"@reservi/core\";\n"],"names":["ReserviCalendar","props","host","handle","onMount","mount","_a","onCleanup"],"mappings":"oKAYO,SAASA,EAAgBC,EAA6C,CAC3E,MAAMC,EAAO,SAAS,cAAc,KAAK,EACzC,IAAIC,EAAuC,KAE3CC,OAAAA,EAAAA,QAAQ,IAAM,OACZD,EAASE,EAAAA,MAAMH,EAAMD,CAAK,GAC1BK,EAAAL,EAAM,UAAN,MAAAK,EAAA,KAAAL,EAAgBE,EAAO,IACzB,CAAC,EACDI,EAAAA,UAAU,IAAM,CACdJ,GAAA,MAAAA,EAAQ,UACRA,EAAS,IACX,CAAC,EAEMD,CACT"}
@@ -0,0 +1,34 @@
1
+ import { CalendarApi } from '@reservi/core';
2
+ import { dayGridPlugin } from '@reservi/core';
3
+ import { listPlugin } from '@reservi/core';
4
+ import { multiMonthPlugin } from '@reservi/core';
5
+ import { ReserviCalendarOptions } from '@reservi/preact';
6
+ import { resourcePlugin } from '@reservi/core';
7
+ import { timeGridPlugin } from '@reservi/core';
8
+ import { timelinePlugin } from '@reservi/core';
9
+
10
+ export { dayGridPlugin }
11
+
12
+ export { listPlugin }
13
+
14
+ export { multiMonthPlugin }
15
+
16
+ /**
17
+ * Componente SolidJS sin JSX: devuelve el nodo host y gestiona el ciclo de vida
18
+ * con onMount/onCleanup. Usable como `<ReserviCalendar {...props} />`.
19
+ */
20
+ export declare function ReserviCalendar(props: ReserviCalendarProps): HTMLDivElement;
21
+
22
+ export { ReserviCalendarOptions }
23
+
24
+ export declare interface ReserviCalendarProps extends ReserviCalendarOptions {
25
+ onReady?: (api: CalendarApi) => void;
26
+ }
27
+
28
+ export { resourcePlugin }
29
+
30
+ export { timeGridPlugin }
31
+
32
+ export { timelinePlugin }
33
+
34
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ import { onMount as l, onCleanup as u } from "solid-js";
2
+ import { mount as o } from "@reservi/preact";
3
+ import { dayGridPlugin as P, listPlugin as c, multiMonthPlugin as f, resourcePlugin as y, timeGridPlugin as v, timelinePlugin as x } from "@reservi/core";
4
+ function d(t) {
5
+ const e = document.createElement("div");
6
+ let n = null;
7
+ return l(() => {
8
+ var i;
9
+ n = o(e, t), (i = t.onReady) == null || i.call(t, n.api);
10
+ }), u(() => {
11
+ n == null || n.destroy(), n = null;
12
+ }), e;
13
+ }
14
+ export {
15
+ d as ReserviCalendar,
16
+ P as dayGridPlugin,
17
+ c as listPlugin,
18
+ f as multiMonthPlugin,
19
+ y as resourcePlugin,
20
+ v as timeGridPlugin,
21
+ x as timelinePlugin
22
+ };
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { onCleanup, onMount } from \"solid-js\";\nimport { mount, type ReserviCalendarHandle, type ReserviCalendarOptions } from \"@reservi/preact\";\nimport type { CalendarApi } from \"@reservi/core\";\n\nexport interface ReserviCalendarProps extends ReserviCalendarOptions {\n onReady?: (api: CalendarApi) => void;\n}\n\n/**\n * Componente SolidJS sin JSX: devuelve el nodo host y gestiona el ciclo de vida\n * con onMount/onCleanup. Usable como `<ReserviCalendar {...props} />`.\n */\nexport function ReserviCalendar(props: ReserviCalendarProps): HTMLDivElement {\n const host = document.createElement(\"div\");\n let handle: ReserviCalendarHandle | null = null;\n\n onMount(() => {\n handle = mount(host, props);\n props.onReady?.(handle.api);\n });\n onCleanup(() => {\n handle?.destroy();\n handle = null;\n });\n\n return host;\n}\n\nexport type { ReserviCalendarOptions } from \"@reservi/preact\";\nexport {\n dayGridPlugin,\n timeGridPlugin,\n listPlugin,\n multiMonthPlugin,\n timelinePlugin,\n resourcePlugin,\n} from \"@reservi/core\";\n"],"names":["ReserviCalendar","props","host","handle","onMount","mount","_a","onCleanup"],"mappings":";;;AAYO,SAASA,EAAgBC,GAA6C;AAC3E,QAAMC,IAAO,SAAS,cAAc,KAAK;AACzC,MAAIC,IAAuC;AAE3C,SAAAC,EAAQ,MAAM;;AACZ,IAAAD,IAASE,EAAMH,GAAMD,CAAK,IAC1BK,IAAAL,EAAM,YAAN,QAAAK,EAAA,KAAAL,GAAgBE,EAAO;AAAA,EACzB,CAAC,GACDI,EAAU,MAAM;AACd,IAAAJ,KAAA,QAAAA,EAAQ,WACRA,IAAS;AAAA,EACX,CAAC,GAEMD;AACT;"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@reservi/solid",
3
+ "version": "1.1.0",
4
+ "description": "Wrapper de SolidJS para Reservi Calendar.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "main": "./dist/index.cjs",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js",
18
+ "require": "./dist/index.cjs"
19
+ }
20
+ },
21
+ "dependencies": {
22
+ "@reservi/core": "1.1.0",
23
+ "@reservi/preact": "1.1.0"
24
+ },
25
+ "peerDependencies": {
26
+ "solid-js": "^1.8.0"
27
+ },
28
+ "devDependencies": {
29
+ "jsdom": "^25.0.1",
30
+ "solid-js": "^1.9.3",
31
+ "typescript": "^5.7.2",
32
+ "vite": "^6.0.0",
33
+ "vite-plugin-dts": "^4.3.0",
34
+ "vitest": "^2.1.8",
35
+ "@reservi/eslint-config": "1.1.0",
36
+ "@reservi/tsconfig": "1.1.0"
37
+ },
38
+ "scripts": {
39
+ "build": "vite build",
40
+ "test": "vitest run",
41
+ "lint": "eslint src",
42
+ "typecheck": "tsc --noEmit"
43
+ }
44
+ }