gravity-dnd 1.1.6

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 (44) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc.cjs +21 -0
  3. package/.storybook/main.ts +15 -0
  4. package/.storybook/preview.css +80 -0
  5. package/.storybook/preview.ts +15 -0
  6. package/LICENSE +373 -0
  7. package/README.md +292 -0
  8. package/index.ts +19 -0
  9. package/package.json +64 -0
  10. package/public/.gitkeep +0 -0
  11. package/src/Gravity.stories.ts +207 -0
  12. package/src/components/DragAndDrop/DragAndDrop.scss +4 -0
  13. package/src/components/DragAndDrop/DragAndDrop.stories.ts +787 -0
  14. package/src/components/DragAndDrop/DragAndDrop.visuals.css +1 -0
  15. package/src/components/DragAndDrop/DragAndDrop.vue +23 -0
  16. package/src/components/DragAndDrop.scss +4 -0
  17. package/src/components/DragAndDrop.visuals.css +1 -0
  18. package/src/components/DragAndDrop.vue +23 -0
  19. package/src/components/Draggable/DragDropProvider.scss +4 -0
  20. package/src/components/Draggable/DragDropProvider.visuals.css +1 -0
  21. package/src/components/Draggable/DragDropProvider.vue +11 -0
  22. package/src/components/Draggable/DragPreviewOverlay.scss +21 -0
  23. package/src/components/Draggable/DragPreviewOverlay.visuals.css +3 -0
  24. package/src/components/Draggable/DragPreviewOverlay.vue +41 -0
  25. package/src/components/Draggable/Draggable.scss +86 -0
  26. package/src/components/Draggable/Draggable.stories.ts +232 -0
  27. package/src/components/Draggable/Draggable.visuals.css +8 -0
  28. package/src/components/Draggable/Draggable.vue +292 -0
  29. package/src/components/Draggable/contracts.ts +82 -0
  30. package/src/components/Draggable/internalDropLayer.ts +126 -0
  31. package/src/components/Draggable/useDragDropContext.ts +310 -0
  32. package/src/components/Pool/Pool.scss +107 -0
  33. package/src/components/Pool/Pool.stories.ts +155 -0
  34. package/src/components/Pool/Pool.visuals.css +25 -0
  35. package/src/components/Pool/Pool.vue +198 -0
  36. package/src/components/Slot/Slot.scss +48 -0
  37. package/src/components/Slot/Slot.stories.ts +299 -0
  38. package/src/components/Slot/Slot.visuals.css +15 -0
  39. package/src/components/Slot/Slot.vue +126 -0
  40. package/src/styles.css +15 -0
  41. package/styles.css +1 -0
  42. package/styles.scss +6 -0
  43. package/tsconfig.json +18 -0
  44. package/vite.config.ts +21 -0
package/styles.css ADDED
@@ -0,0 +1 @@
1
+ @import './src/styles.css';
package/styles.scss ADDED
@@ -0,0 +1,6 @@
1
+ @import './src/components/DragAndDrop/DragAndDrop.scss';
2
+ @import './src/components/Draggable/DragDropProvider.scss';
3
+ @import './src/components/Draggable/Draggable.scss';
4
+ @import './src/components/Draggable/DragPreviewOverlay.scss';
5
+ @import './src/components/Pool/Pool.scss';
6
+ @import './src/components/Slot/Slot.scss';
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2021",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "Node",
7
+ "strict": true,
8
+ "jsx": "preserve",
9
+ "sourceMap": true,
10
+ "resolveJsonModule": true,
11
+ "esModuleInterop": true,
12
+ "lib": ["ES2021", "DOM"],
13
+ "skipLibCheck": true,
14
+ "types": ["vite/client"]
15
+ },
16
+ "include": ["src", "src/**/*.ts", "src/**/*.vue", "src/**/*.d.ts", "Gravity.stories.ts", "index.ts"],
17
+ "exclude": ["node_modules", "dist"]
18
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { defineConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+
4
+ export default defineConfig({
5
+ plugins: [vue()],
6
+ build: {
7
+ lib: {
8
+ entry: 'src/index.ts',
9
+ name: 'GravityDnd',
10
+ fileName: (format) => `gravity-dnd.${format}.js`
11
+ },
12
+ rollupOptions: {
13
+ external: ['vue'],
14
+ output: {
15
+ globals: {
16
+ vue: 'Vue'
17
+ }
18
+ }
19
+ }
20
+ }
21
+ });