@pie-lib/drag 4.0.7-next.65 → 4.1.0-next.41

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 (69) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +11 -0
  2. package/dist/drag-in-the-blank-dp.d.ts +29 -0
  3. package/dist/drag-in-the-blank-dp.js +44 -0
  4. package/dist/drag-provider.d.ts +41 -0
  5. package/dist/drag-provider.js +46 -0
  6. package/dist/drag-type.d.ts +16 -0
  7. package/dist/draggable-choice.d.ts +43 -0
  8. package/dist/draggable-choice.js +63 -0
  9. package/dist/droppable-placeholder.d.ts +29 -0
  10. package/dist/droppable-placeholder.js +36 -0
  11. package/dist/ica-dp.d.ts +24 -0
  12. package/dist/ica-dp.js +20 -0
  13. package/dist/index.d.ts +17 -0
  14. package/dist/index.js +9 -0
  15. package/dist/match-list-dp.d.ts +26 -0
  16. package/dist/match-list-dp.js +21 -0
  17. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
  18. package/dist/placeholder.d.ts +31 -0
  19. package/dist/placeholder.js +97 -0
  20. package/dist/preview-component.d.ts +11 -0
  21. package/dist/swap.d.ts +10 -0
  22. package/dist/swap.js +9 -0
  23. package/dist/uid-context.d.ts +13 -0
  24. package/dist/uid-context.js +15 -0
  25. package/package.json +31 -15
  26. package/CHANGELOG.json +0 -1
  27. package/CHANGELOG.md +0 -822
  28. package/LICENSE.md +0 -5
  29. package/lib/drag-in-the-blank-dp.js +0 -66
  30. package/lib/drag-in-the-blank-dp.js.map +0 -1
  31. package/lib/drag-provider.js +0 -95
  32. package/lib/drag-provider.js.map +0 -1
  33. package/lib/drag-type.js +0 -14
  34. package/lib/drag-type.js.map +0 -1
  35. package/lib/draggable-choice.js +0 -95
  36. package/lib/draggable-choice.js.map +0 -1
  37. package/lib/droppable-placeholder.js +0 -50
  38. package/lib/droppable-placeholder.js.map +0 -1
  39. package/lib/ica-dp.js +0 -37
  40. package/lib/ica-dp.js.map +0 -1
  41. package/lib/index.js +0 -61
  42. package/lib/index.js.map +0 -1
  43. package/lib/match-list-dp.js +0 -49
  44. package/lib/match-list-dp.js.map +0 -1
  45. package/lib/placeholder.js +0 -131
  46. package/lib/placeholder.js.map +0 -1
  47. package/lib/preview-component.js +0 -154
  48. package/lib/preview-component.js.map +0 -1
  49. package/lib/swap.js +0 -18
  50. package/lib/swap.js.map +0 -1
  51. package/lib/uid-context.js +0 -26
  52. package/lib/uid-context.js.map +0 -1
  53. package/src/__tests__/drag-provider.test.jsx +0 -395
  54. package/src/__tests__/placeholder.test.jsx +0 -107
  55. package/src/__tests__/preview-component.test.jsx +0 -537
  56. package/src/__tests__/swap.test.js +0 -161
  57. package/src/__tests__/uid-context.test.jsx +0 -54
  58. package/src/drag-in-the-blank-dp.jsx +0 -65
  59. package/src/drag-provider.jsx +0 -90
  60. package/src/drag-type.js +0 -7
  61. package/src/draggable-choice.jsx +0 -83
  62. package/src/droppable-placeholder.jsx +0 -41
  63. package/src/ica-dp.jsx +0 -25
  64. package/src/index.js +0 -19
  65. package/src/match-list-dp.jsx +0 -36
  66. package/src/placeholder.jsx +0 -138
  67. package/src/preview-component.jsx +0 -145
  68. package/src/swap.js +0 -14
  69. package/src/uid-context.js +0 -13
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/drag/src/uid-context.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ declare const Consumer: React.Consumer<number>, Provider: React.Provider<number>;
11
+ export { Provider, Consumer };
12
+ export declare const generateId: () => string;
13
+ export declare const withUid: (Component: any) => (props: any) => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { __exportAll as e } from "./_virtual/_rolldown/runtime.js";
2
+ import t from "react";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region src/uid-context.tsx
5
+ var r = /* @__PURE__ */ e({
6
+ Consumer: () => i,
7
+ Provider: () => a,
8
+ generateId: () => o,
9
+ withUid: () => s
10
+ }), { Consumer: i, Provider: a } = t.createContext(-1), o = () => (Math.random() * 1000001).toFixed(0), s = (e) => (t) => /* @__PURE__ */ n(i, { children: (r) => /* @__PURE__ */ n(e, {
11
+ ...t,
12
+ uid: r
13
+ }) });
14
+ //#endregion
15
+ export { i as Consumer, a as Provider, o as generateId, r as uid_context_exports, s as withUid };
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@pie-lib/drag",
3
- "version": "4.0.7-next.65+cfa076a8a",
3
+ "version": "4.1.0-next.41",
4
4
  "description": "",
5
- "main": "lib/index.js",
6
- "module": "src/index.js",
7
- "repository": "pie-framework/pie-lib",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/pie-framework/pie-elements-ng.git",
8
+ "directory": "packages/lib-react/drag"
9
+ },
8
10
  "dependencies": {
9
11
  "@dnd-kit/core": "6.3.1",
10
12
  "@dnd-kit/sortable": "10.0.0",
@@ -13,18 +15,32 @@
13
15
  "@emotion/styled": "^11.14.1",
14
16
  "@mui/icons-material": "^7.3.4",
15
17
  "@mui/material": "^7.3.4",
16
- "@pie-lib/math-rendering": "^5.1.0",
17
- "@pie-lib/render-ui": "^6.1.4-next.65+cfa076a8a",
18
- "classnames": "^2.2.6",
19
- "lodash-es": "^4.17.23",
18
+ "@pie-lib/render-ui": "6.2.0-next.41",
20
19
  "prop-types": "^15.7.2",
21
- "react": "^18.2.0"
20
+ "clsx": "^2.1.1",
21
+ "@pie-element/shared-math-rendering-mathjax": "0.1.1-next.0",
22
+ "@pie-element/shared-lodash": "0.1.1-next.1"
23
+ },
24
+ "type": "module",
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "default": "./dist/index.js"
31
+ }
22
32
  },
23
- "publishConfig": {
24
- "access": "public"
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "sideEffects": false,
37
+ "scripts": {
38
+ "build": "bun x vite build && bun x tsc --emitDeclarationOnly",
39
+ "dev": "bun x vite",
40
+ "test": "bun x vitest run"
25
41
  },
26
- "scripts": {},
27
- "author": "",
28
- "license": "ISC",
29
- "gitHead": "cfa076a8a8c5b9528ad666b8e41e631e86e0df29"
42
+ "peerDependencies": {
43
+ "react": "^18.0.0",
44
+ "react-dom": "^18.0.0"
45
+ }
30
46
  }
package/CHANGELOG.json DELETED
@@ -1 +0,0 @@
1
- []