@sci-grid/solid 1.0.1 → 1.0.4

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/package.json CHANGED
@@ -1,13 +1,24 @@
1
1
  {
2
2
  "name": "@sci-grid/solid",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "README.md"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
17
+ }
18
+ },
8
19
  "peerDependencies": {
9
20
  "solid-js": "^1.0.0",
10
- "@sci-grid/core": "1.0.1"
21
+ "@sci-grid/core": "1.0.4"
11
22
  },
12
23
  "devDependencies": {
13
24
  "solid-js": "^1.8.0",
@@ -1,8 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { SciGridSolid } from './index';
3
-
4
- describe('SciGridSolid', () => {
5
- it('should be defined', () => {
6
- expect(SciGridSolid).toBeDefined();
7
- });
8
- });
package/src/index.tsx DELETED
@@ -1,43 +0,0 @@
1
- import { onMount, onCleanup, createEffect } from 'solid-js';
2
- import { SciGrid } from '@sci-grid/core';
3
- import type { GridConfig, IDataGridProvider } from '@sci-grid/core';
4
-
5
- interface SciGridSolidProps {
6
- provider: IDataGridProvider;
7
- config?: Partial<GridConfig>;
8
- class?: string;
9
- style?: any;
10
- }
11
-
12
- /**
13
- * SciGrid SolidJS Adapter
14
- * Fine-grained reactive wrapper for maximum performance.
15
- */
16
- export const SciGridSolid = (props: SciGridSolidProps) => {
17
- let containerRef!: HTMLDivElement;
18
- let grid: SciGrid | null = null;
19
-
20
- onMount(() => {
21
- grid = new SciGrid(containerRef, props.provider, props.config || {});
22
- });
23
-
24
- onCleanup(() => {
25
- grid?.destroy();
26
- });
27
-
28
- createEffect(() => {
29
- grid?.updateProvider(props.provider);
30
- });
31
-
32
- createEffect(() => {
33
- grid?.updateConfig(props.config || {});
34
- });
35
-
36
- return (
37
- <div
38
- ref={containerRef}
39
- class={props.class}
40
- style={{ width: '100%', height: '100%', ...props.style } as any}
41
- />
42
- );
43
- };
package/tsconfig.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "jsx": "preserve",
6
- "jsxImportSource": "solid-js",
7
- "noEmit": false,
8
- "declaration": true,
9
- "emitDeclarationOnly": true
10
- },
11
- "include": ["src"]
12
- }
package/vite.config.ts DELETED
@@ -1,25 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import solidPlugin from 'vite-plugin-solid';
3
- import dts from 'vite-plugin-dts';
4
- import { resolve } from 'path';
5
-
6
- export default defineConfig({
7
- plugins: [solidPlugin(), dts()],
8
- build: {
9
- lib: {
10
- entry: resolve(__dirname, 'src/index.tsx'),
11
- name: 'SciGridSolid',
12
- fileName: 'index',
13
- formats: ['es', 'cjs']
14
- },
15
- rollupOptions: {
16
- external: ['solid-js', '@sci-grid/core', 'solid-js/web', 'solid-js/store'],
17
- output: {
18
- globals: {
19
- 'solid-js': 'Solid',
20
- '@sci-grid/core': 'SciGrid'
21
- }
22
- }
23
- }
24
- }
25
- });