@contember/react-repeater-dnd-kit 2.1.0-alpha.9 → 2.1.0-beta.2
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/dist/development/index.cjs +2 -2
- package/dist/development/index.js +1 -1
- package/dist/development/src/components/RepeaterSortable.cjs +3 -3
- package/dist/development/src/components/RepeaterSortable.cjs.map +1 -1
- package/dist/development/src/components/RepeaterSortable.js +4 -4
- package/dist/development/src/components/RepeaterSortable.js.map +1 -1
- package/dist/development/src/components/RepeaterSortableDragOverlay.cjs.map +1 -1
- package/dist/development/src/components/RepeaterSortableDragOverlay.js.map +1 -1
- package/dist/development/src/components/RepeaterSortableDropIndicator.cjs.map +1 -1
- package/dist/development/src/components/RepeaterSortableDropIndicator.js.map +1 -1
- package/dist/development/src/components/RepeaterSortableEachItem.cjs +1 -1
- package/dist/development/src/components/RepeaterSortableEachItem.cjs.map +1 -1
- package/dist/development/src/components/RepeaterSortableEachItem.js +1 -1
- package/dist/development/src/components/RepeaterSortableEachItem.js.map +1 -1
- package/dist/development/src/components/RepeaterSortableItemActivator.cjs.map +1 -1
- package/dist/development/src/components/RepeaterSortableItemActivator.js.map +1 -1
- package/dist/development/src/components/RepeaterSortableItemNode.cjs.map +1 -1
- package/dist/development/src/components/RepeaterSortableItemNode.js.map +1 -1
- package/dist/development/src/contexts.cjs.map +1 -1
- package/dist/development/src/contexts.js +1 -1
- package/dist/development/src/contexts.js.map +1 -1
- package/dist/production/index.cjs +2 -2
- package/dist/production/index.js +1 -1
- package/dist/production/src/components/RepeaterSortable.cjs.map +1 -1
- package/dist/production/src/components/RepeaterSortable.js +1 -1
- package/dist/production/src/components/RepeaterSortable.js.map +1 -1
- package/dist/production/src/components/RepeaterSortableDragOverlay.cjs.map +1 -1
- package/dist/production/src/components/RepeaterSortableDragOverlay.js.map +1 -1
- package/dist/production/src/components/RepeaterSortableDropIndicator.cjs.map +1 -1
- package/dist/production/src/components/RepeaterSortableDropIndicator.js.map +1 -1
- package/dist/production/src/components/RepeaterSortableEachItem.cjs.map +1 -1
- package/dist/production/src/components/RepeaterSortableEachItem.js.map +1 -1
- package/dist/production/src/components/RepeaterSortableItemActivator.cjs.map +1 -1
- package/dist/production/src/components/RepeaterSortableItemActivator.js.map +1 -1
- package/dist/production/src/components/RepeaterSortableItemNode.cjs.map +1 -1
- package/dist/production/src/components/RepeaterSortableItemNode.js.map +1 -1
- package/dist/production/src/contexts.cjs.map +1 -1
- package/dist/production/src/contexts.js +1 -1
- package/dist/production/src/contexts.js.map +1 -1
- package/dist/types/components/RepeaterSortable.d.ts.map +1 -1
- package/dist/types/components/RepeaterSortableEachItem.d.ts.map +1 -1
- package/dist/types/contexts.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/src/components/RepeaterSortable.tsx +14 -2
- package/src/components/RepeaterSortableEachItem.tsx +0 -1
- package/src/contexts.ts +1 -1
- package/src/index.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createContext, createRequiredContext } from "@contember/react-utils";
|
|
2
2
|
const RepeaterSortableItemContext_ = createRequiredContext("RepeaterSortableItemContext");
|
|
3
3
|
const RepeaterSortableItemContext = RepeaterSortableItemContext_[0];
|
|
4
4
|
const useRepeaterSortableItem = RepeaterSortableItemContext_[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.js","sources":["../../../../packages/react-repeater-dnd-kit/src/contexts.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"contexts.js","sources":["../../../../packages/react-repeater-dnd-kit/src/contexts.ts"],"sourcesContent":["import { createContext, createRequiredContext } from '@contember/react-utils'\nimport { EntityAccessor } from '@contember/react-binding'\nimport { useSortable } from '@dnd-kit/sortable'\n\nconst RepeaterSortableItemContext_ = createRequiredContext<ReturnType<typeof useSortable>>('RepeaterSortableItemContext')\n/** @internal */\nexport const RepeaterSortableItemContext = RepeaterSortableItemContext_[0]\n/**\n * Returns the sortable context from dnd-kit (e.g. isDragging, isOver, setNodeRef) for the repeater item.\n */\nexport const useRepeaterSortableItem = RepeaterSortableItemContext_[1]\n\nconst RepeaterActiveEntityContext_ = createContext<EntityAccessor | undefined>('RepeaterActiveEntityContext', undefined)\n/** @internal */\nexport const RepeaterActiveEntityContext = RepeaterActiveEntityContext_[0]\n/**\n * Returns the entity that is currently being dragged in the repeater.\n */\nexport const useRepeaterActiveEntity = RepeaterActiveEntityContext_[1]\n"],"names":[],"mappings":";AAIA,MAAM,+BAA+B,sBAAsD,6BAA6B;AAEjH,MAAM,8BAA8B,6BAA6B,CAAC;AAIlE,MAAM,0BAA0B,6BAA6B,CAAC;AAErE,MAAM,+BAA+B,cAA0C,+BAA+B,MAAS;AAEhH,MAAM,8BAA8B,6BAA6B,CAAC;AAIlE,MAAM,0BAA0B,6BAA6B,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeaterSortable.d.ts","sourceRoot":"","sources":["../../../src/components/RepeaterSortable.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAA;AAExE,OAAO,
|
|
1
|
+
{"version":3,"file":"RepeaterSortable.d.ts","sourceRoot":"","sources":["../../../src/components/RepeaterSortable.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAA;AAExE,OAAO,EAGN,eAAe,EAUf,MAAM,eAAe,CAAA;AAKtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,gBAAgB,GAAI,2FAA2F;IAC3H,QAAQ,EAAE,SAAS,CAAA;CACnB,GAAG,eAAe,4CA2DlB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeaterSortableEachItem.d.ts","sourceRoot":"","sources":["../../../src/components/RepeaterSortableEachItem.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMxC;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,cAAc;IACtD,QAAQ,EAAE,SAAS,CAAA;CACnB,
|
|
1
|
+
{"version":3,"file":"RepeaterSortableEachItem.d.ts","sourceRoot":"","sources":["../../../src/components/RepeaterSortableEachItem.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMxC;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,cAAc;IACtD,QAAQ,EAAE,SAAS,CAAA;CACnB,4CAYA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/contexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAIzD,gBAAgB;AAChB,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/contexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAIzD,gBAAgB;AAChB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AAC1E;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;CAAkC,CAAA;AAGtE,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,qDAAkC,CAAA;AAC1E;;GAEG;AACH,eAAO,MAAM,uBAAuB,kCAAkC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAE1B,cAAc,2BAA2B,CAAA"}
|