profile-pane 3.2.0 → 3.2.2-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.
Files changed (256) hide show
  1. package/README.md +50 -0
  2. package/icons-png/discord.png +0 -0
  3. package/icons-png/dribbble.png +0 -0
  4. package/icons-png/facebook.png +0 -0
  5. package/icons-png/instagram.png +0 -0
  6. package/icons-png/linkedin.png +0 -0
  7. package/icons-png/pinterest.png +0 -0
  8. package/icons-png/sharechat.png +0 -0
  9. package/icons-png/signup.png +0 -0
  10. package/icons-png/snapchat.png +0 -0
  11. package/icons-png/spotify.png +0 -0
  12. package/icons-png/telegram.png +0 -0
  13. package/icons-png/tiktok.png +0 -0
  14. package/icons-png/whatsapp.png +0 -0
  15. package/icons-png/x.png +0 -0
  16. package/icons-png/youtube.png +0 -0
  17. package/lib/303.profile-pane.js +1362 -0
  18. package/lib/303.profile-pane.js.map +1 -0
  19. package/lib/303.profile-pane.min.js +2 -0
  20. package/lib/303.profile-pane.min.js.map +1 -0
  21. package/lib/ProfileView.css +1090 -0
  22. package/lib/ProfileView.d.ts +2 -1
  23. package/lib/ProfileView.d.ts.map +1 -1
  24. package/lib/ProfileView.js +64 -36
  25. package/lib/buttonsHelper.d.ts +1 -1
  26. package/lib/buttonsHelper.d.ts.map +1 -1
  27. package/lib/buttonsHelper.js +2 -1
  28. package/lib/editProfilePane/EditCVCard.js +1 -1
  29. package/lib/editProfilePane/EditCommunitiesCard.js +1 -1
  30. package/lib/editProfilePane/EditFriendsCard.js +1 -1
  31. package/lib/editProfilePane/EditProfileView.d.ts +1 -1
  32. package/lib/editProfilePane/EditProfileView.d.ts.map +1 -1
  33. package/lib/editProfilePane/EditProfileView.js +4 -5
  34. package/lib/editProfilePane/editProfilePresenter.d.ts.map +1 -1
  35. package/lib/editProfilePane/editProfilePresenter.js +5 -4
  36. package/lib/icons-svg/profileIcons.d.ts +1 -1
  37. package/lib/icons-svg/profileIcons.d.ts.map +1 -1
  38. package/lib/icons-svg/profileIcons.js +9 -17
  39. package/lib/index.d.ts +1 -8
  40. package/lib/index.d.ts.map +1 -1
  41. package/lib/index.js +74 -40
  42. package/lib/ontology/otherPreferencesForm.ttl +32 -0
  43. package/lib/ontology/resumeForm.ttl +349 -0
  44. package/lib/ontology/socialMedia.ttl +433 -0
  45. package/lib/profile-pane.js +32266 -13247
  46. package/lib/profile-pane.js.map +1 -1
  47. package/lib/profile-pane.min.js +2315 -935
  48. package/lib/profile-pane.min.js.map +1 -1
  49. package/lib/rdfFormsHelper.d.ts +13 -1
  50. package/lib/rdfFormsHelper.d.ts.map +1 -1
  51. package/lib/rdfFormsHelper.js +13 -1
  52. package/lib/sections/bio/BioEditDialog.d.ts.map +1 -1
  53. package/lib/sections/bio/BioEditDialog.js +7 -7
  54. package/lib/sections/bio/BioSection.css +300 -0
  55. package/lib/sections/bio/BioSection.d.ts +3 -2
  56. package/lib/sections/bio/BioSection.d.ts.map +1 -1
  57. package/lib/sections/bio/BioSection.js +26 -19
  58. package/lib/sections/bio/mutations.d.ts.map +1 -1
  59. package/lib/sections/bio/mutations.js +14 -3
  60. package/lib/sections/contactInfo/ContactInfoEditDialog.css +354 -0
  61. package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts +3 -1
  62. package/lib/sections/contactInfo/ContactInfoEditDialog.d.ts.map +1 -1
  63. package/lib/sections/contactInfo/ContactInfoEditDialog.js +183 -98
  64. package/lib/sections/contactInfo/ContactInfoSection.css +125 -0
  65. package/lib/sections/contactInfo/ContactInfoSection.d.ts +2 -0
  66. package/lib/sections/contactInfo/ContactInfoSection.d.ts.map +1 -1
  67. package/lib/sections/contactInfo/ContactInfoSection.js +64 -41
  68. package/lib/sections/contactInfo/mutations.d.ts.map +1 -1
  69. package/lib/sections/contactInfo/mutations.js +51 -16
  70. package/lib/sections/education/EducationEditDialog.d.ts +3 -1
  71. package/lib/sections/education/EducationEditDialog.d.ts.map +1 -1
  72. package/lib/sections/education/EducationEditDialog.js +170 -92
  73. package/lib/sections/education/EducationSection.css +133 -0
  74. package/lib/sections/education/EducationSection.d.ts +3 -2
  75. package/lib/sections/education/EducationSection.d.ts.map +1 -1
  76. package/lib/sections/education/EducationSection.js +32 -25
  77. package/lib/sections/education/mutations.d.ts.map +1 -1
  78. package/lib/sections/education/mutations.js +14 -3
  79. package/lib/sections/heading/HeadingEditDialog.d.ts +4 -1
  80. package/lib/sections/heading/HeadingEditDialog.d.ts.map +1 -1
  81. package/lib/sections/heading/HeadingEditDialog.js +287 -162
  82. package/lib/sections/heading/HeadingSection.css +862 -0
  83. package/lib/sections/heading/HeadingSection.d.ts +3 -2
  84. package/lib/sections/heading/HeadingSection.d.ts.map +1 -1
  85. package/lib/sections/heading/HeadingSection.js +63 -32
  86. package/lib/sections/heading/imageHelpers.d.ts +1 -0
  87. package/lib/sections/heading/imageHelpers.d.ts.map +1 -1
  88. package/lib/sections/heading/imageHelpers.js +40 -1
  89. package/lib/sections/heading/mutations.d.ts.map +1 -1
  90. package/lib/sections/heading/mutations.js +86 -23
  91. package/lib/sections/heading/selectors.d.ts.map +1 -1
  92. package/lib/sections/heading/selectors.js +14 -3
  93. package/lib/sections/heading/types.d.ts +1 -2
  94. package/lib/sections/heading/types.d.ts.map +1 -1
  95. package/lib/sections/languages/LanguageEditDialog.d.ts +3 -1
  96. package/lib/sections/languages/LanguageEditDialog.d.ts.map +1 -1
  97. package/lib/sections/languages/LanguageEditDialog.js +202 -119
  98. package/lib/sections/languages/LanguageSection.css +53 -0
  99. package/lib/sections/languages/LanguageSection.d.ts +2 -0
  100. package/lib/sections/languages/LanguageSection.d.ts.map +1 -1
  101. package/lib/sections/languages/LanguageSection.js +42 -31
  102. package/lib/sections/languages/mutations.d.ts.map +1 -1
  103. package/lib/sections/languages/mutations.js +60 -161
  104. package/lib/sections/languages/selectors.d.ts.map +1 -1
  105. package/lib/sections/languages/selectors.js +1 -2
  106. package/lib/sections/projects/ProjectEditDialog.d.ts +2 -1
  107. package/lib/sections/projects/ProjectEditDialog.d.ts.map +1 -1
  108. package/lib/sections/projects/ProjectEditDialog.js +13 -24
  109. package/lib/sections/projects/ProjectSection.css +368 -0
  110. package/lib/sections/projects/ProjectSection.d.ts +2 -1
  111. package/lib/sections/projects/ProjectSection.d.ts.map +1 -1
  112. package/lib/sections/projects/ProjectSection.js +116 -34
  113. package/lib/sections/projects/mutations.d.ts.map +1 -1
  114. package/lib/sections/projects/mutations.js +109 -132
  115. package/lib/sections/projects/selectors.d.ts.map +1 -1
  116. package/lib/sections/projects/selectors.js +4 -45
  117. package/lib/{QRCodeCard.d.ts → sections/qrcode/QRCodeCard.d.ts} +2 -1
  118. package/lib/sections/qrcode/QRCodeCard.d.ts.map +1 -0
  119. package/lib/{QRCodeCard.js → sections/qrcode/QRCodeCard.js} +59 -11
  120. package/lib/sections/qrcode/QRCodeSection.css +108 -0
  121. package/lib/sections/qrcode/QRCodeSection.d.ts +4 -0
  122. package/lib/sections/qrcode/QRCodeSection.d.ts.map +1 -0
  123. package/lib/sections/qrcode/QRCodeSection.js +17 -0
  124. package/lib/sections/resume/ResumeEditDialog.d.ts +10 -1
  125. package/lib/sections/resume/ResumeEditDialog.d.ts.map +1 -1
  126. package/lib/sections/resume/ResumeEditDialog.js +531 -149
  127. package/lib/sections/resume/ResumeSection.css +350 -0
  128. package/lib/sections/resume/ResumeSection.d.ts +3 -2
  129. package/lib/sections/resume/ResumeSection.d.ts.map +1 -1
  130. package/lib/sections/resume/ResumeSection.js +78 -49
  131. package/lib/sections/resume/mutations.d.ts.map +1 -1
  132. package/lib/sections/resume/mutations.js +17 -3
  133. package/lib/sections/resume/selectors.d.ts.map +1 -1
  134. package/lib/sections/resume/selectors.js +1 -0
  135. package/lib/sections/resume/types.d.ts +1 -0
  136. package/lib/sections/resume/types.d.ts.map +1 -1
  137. package/lib/sections/shared/collapsibleSection.d.ts.map +1 -1
  138. package/lib/sections/shared/collapsibleSection.js +1 -0
  139. package/lib/sections/shared/phoneCountries.d.ts +1 -1
  140. package/lib/sections/shared/phoneCountries.d.ts.map +1 -1
  141. package/lib/sections/shared/phoneCountries.js +2 -2
  142. package/lib/sections/shared/projectCommunityNodes.d.ts +6 -0
  143. package/lib/sections/shared/projectCommunityNodes.d.ts.map +1 -0
  144. package/lib/sections/shared/projectCommunityNodes.js +56 -0
  145. package/lib/sections/shared/rdfMutationHelpers.d.ts +35 -2
  146. package/lib/sections/shared/rdfMutationHelpers.d.ts.map +1 -1
  147. package/lib/sections/shared/rdfMutationHelpers.js +290 -14
  148. package/lib/sections/shared/sectionCardHelpers.d.ts.map +1 -1
  149. package/lib/sections/shared/sectionCardHelpers.js +80 -11
  150. package/lib/sections/shared/types.d.ts +24 -0
  151. package/lib/sections/shared/types.d.ts.map +1 -1
  152. package/lib/sections/skills/SkillsEditDialog.d.ts +3 -1
  153. package/lib/sections/skills/SkillsEditDialog.d.ts.map +1 -1
  154. package/lib/sections/skills/SkillsEditDialog.js +136 -115
  155. package/lib/sections/skills/SkillsSection.css +173 -0
  156. package/lib/sections/skills/SkillsSection.d.ts +2 -0
  157. package/lib/sections/skills/SkillsSection.d.ts.map +1 -1
  158. package/lib/sections/skills/SkillsSection.js +107 -47
  159. package/lib/sections/skills/mutations.d.ts.map +1 -1
  160. package/lib/sections/skills/mutations.js +25 -21
  161. package/lib/sections/skills/selectors.d.ts.map +1 -1
  162. package/lib/sections/skills/selectors.js +5 -3
  163. package/lib/sections/social/SocialEditDialog.d.ts +3 -1
  164. package/lib/sections/social/SocialEditDialog.d.ts.map +1 -1
  165. package/lib/sections/social/SocialEditDialog.js +170 -62
  166. package/lib/sections/social/SocialSection.css +194 -0
  167. package/lib/sections/social/SocialSection.d.ts +4 -3
  168. package/lib/sections/social/SocialSection.d.ts.map +1 -1
  169. package/lib/sections/social/SocialSection.js +59 -43
  170. package/lib/sections/social/mutations.d.ts.map +1 -1
  171. package/lib/sections/social/mutations.js +23 -132
  172. package/lib/specialButtons/AddMeToYourFriends.css +54 -0
  173. package/lib/specialButtons/addContact/AddMeToYourContacts.css +1118 -0
  174. package/lib/specialButtons/addContact/ContactCreationDialog.d.ts +10 -0
  175. package/lib/specialButtons/addContact/ContactCreationDialog.d.ts.map +1 -0
  176. package/lib/specialButtons/addContact/ContactCreationDialog.js +1123 -0
  177. package/lib/specialButtons/addContact/addMeToYourContacts.d.ts +16 -0
  178. package/lib/specialButtons/addContact/addMeToYourContacts.d.ts.map +1 -0
  179. package/lib/specialButtons/addContact/addMeToYourContacts.js +136 -0
  180. package/lib/specialButtons/addContact/contactsErrors.d.ts +8 -0
  181. package/lib/specialButtons/addContact/contactsErrors.d.ts.map +1 -0
  182. package/lib/specialButtons/addContact/contactsErrors.js +106 -0
  183. package/lib/specialButtons/addContact/contactsTypes.d.ts +43 -0
  184. package/lib/specialButtons/addContact/contactsTypes.d.ts.map +1 -0
  185. package/lib/specialButtons/addContact/contactsTypes.js +5 -0
  186. package/lib/specialButtons/addContact/helpers.d.ts +7 -0
  187. package/lib/specialButtons/addContact/helpers.d.ts.map +1 -0
  188. package/lib/specialButtons/addContact/helpers.js +103 -0
  189. package/lib/specialButtons/addContact/mutations.d.ts +16 -0
  190. package/lib/specialButtons/addContact/mutations.d.ts.map +1 -0
  191. package/lib/specialButtons/addContact/mutations.js +300 -0
  192. package/lib/specialButtons/addContact/selectors.d.ts +10 -0
  193. package/lib/specialButtons/addContact/selectors.d.ts.map +1 -0
  194. package/lib/specialButtons/addContact/selectors.js +163 -0
  195. package/lib/{addMeToYourFriends.d.ts → specialButtons/addMeToYourFriends.d.ts} +6 -4
  196. package/lib/specialButtons/addMeToYourFriends.d.ts.map +1 -0
  197. package/lib/{addMeToYourFriends.js → specialButtons/addMeToYourFriends.js} +46 -11
  198. package/lib/styles/CollapsibleSection.css +519 -0
  199. package/lib/styles/EditDialogs.css +506 -686
  200. package/lib/styles/EditDialogs.responsive.css +989 -0
  201. package/lib/texts/buttonTexts.d.ts +9 -0
  202. package/lib/texts/buttonTexts.d.ts.map +1 -0
  203. package/lib/texts/buttonTexts.js +14 -0
  204. package/lib/texts/dialogTexts.d.ts +14 -0
  205. package/lib/texts/dialogTexts.d.ts.map +1 -0
  206. package/lib/texts/dialogTexts.js +19 -0
  207. package/lib/texts/messageTexts.d.ts +42 -0
  208. package/lib/texts/messageTexts.d.ts.map +1 -0
  209. package/lib/texts/messageTexts.js +47 -0
  210. package/lib/texts/profileTexts.d.ts +14 -0
  211. package/lib/texts/profileTexts.d.ts.map +1 -0
  212. package/lib/texts/profileTexts.js +19 -0
  213. package/lib/texts/qrCodeTexts.d.ts +2 -0
  214. package/lib/texts/qrCodeTexts.d.ts.map +1 -0
  215. package/lib/texts/qrCodeTexts.js +7 -0
  216. package/lib/texts.d.ts +5 -60
  217. package/lib/texts.d.ts.map +1 -1
  218. package/lib/texts.js +55 -70
  219. package/lib/ui/dialog.css +233 -0
  220. package/lib/ui/dialog.d.ts +15 -1
  221. package/lib/ui/dialog.d.ts.map +1 -1
  222. package/lib/ui/dialog.js +245 -45
  223. package/lib/ui/dialog.responsive.css +195 -0
  224. package/lib/ui/errors.d.ts.map +1 -1
  225. package/lib/ui/errors.js +2 -1
  226. package/lib/ui/spinner.d.ts +3 -0
  227. package/lib/ui/spinner.d.ts.map +1 -0
  228. package/lib/ui/spinner.js +13 -0
  229. package/lib/utils/debug.d.ts +5 -0
  230. package/lib/utils/debug.d.ts.map +1 -0
  231. package/lib/utils/debug.js +23 -0
  232. package/lib/utils/errorDisplay.d.ts +2 -0
  233. package/lib/utils/errorDisplay.d.ts.map +1 -0
  234. package/lib/utils/errorDisplay.js +19 -0
  235. package/package.json +34 -26
  236. package/lib/ChatWithMe.d.ts +0 -7
  237. package/lib/ChatWithMe.d.ts.map +0 -1
  238. package/lib/ChatWithMe.js +0 -90
  239. package/lib/QRCodeCard.d.ts.map +0 -1
  240. package/lib/addMeToYourFriends.d.ts.map +0 -1
  241. package/lib/sections/heading/camera.d.ts +0 -19
  242. package/lib/sections/heading/camera.d.ts.map +0 -1
  243. package/lib/sections/heading/camera.js +0 -199
  244. package/lib/styles/BioSection.css +0 -77
  245. package/lib/styles/CVCard.css +0 -142
  246. package/lib/styles/ChatWithMe.css +0 -6
  247. package/lib/styles/ContactInfoEditDialog.css +0 -153
  248. package/lib/styles/EducationCard.css +0 -103
  249. package/lib/styles/HeadingSection.css +0 -309
  250. package/lib/styles/ProfileCard.css +0 -66
  251. package/lib/styles/ProfileView.css +0 -65
  252. package/lib/styles/ProjectsCard.css +0 -206
  253. package/lib/styles/QRCodeCard.css +0 -43
  254. package/lib/styles/SocialCard.css +0 -89
  255. package/lib/styles/dialog.css +0 -209
  256. package/lib/styles/utilities.css +0 -740
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.error = error;
7
+ exports.log = log;
8
+ exports.trace = trace;
9
+ exports.warn = warn;
10
+ /* eslint-disable no-console */
11
+
12
+ function log(...args) {
13
+ console.log(...args);
14
+ }
15
+ function warn(...args) {
16
+ console.warn(...args);
17
+ }
18
+ function error(...args) {
19
+ console.error(...args);
20
+ }
21
+ function trace(...args) {
22
+ console.trace(...args);
23
+ }
@@ -0,0 +1,2 @@
1
+ export declare function formatDisplayError(error: unknown, fallbackMessage?: string): string;
2
+ //# sourceMappingURL=errorDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorDisplay.d.ts","sourceRoot":"","sources":["../../src/utils/errorDisplay.ts"],"names":[],"mappings":"AAYA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAEnF"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatDisplayError = formatDisplayError;
7
+ function stringifyUnknown(value) {
8
+ if (typeof value === 'string') return value;
9
+ if (value instanceof Error) return value.message || value.name;
10
+ if (value == null) return '';
11
+ try {
12
+ return JSON.stringify(value);
13
+ } catch {
14
+ return String(value);
15
+ }
16
+ }
17
+ function formatDisplayError(error, fallbackMessage) {
18
+ return (fallbackMessage || stringifyUnknown(error) || 'Something went wrong.').trim();
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "profile-pane",
3
- "version": "3.2.0",
3
+ "version": "3.2.2-test.0",
4
4
  "description": "A SolidOS compatible pane to display a personal profile page",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -13,15 +13,21 @@
13
13
  "types": "lib/index.d.ts",
14
14
  "files": [
15
15
  "/lib",
16
+ "/icons-png",
16
17
  "README.md",
17
18
  "LICENSE"
18
19
  ],
19
20
  "scripts": {
20
21
  "clean": "rm -rf lib",
21
22
  "build": "npm run clean && npm run typecheck && npm run build-dist && npm run build-js",
22
- "build-js": "babel src --out-dir lib --extensions '.ts' && tsc --emitDeclarationOnly",
23
+ "build-js": "babel src --out-dir lib --extensions '.ts' --copy-files && tsc --emitDeclarationOnly",
23
24
  "build-dist": "webpack --progress",
24
- "watch-js": "babel src --out-dir lib --extensions '.ts' --watch",
25
+ "dev": "sh -c 'npm run watch & npm run start'",
26
+ "watch": "sh -c 'npm run watch:solid-ui & npm run watch-js & npm run watch-styles & npm run watch-dist & wait'",
27
+ "watch:workspace": "sh -c 'npm run watch-js & npm run watch-styles & npm run watch-dist & wait'",
28
+ "watch:solid-ui": "sh -c 'cd ../solid-ui && npm run watch'",
29
+ "watch-js": "babel src --out-dir lib --extensions '.ts' --copy-files --watch",
30
+ "watch-styles": "node scripts/watch-styles.mjs",
25
31
  "watch-dist": "webpack --watch",
26
32
  "lint": "eslint",
27
33
  "lint-fix": "eslint --fix",
@@ -29,9 +35,10 @@
29
35
  "test-coverage": "jest --coverage",
30
36
  "typecheck": "tsc --noEmit",
31
37
  "typecheck-test": "tsc --noEmit -p tsconfig.test.json",
32
- "ignore:prepublishOnly": "npm run test && npm run build",
38
+ "prepush": "npm test && npm run lint-fix && npm run typecheck && npm run typecheck-test",
39
+ "prepublishOnly": "npm run test && npm run build",
33
40
  "preversion": "npm run lint && npm run typecheck && npm test",
34
- "ignore:postpublish": "git push origin main --follow-tags",
41
+ "postpublish": "git push origin main --follow-tags",
35
42
  "start": "webpack serve --config webpack.dev.config.mjs --open"
36
43
  },
37
44
  "keywords": [
@@ -48,8 +55,9 @@
48
55
  },
49
56
  "license": "MIT",
50
57
  "dependencies": {
51
- "lit-html": "^3.3.2",
52
- "pane-registry": "^3.1.0",
58
+ "@solid-data-modules/contacts-rdflib": "^0.7.1",
59
+ "lit-html": "^3.3.3",
60
+ "pane-registry": "^3.1.1",
53
61
  "qrcode": "^1.5.4",
54
62
  "validate-color": "^2.2.4"
55
63
  },
@@ -64,37 +72,37 @@
64
72
  "devDependencies": {
65
73
  "@babel/cli": "^7.28.6",
66
74
  "@babel/core": "^7.29.0",
67
- "@babel/preset-env": "^7.29.0",
75
+ "@babel/preset-env": "^7.29.5",
68
76
  "@babel/preset-typescript": "^7.28.5",
69
77
  "@testing-library/dom": "^10.4.1",
70
78
  "@testing-library/jest-dom": "^6.9.1",
71
79
  "@types/jest": "^30.0.0",
72
- "@typescript-eslint/eslint-plugin": "^8.55.0",
73
- "@typescript-eslint/parser": "^8.55.0",
74
- "axe-core": "^4.11.1",
75
- "babel-jest": "^30.2.0",
76
- "babel-loader": "^10.0.0",
80
+ "@typescript-eslint/eslint-plugin": "^8.59.3",
81
+ "@typescript-eslint/parser": "^8.59.3",
82
+ "axe-core": "^4.11.4",
83
+ "babel-jest": "^30.4.1",
84
+ "babel-loader": "^10.1.1",
77
85
  "babel-plugin-inline-import": "^3.0.0",
78
86
  "chat-pane": "^3.0.3",
79
87
  "contacts-pane": "^3.2.0",
80
88
  "copy-webpack-plugin": "^14.0.0",
81
89
  "css-loader": "^7.1.4",
82
- "eslint": "^9.39.2",
83
- "html-webpack-plugin": "^5.6.6",
84
- "jest": "^30.2.0",
85
- "jest-environment-jsdom": "^30.2.0",
90
+ "eslint": "^9.39.4",
91
+ "html-webpack-plugin": "^5.6.7",
92
+ "jest": "^30.4.2",
93
+ "jest-environment-jsdom": "^30.4.1",
86
94
  "jest-fetch-mock": "^3.0.3",
87
- "jsdom": "^29.0.0",
95
+ "jsdom": "^29.1.1",
88
96
  "node-polyfill-webpack-plugin": "^4.1.0",
89
- "rdflib": "^2.3.6",
90
- "solid-logic": "^4.0.6",
91
- "solid-ui": "^3.1.0",
97
+ "rdflib": "^2.3.9",
98
+ "solid-logic": "^4.0.7",
99
+ "solid-ui": "^3.1.1-test.0",
92
100
  "style-loader": "^4.0.0",
93
- "terser-webpack-plugin": "^5.3.16",
94
- "ts-loader": "^9.5.4",
95
- "typescript": "^5.9.3",
96
- "webpack": "^5.105.2",
101
+ "terser-webpack-plugin": "^5.6.0",
102
+ "ts-loader": "^9.5.7",
103
+ "typescript": "^6.0.3",
104
+ "webpack": "^5.106.2",
97
105
  "webpack-cli": "^7.0.2",
98
- "webpack-dev-server": "^5.2.3"
106
+ "webpack-dev-server": "^5.2.4"
99
107
  }
100
108
  }
@@ -1,7 +0,0 @@
1
- import { TemplateResult } from 'lit-html';
2
- import { DataBrowserContext } from 'pane-registry';
3
- import { NamedNode } from 'rdflib';
4
- import { ViewerMode } from './types';
5
- import './styles/ChatWithMe.css';
6
- export declare const ChatWithMe: (subject: NamedNode, context: DataBrowserContext, viewerMode: ViewerMode) => TemplateResult;
7
- //# sourceMappingURL=ChatWithMe.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatWithMe.d.ts","sourceRoot":"","sources":["../src/ChatWithMe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAMlC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,yBAAyB,CAAA;AAGhC,eAAO,MAAM,UAAU,GACrB,SAAS,SAAS,EAClB,SAAS,kBAAkB,EAC3B,YAAY,UAAU,KACrB,cA0FF,CAAA"}
package/lib/ChatWithMe.js DELETED
@@ -1,90 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ChatWithMe = void 0;
7
- var _litHtml = require("lit-html");
8
- var _solidUi = require("solid-ui");
9
- var _solidLogic = require("solid-logic");
10
- var _asyncReplace = require("lit-html/directives/async-replace.js");
11
- var _texts = require("./texts");
12
- var _buttonsHelper = require("./buttonsHelper");
13
- require("./styles/ChatWithMe.css");
14
- const ChatWithMe = (subject, context, viewerMode) => {
15
- const logic = context.session.logic;
16
- const longChatPane = context.session.paneRegistry.byName('long chat');
17
- async function* chatContainer() {
18
- const chatContainer = context.dom.createElement('section');
19
- chatContainer.setAttribute('class', 'chatSection section-centered');
20
- chatContainer.setAttribute('aria-labelledby', 'chat-section-title');
21
- chatContainer.setAttribute('role', 'region');
22
- chatContainer.setAttribute('data-testid', 'chat');
23
-
24
- // Add hidden title for screen readers
25
- const title = context.dom.createElement('h3');
26
- title.id = 'chat-section-title';
27
- title.className = 'sr-only';
28
- title.textContent = 'Communication';
29
- chatContainer.appendChild(title);
30
- let exists;
31
- try {
32
- yield (0, _litHtml.html)`
33
- <div class="buttonSubSection">
34
- <div class="profile__action-button loading-text center" role="status" aria-live="polite">
35
- ${_texts.loadingMessage.toUpperCase()}
36
- </div>
37
- </div>
38
- `;
39
- exists = await logic.chat.getChat(subject, false);
40
- } catch (e) {
41
- exists = false;
42
- }
43
- if (exists) {
44
- const chatArea = context.dom.createElement('div');
45
- chatArea.setAttribute('role', 'log');
46
- chatArea.setAttribute('aria-label', 'Chat conversation');
47
- chatArea.appendChild(longChatPane.render(exists, context, {}));
48
- chatContainer.appendChild(chatArea);
49
- yield chatContainer;
50
- } else {
51
- const me = _solidLogic.authn.currentUser();
52
- let label = (0, _buttonsHelper.checkIfAnyUserLoggedIn)(me) ? _texts.chatWithMeButtonText.toUpperCase() : _texts.logInToChatWithMeButtonText.toUpperCase();
53
- const button = _solidUi.widgets.button(context.dom, undefined, label, setButtonHandler, {
54
- needsBorder: true
55
- });
56
- async function setButtonHandler(event) {
57
- event.preventDefault();
58
- try {
59
- const chat = await logic.chat.getChat(subject, true);
60
- chatContainer.innerHTML = '';
61
- chatContainer.appendChild(longChatPane.render(chat, context, {}));
62
- } catch (error) {
63
- (0, _buttonsHelper.complain)(chatContainer, context, error);
64
- }
65
- }
66
- button.refresh = refreshButton();
67
- function refreshButton() {
68
- const me = _solidLogic.authn.currentUser();
69
- if ((0, _buttonsHelper.checkIfAnyUserLoggedIn)(me)) {
70
- button.innerHTML = _texts.chatWithMeButtonText.toUpperCase();
71
- } else {
72
- //not logged in
73
- button.innerHTML = _texts.logInToChatWithMeButtonText.toUpperCase();
74
- }
75
- }
76
- button.setAttribute('type', 'button');
77
- button.setAttribute('aria-describedby', 'chat-button-description');
78
- const description = context.dom.createElement('span');
79
- description.id = 'chat-button-description';
80
- description.className = 'sr-only';
81
- description.textContent = 'Start a new conversation or sign in to continue existing chat';
82
- button.classList.add('profile__action-button', 'btn-primary', 'action-button-focus');
83
- chatContainer.appendChild(button);
84
- chatContainer.appendChild(description);
85
- yield chatContainer;
86
- }
87
- }
88
- return (0, _litHtml.html)` ${(0, _asyncReplace.asyncReplace)(chatContainer())} `;
89
- };
90
- exports.ChatWithMe = ChatWithMe;
@@ -1 +0,0 @@
1
- {"version":3,"file":"QRCodeCard.d.ts","sourceRoot":"","sources":["../src/QRCodeCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAa,SAAS,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,yBAAyB,CAAA;AAMhC,KAAK,gBAAgB,GAAG,SAAS,GAAG,MAAM,CAAA;AAyF1C,eAAO,MAAM,UAAU,GACrB,MAAM,gBAAgB,EACtB,OAAO,OAAO,EACd,OAAO,OAAO,KACb,cAiEF,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"addMeToYourFriends.d.ts","sourceRoot":"","sources":["../src/addMeToYourFriends.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAM,MAAM,QAAQ,CAAA;AASjD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,0BAA0B,CAAA;AAIjC,QAAA,MAAM,qBAAqB,GACzB,SAAS,SAAS,EAClB,SAAS,kBAAkB,EAC3B,YAAY,UAAU,KACrB,cAkBF,CAAA;AAED,QAAA,MAAM,8BAA8B,GAClC,SAAS,SAAS,EAClB,SAAS,kBAAkB,KAC1B,iBA+CF,CAAA;AAED,iBAAe,YAAY,CACzB,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,IAAI,CAAC,CAoBf;AAOD,iBAAe,kBAAkB,CAC/B,KAAK,EAAE,SAAS,EAChB,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC,CAKlB;AAED,OAAO,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,YAAY,EACZ,kBAAkB,EACnB,CAAA"}
@@ -1,19 +0,0 @@
1
- import { IndexedFormula, NamedNode } from 'rdflib';
2
- /** A control to capture a picture using camera
3
- * @param {Docuemnt} dom - The Document object
4
- * @param {IndexedForumla} store - The quadstore to store data in
5
- * @param {NamedNode} getImageDoc() - NN of the image file to be created
6
- * @param {function} doneCallback - Called when a picture has been taken
7
- */
8
- export declare function cameraCaptureControl(dom: HTMLDocument, store: IndexedFormula, getImageDoc: () => NamedNode, doneCallback: (imageDoc: NamedNode | null) => Promise<void>): HTMLDivElement;
9
- /** A button to capture a picture using camera
10
- * @param {Docuemnt} dom - The Document object
11
- * @param {IndexedForumla} store - The quadstore to store data in
12
- * @param {fuunction} getImageDoc - returns NN of the image file to be created
13
- * @param {function<Node>} doneCallback - called with the image taken
14
- * @returns {DomElement} - A div element with the button in it
15
- *
16
- * This expands the button to a large control when it is pressed
17
- */
18
- export declare function cameraButton(dom: HTMLDocument, store: IndexedFormula, getImageDoc: () => NamedNode, doneCallback: (imageDoc: NamedNode | null) => Promise<void>): HTMLElement;
19
- //# sourceMappingURL=camera.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../../src/sections/heading/camera.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AASlD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,cAAc,EACrB,WAAW,EAAE,MAAM,SAAS,EAC5B,YAAY,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,kBA2J5D;AAED;;;;;;;;GAQG;AAEH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,cAAc,EACrB,WAAW,EAAE,MAAM,SAAS,EAC5B,YAAY,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,GAC1D,WAAW,CAqBb"}
@@ -1,199 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.cameraButton = cameraButton;
7
- exports.cameraCaptureControl = cameraCaptureControl;
8
- var _solidUi = require("solid-ui");
9
- var _litHtml = require("lit-html");
10
- var _profileIcons = require("../../icons-svg/profileIcons");
11
- //
12
- // Media input widget
13
- //
14
- //
15
- // Workflow:
16
- // The HTML5 functionality (on mobile) is to prompt for either
17
- // a realtime camera capture, OR a selection from images already on the device
18
- // (eg camera roll).
19
- //
20
- // The solid alternative is to either take a photo
21
- // or access camera roll (etc) OR to access solid cloud storage of favorite photo albums.
22
- // (Especially latest taken ones)
23
- //
24
-
25
- // Copied from solid-ui needed to change somethings, have made a PR in solid-ui
26
-
27
- const cameraIcon = _solidUi.icons.iconBase + 'noun_Camera_1618446_000000.svg'; // Get it from github
28
- const retakeIcon = _solidUi.icons.iconBase + 'noun_479395.svg'; // Get it from github
29
-
30
- const contentType = 'image/png';
31
-
32
- /** A control to capture a picture using camera
33
- * @param {Docuemnt} dom - The Document object
34
- * @param {IndexedForumla} store - The quadstore to store data in
35
- * @param {NamedNode} getImageDoc() - NN of the image file to be created
36
- * @param {function} doneCallback - Called when a picture has been taken
37
- */
38
- function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
39
- const div = dom.createElement('div');
40
- div.className = 'profile-edit-dialog__camera-control flex-column-center';
41
- let destination, imageBlob, player, canvas;
42
- const setButtonVisible = (button, visible) => {
43
- button.style.display = visible ? 'inline-flex' : 'none';
44
- };
45
- const table = div.appendChild(dom.createElement('table'));
46
- const mainTR = table.appendChild(dom.createElement('tr'));
47
- const main = mainTR.appendChild(dom.createElement('td'));
48
- main.setAttribute('colspan', '4');
49
- main.style.textAlign = 'center';
50
- const actionBar = div.appendChild(dom.createElement('div'));
51
- actionBar.className = 'profile-edit-dialog__camera-control-actions';
52
-
53
- /* Had to move away from widgets.button because of styling */
54
- const cancelButton = div.appendChild(dom.createElement('button'));
55
- cancelButton.type = 'button';
56
- cancelButton.classList.add('profile-edit-dialog__camera-control-cancel');
57
- cancelButton.setAttribute('aria-label', 'Close camera');
58
- cancelButton.setAttribute('title', 'Close');
59
- (0, _litHtml.render)(_profileIcons.closeIcon, cancelButton);
60
- cancelButton.addEventListener('click', _event => {
61
- stopVideo();
62
- doneCallback(null);
63
- });
64
- const retakeButton = actionBar.appendChild(_solidUi.widgets.button(dom, retakeIcon, 'Retake'));
65
- retakeButton.classList.add('profile-edit-dialog__camera-control-action');
66
- retakeButton.addEventListener('click', _event => {
67
- retake();
68
- });
69
- retakeButton.textContent = 'Retake';
70
- setButtonVisible(retakeButton, false);
71
- const shutterButton = actionBar.appendChild(_solidUi.widgets.button(dom, _solidUi.icons.iconBase + 'noun_10636.svg', 'Snap'));
72
- shutterButton.classList.add('profile-edit-dialog__camera-control-action');
73
- shutterButton.addEventListener('click', grabCanvas);
74
- shutterButton.textContent = 'Take Photo';
75
- setButtonVisible(shutterButton, false);
76
- const sendButton = actionBar.appendChild(_solidUi.widgets.continueButton(dom));
77
- sendButton.classList.add('profile-edit-dialog__camera-control-action');
78
- sendButton.addEventListener('click', _event => {
79
- saveBlob(imageBlob, destination);
80
- });
81
- sendButton.textContent = 'Use Photo';
82
- setButtonVisible(sendButton, false);
83
- function displayPlayer() {
84
- player = main.appendChild(dom.createElement('video'));
85
- player.setAttribute('controls', '1');
86
- player.setAttribute('autoplay', '1');
87
- player.setAttribute('style', _solidUi.style.controlStyle);
88
- if (!navigator.mediaDevices) {
89
- throw new Error('navigator.mediaDevices not available');
90
- }
91
- navigator.mediaDevices.getUserMedia(constraints).then(stream => {
92
- player.srcObject = stream;
93
- setButtonVisible(shutterButton, true);
94
- setButtonVisible(sendButton, false);
95
- setButtonVisible(retakeButton, false);
96
- }).catch(err => {
97
- console.error('Unable to start camera preview', err);
98
- doneCallback(null);
99
- });
100
- }
101
- const constraints = {
102
- video: {
103
- facingMode: {
104
- ideal: 'environment'
105
- }
106
- }
107
- };
108
- function retake() {
109
- main.removeChild(canvas);
110
- displayPlayer(); // Make new one as old one is stuck black
111
- }
112
- function grabCanvas() {
113
- // Draw the video frame to the canvas.
114
- canvas = dom.createElement('canvas');
115
- canvas.setAttribute('width', _solidUi.style.canvasWidth);
116
- canvas.setAttribute('height', _solidUi.style.canvasHeight);
117
- canvas.setAttribute('style', _solidUi.style.controlStyle);
118
- main.appendChild(canvas);
119
- const context = canvas.getContext('2d');
120
- if (!context) {
121
- throw new Error('Could not get canvas context for camera snapshot');
122
- }
123
- context.drawImage(player, 0, 0, canvas.width, canvas.height);
124
- stopVideo();
125
- player.parentNode.removeChild(player);
126
- canvas.toBlob(blob => {
127
- if (!blob) {
128
- throw new Error('Camera snapshot failed: no image blob produced');
129
- }
130
- const msg = `got blob type ${blob.type} size ${blob.size}`;
131
- console.debug(msg);
132
- destination = getImageDoc();
133
- imageBlob = blob; // save for review
134
- reviewImage();
135
- // alert(msg)
136
- }, contentType); // toBlob
137
- }
138
- function reviewImage() {
139
- setButtonVisible(sendButton, true);
140
- setButtonVisible(retakeButton, true);
141
- setButtonVisible(shutterButton, false);
142
- }
143
- function stopVideo() {
144
- if (player && player.srcObject) {
145
- player.srcObject.getVideoTracks().forEach(track => track.stop());
146
- }
147
- }
148
- function saveBlob(blob, destination) {
149
- if (!blob || !destination) return;
150
- const contentType = blob.type;
151
- // if (!confirm('Save picture to ' + destination + ' ?')) return
152
- console.debug('Putting ' + blob.size + ' bytes of ' + contentType + ' to ' + destination)
153
- // @@ TODO Remove casting
154
- ;
155
- store.fetcher.webOperation('PUT', destination.uri, {
156
- data: blob,
157
- contentType
158
- }).then(_resp => {
159
- console.debug('ok saved ' + destination);
160
- stopVideo();
161
- doneCallback(destination);
162
- }, err => {
163
- stopVideo();
164
- alert(err);
165
- });
166
- }
167
-
168
- // Attach the video stream to the video element and autoplay.
169
- displayPlayer();
170
- return div;
171
- }
172
-
173
- /** A button to capture a picture using camera
174
- * @param {Docuemnt} dom - The Document object
175
- * @param {IndexedForumla} store - The quadstore to store data in
176
- * @param {fuunction} getImageDoc - returns NN of the image file to be created
177
- * @param {function<Node>} doneCallback - called with the image taken
178
- * @returns {DomElement} - A div element with the button in it
179
- *
180
- * This expands the button to a large control when it is pressed
181
- */
182
-
183
- function cameraButton(dom, store, getImageDoc, doneCallback) {
184
- const div = dom.createElement('div');
185
- const but = _solidUi.widgets.button(dom, cameraIcon, 'Take picture');
186
- let control;
187
- async function restoreButton(imageDoc) {
188
- div.removeChild(control);
189
- div.appendChild(but);
190
- await doneCallback(imageDoc);
191
- }
192
- div.appendChild(but);
193
- but.addEventListener('click', _event => {
194
- div.removeChild(but);
195
- control = cameraCaptureControl(dom, store, getImageDoc, restoreButton);
196
- div.appendChild(control);
197
- });
198
- return div;
199
- }
@@ -1,77 +0,0 @@
1
- .bioDescriptionWrap {
2
- margin: 0;
3
- position: relative;
4
- isolation: isolate;
5
- }
6
-
7
- .bioDescriptionText {
8
- margin: 0;
9
- width: 100%;
10
- max-width: none;
11
- display: -webkit-box;
12
- -webkit-box-orient: vertical;
13
- -webkit-line-clamp: 3;
14
- line-clamp: 3;
15
- line-height: var(--line-height-base, 1.5);
16
- position: relative;
17
- overflow: hidden;
18
- }
19
-
20
- .bioDescriptionText:not(.isExpanded)::after {
21
- content: '';
22
- position: absolute;
23
- right: 0;
24
- top: calc(100% - 1.5em);
25
- width: 50%;
26
- height: 1.5em;
27
- background: var(--color-card-bg);
28
- pointer-events: none;
29
- }
30
-
31
- .bioDescriptionText.isExpanded {
32
- display: block;
33
- -webkit-line-clamp: unset;
34
- line-clamp: unset;
35
- overflow: visible;
36
- }
37
-
38
- .bioDescriptionToggle {
39
- margin: 0;
40
- padding: 0;
41
- border: 0;
42
- background: none;
43
- color: var(--color-primary);
44
- cursor: pointer;
45
- font: inherit;
46
- font-size: var(--font-size-sm);
47
- line-height: var(--line-height-base, 1.5);
48
- position: absolute;
49
- left: 50%;
50
- bottom: 0;
51
- background-color: var(--color-card-bg);
52
- white-space: nowrap;
53
- min-height: auto;
54
- min-width: auto;
55
- padding-left: 0;
56
- padding-right: 0;
57
- padding-top: 0;
58
- padding-bottom: 0;
59
- margin-left: 0;
60
- margin-right: 0;
61
- z-index: 0;
62
- }
63
-
64
- .bioDescriptionWrap .bioDescriptionText:not(.isExpanded) + .bioDescriptionToggle {
65
- top: calc(100% - 1.5em + 0.28em - 12px);
66
- bottom: auto;
67
- transform: translateY(7px);
68
- }
69
-
70
- .bioDescriptionText.isExpanded + .bioDescriptionToggle {
71
- position: static;
72
- display: inline;
73
- padding-left: 0;
74
- top: auto;
75
- bottom: auto;
76
- transform: none;
77
- }