@powerhousedao/common 1.11.2 → 2.5.0-test.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.
@@ -0,0 +1,3 @@
1
+ import { type Operation } from "document-model";
2
+ export declare const getRevisionFromDate: (startDate?: Date, endDate?: Date, operations?: Operation[]) => number;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,eAAO,MAAM,mBAAmB,GAC9B,YAAY,IAAI,EAChB,UAAU,IAAI,EACd,aAAY,SAAS,EAAO,WAU7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ export const getRevisionFromDate = (startDate, endDate, operations = []) => {
2
+ if (!startDate || !endDate)
3
+ return 0;
4
+ const operation = operations.find((operation) => {
5
+ const operationDate = new Date(operation.timestamp);
6
+ return operationDate >= startDate && operationDate <= endDate;
7
+ });
8
+ return operation ? operation.index : 0;
9
+ };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,SAAgB,EAChB,OAAc,EACd,aAA0B,EAAE,EAC5B,EAAE;IACF,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO;QAAE,OAAO,CAAC,CAAC;IAErC,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE;QAC9C,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACpD,OAAO,aAAa,IAAI,SAAS,IAAI,aAAa,IAAI,OAAO,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@powerhousedao/common",
3
- "version": "1.11.2",
3
+ "version": "2.5.0-test.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "/dist"
8
8
  ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/powerhouse-inc/powerhouse"
12
+ },
9
13
  "exports": {
10
14
  ".": "./dist/index.js",
11
15
  "./*": "./dist/*.js"
@@ -19,20 +23,20 @@
19
23
  "peerDependencies": {
20
24
  "react": "^18.3.1",
21
25
  "react-dom": "^18.3.1",
22
- "@powerhousedao/reactor-browser": "1.23.2"
26
+ "@powerhousedao/reactor-browser": "2.5.0-test.0"
23
27
  },
24
28
  "dependencies": {
25
29
  "@tanstack/react-virtual": "^3.8.1",
26
30
  "react-i18next": "^13.5.0",
27
- "@powerhousedao/builder-tools": "0.10.2",
28
- "@powerhousedao/design-system": "1.40.2",
29
- "document-drive": "1.30.2",
30
- "document-model": "3.0.2"
31
+ "@powerhousedao/builder-tools": "2.5.0-test.0",
32
+ "document-drive": "2.5.0-test.0",
33
+ "document-model": "2.5.0-test.0",
34
+ "@powerhousedao/design-system": "2.5.0-test.0"
31
35
  },
32
36
  "devDependencies": {
33
- "@tailwindcss/cli": "^4.0.9",
34
- "@tailwindcss/vite": "^4.0.9",
35
- "@types/node": "^22.10.9",
37
+ "@tailwindcss/cli": "^4.1.4",
38
+ "@tailwindcss/vite": "^4.1.4",
39
+ "@types/node": "^22.15.17",
36
40
  "@types/react": "^18.3.18",
37
41
  "@types/wicg-file-system-access": "^2020.9.6",
38
42
  "autoprefixer": "^10.4.20",
@@ -42,15 +46,16 @@
42
46
  "react": "^18.3.1",
43
47
  "react-dom": "^18.3.1",
44
48
  "storybook-mock-date-decorator": "^2.0.6",
45
- "tsx": "^4.19.2",
46
49
  "tailwind-merge": "^3.0.2",
47
50
  "tailwindcss": "^4.0.9",
51
+ "tsx": "^4.19.2",
48
52
  "uuid": "^11.0.5",
49
- "vite": "^6.2.2",
50
- "zod": "^3.24.1",
51
- "@powerhousedao/config": "1.28.1",
52
- "@powerhousedao/reactor-browser": "1.23.2",
53
- "document-model": "3.0.2"
53
+ "vite": "^6.3.3",
54
+ "vitest": "^3.1.2",
55
+ "zod": "^3.24.3",
56
+ "@powerhousedao/reactor-browser": "2.5.0-test.0",
57
+ "@powerhousedao/config": "2.5.0-test.0",
58
+ "document-model": "2.5.0-test.0"
54
59
  },
55
60
  "scripts": {
56
61
  "dev": "ph-cli dev --config-file ./powerhouse.config.json",
@@ -58,6 +63,7 @@
58
63
  "build:tsc": "tsc --build",
59
64
  "lint": "eslint",
60
65
  "build": "npm run build:css && npm run build:tsc",
66
+ "prebuild": "npm run clean",
61
67
  "storybook": "storybook dev -p 6006",
62
68
  "build-storybook": "storybook build",
63
69
  "clean": "rimraf dist",