@nyaruka/temba-components 0.134.6 → 0.136.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 (76) hide show
  1. package/.github/workflows/publish.yml +16 -8
  2. package/CHANGELOG.md +84 -0
  3. package/demo/components/webchat/example.html +4 -2
  4. package/dist/static/svg/index.svg +1 -1
  5. package/dist/temba-components.js +1346 -334
  6. package/dist/temba-components.js.map +1 -1
  7. package/out-tsc/src/Icons.js +2 -1
  8. package/out-tsc/src/Icons.js.map +1 -1
  9. package/out-tsc/src/display/Chat.js +7 -2
  10. package/out-tsc/src/display/Chat.js.map +1 -1
  11. package/out-tsc/src/display/Thumbnail.js +65 -8
  12. package/out-tsc/src/display/Thumbnail.js.map +1 -1
  13. package/out-tsc/src/flow/CanvasNode.js +11 -0
  14. package/out-tsc/src/flow/CanvasNode.js.map +1 -1
  15. package/out-tsc/src/flow/Editor.js +224 -2
  16. package/out-tsc/src/flow/Editor.js.map +1 -1
  17. package/out-tsc/src/flow/Plumber.js +320 -1
  18. package/out-tsc/src/flow/Plumber.js.map +1 -1
  19. package/out-tsc/src/interfaces.js +1 -0
  20. package/out-tsc/src/interfaces.js.map +1 -1
  21. package/out-tsc/src/layout/FloatingWindow.js +30 -8
  22. package/out-tsc/src/layout/FloatingWindow.js.map +1 -1
  23. package/out-tsc/src/simulator/Simulator.js +1827 -0
  24. package/out-tsc/src/simulator/Simulator.js.map +1 -0
  25. package/out-tsc/src/store/AppState.js +33 -0
  26. package/out-tsc/src/store/AppState.js.map +1 -1
  27. package/out-tsc/src/utils.js +55 -6
  28. package/out-tsc/src/utils.js.map +1 -1
  29. package/out-tsc/temba-modules.js +2 -0
  30. package/out-tsc/temba-modules.js.map +1 -1
  31. package/out-tsc/test/temba-flow-editor.test.js +1 -1
  32. package/out-tsc/test/temba-flow-editor.test.js.map +1 -1
  33. package/out-tsc/test/temba-flow-plumber-connections.test.js +3 -1
  34. package/out-tsc/test/temba-flow-plumber-connections.test.js.map +1 -1
  35. package/out-tsc/test/temba-flow-plumber.test.js +3 -1
  36. package/out-tsc/test/temba-flow-plumber.test.js.map +1 -1
  37. package/out-tsc/test/temba-simulator.test.js +642 -0
  38. package/out-tsc/test/temba-simulator.test.js.map +1 -0
  39. package/out-tsc/test/temba-thumbnail.test.js +120 -0
  40. package/out-tsc/test/temba-thumbnail.test.js.map +1 -0
  41. package/out-tsc/test/temba-utils-index.test.js +12 -6
  42. package/out-tsc/test/temba-utils-index.test.js.map +1 -1
  43. package/out-tsc/test/utils.test.js +1 -1
  44. package/out-tsc/test/utils.test.js.map +1 -1
  45. package/package.json +1 -1
  46. package/screenshots/truth/simulator/after-message-sent.png +0 -0
  47. package/screenshots/truth/simulator/after-reset.png +0 -0
  48. package/screenshots/truth/simulator/attachment-menu.png +0 -0
  49. package/screenshots/truth/simulator/context-expanded.png +0 -0
  50. package/screenshots/truth/simulator/context-explorer-open.png +0 -0
  51. package/screenshots/truth/simulator/event-info.png +0 -0
  52. package/screenshots/truth/simulator/image-attachment.png +0 -0
  53. package/screenshots/truth/simulator/open-initial.png +0 -0
  54. package/screenshots/truth/simulator/quick-replies.png +0 -0
  55. package/src/Icons.ts +2 -1
  56. package/src/display/Chat.ts +10 -1
  57. package/src/display/Thumbnail.ts +67 -8
  58. package/src/flow/CanvasNode.ts +12 -0
  59. package/src/flow/Editor.ts +240 -1
  60. package/src/flow/Plumber.ts +371 -2
  61. package/src/interfaces.ts +2 -1
  62. package/src/layout/FloatingWindow.ts +36 -11
  63. package/src/simulator/Simulator.ts +2008 -0
  64. package/src/store/AppState.ts +53 -0
  65. package/src/utils.ts +59 -6
  66. package/static/svg/index.svg +1 -1
  67. package/static/svg/work/traced/route.svg +1 -0
  68. package/static/svg/work/used/route.svg +3 -0
  69. package/temba-modules.ts +2 -0
  70. package/test/temba-flow-editor.test.ts +1 -1
  71. package/test/temba-flow-plumber-connections.test.ts +4 -1
  72. package/test/temba-flow-plumber.test.ts +4 -1
  73. package/test/temba-simulator.test.ts +866 -0
  74. package/test/temba-thumbnail.test.ts +150 -0
  75. package/test/temba-utils-index.test.ts +14 -6
  76. package/test/utils.test.ts +1 -1
@@ -7,7 +7,7 @@ on:
7
7
  permissions:
8
8
  id-token: write
9
9
  contents: read
10
-
10
+
11
11
  jobs:
12
12
  build:
13
13
  runs-on: ubuntu-latest
@@ -16,17 +16,25 @@ jobs:
16
16
  - name: Checkout (GitHub)
17
17
  uses: actions/checkout@v4
18
18
  - run: docker network create --driver bridge textit_default
19
- - name: Build and run dev container task
19
+ - name: Build in dev container
20
20
  uses: devcontainers/ci@v0.3
21
21
  with:
22
22
  runCmd: yarn run build
23
23
  push: never
24
24
  env: |
25
25
  CI=true
26
- - name: Publish
26
+ - name: Check build output
27
+ run: ls -la && ls -la dist/ || echo "No dist folder"
28
+ - name: Setup Node.js and upgrade npm
29
+ uses: actions/setup-node@v4
30
+ with:
31
+ node-version: '20'
32
+ - name: Upgrade npm to latest (requires 9.5.0+ for provenance)
27
33
  run: |
28
- npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
29
- npm publish --access public
30
- env:
31
- CI: true
32
- NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
34
+ echo "Current npm version:"
35
+ npm --version
36
+ npm install -g npm@latest
37
+ echo "Updated npm version:"
38
+ npm --version
39
+ - name: Publish to NPM
40
+ run: npm publish --provenance --access public
package/CHANGELOG.md CHANGED
@@ -4,8 +4,92 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.136.0](https://github.com/nyaruka/temba-components/compare/v0.135.9...v0.136.0)
8
+
9
+ - Add path and active counts [`#791`](https://github.com/nyaruka/temba-components/pull/791)
10
+ - Bump qs from 6.12.0 to 6.14.1 [`#782`](https://github.com/nyaruka/temba-components/pull/782)
11
+ - Simulator attachments [`#790`](https://github.com/nyaruka/temba-components/pull/790)
12
+ - Pointer events [`#789`](https://github.com/nyaruka/temba-components/pull/789)
13
+ - Add quick replies to simulator [`#787`](https://github.com/nyaruka/temba-components/pull/787)
14
+ - Three simulator sizes to choose from [`#786`](https://github.com/nyaruka/temba-components/pull/786)
15
+ - Add context explorer [`#785`](https://github.com/nyaruka/temba-components/pull/785)
16
+ - Add initial framework for simulator [`#784`](https://github.com/nyaruka/temba-components/pull/784)
17
+ - Add simulator tests [`64429ba`](https://github.com/nyaruka/temba-components/commit/64429baef7da01ab1f1fef229aaa5b04f0c92b6b)
18
+ - Add activity counts and recent contacts [`fa5c369`](https://github.com/nyaruka/temba-components/commit/fa5c36908db34b76831b3f6609303ddb697c0a52)
19
+ - Update simulator attachments [`6ed1811`](https://github.com/nyaruka/temba-components/commit/6ed1811329dfe46437d7323967b479a9d93e4c2f)
20
+
21
+ #### [v0.135.9](https://github.com/nyaruka/temba-components/compare/v0.135.8...v0.135.9)
22
+
23
+ > 18 December 2025
24
+
25
+ - Update npm version [`be777e2`](https://github.com/nyaruka/temba-components/commit/be777e21e1b64a2cc1affa1e42dddccb7d23e893)
26
+
27
+ #### [v0.135.8](https://github.com/nyaruka/temba-components/compare/v0.135.7...v0.135.8)
28
+
29
+ > 18 December 2025
30
+
31
+ - Use npm config for provenance [`f831a0f`](https://github.com/nyaruka/temba-components/commit/f831a0f7d2997f2082a94913480929d53f3fd163)
32
+
33
+ #### [v0.135.7](https://github.com/nyaruka/temba-components/compare/v0.135.6...v0.135.7)
34
+
35
+ > 18 December 2025
36
+
37
+ - Add artifact debug [`43983d7`](https://github.com/nyaruka/temba-components/commit/43983d7f1ec2f6a2250f66cd5927850c279c13df)
38
+
39
+ #### [v0.135.6](https://github.com/nyaruka/temba-components/compare/v0.135.5...v0.135.6)
40
+
41
+ > 18 December 2025
42
+
43
+ - Remove registry url [`f4331df`](https://github.com/nyaruka/temba-components/commit/f4331df917feac61bd8ffabfc6bb3c25118634b2)
44
+
45
+ #### [v0.135.5](https://github.com/nyaruka/temba-components/compare/v0.135.4...v0.135.5)
46
+
47
+ > 18 December 2025
48
+
49
+ - Try publishing outside of the devcontainer [`5c12715`](https://github.com/nyaruka/temba-components/commit/5c127157fd0dfc7e72040d19da80ad8e236ef312)
50
+
51
+ #### [v0.135.4](https://github.com/nyaruka/temba-components/compare/v0.135.3...v0.135.4)
52
+
53
+ > 18 December 2025
54
+
55
+ - Pass along env variables to dev container [`1eea099`](https://github.com/nyaruka/temba-components/commit/1eea0993e6c4bb50ffddde23849a20b94ad0cf7d)
56
+
57
+ #### [v0.135.3](https://github.com/nyaruka/temba-components/compare/v0.135.2...v0.135.3)
58
+
59
+ > 18 December 2025
60
+
61
+ - Add env variable for publish [`14f9d8b`](https://github.com/nyaruka/temba-components/commit/14f9d8be9fb4ff73166bb21b79e0afe22d54bf8a)
62
+
63
+ #### [v0.135.2](https://github.com/nyaruka/temba-components/compare/v0.135.1...v0.135.2)
64
+
65
+ > 18 December 2025
66
+
67
+ - Add provenance flag for publish [`37c711a`](https://github.com/nyaruka/temba-components/commit/37c711a650965a89be9d3a782f4b93c1f84ab972)
68
+
69
+ #### [v0.135.1](https://github.com/nyaruka/temba-components/compare/v0.135.0...v0.135.1)
70
+
71
+ > 18 December 2025
72
+
73
+ - Remove npm auth token [`76ec221`](https://github.com/nyaruka/temba-components/commit/76ec2212dab4cf23b5b1b6481b2ac6dc6aec5ebb)
74
+ - Remove NODE_AUTH_TOKEN from publish workflow [`8fe0a48`](https://github.com/nyaruka/temba-components/commit/8fe0a48cec5f61e68b61f0da5ad20698df096f1b)
75
+
76
+ #### [v0.135.0](https://github.com/nyaruka/temba-components/compare/v0.134.6...v0.135.0)
77
+
78
+ > 17 December 2025
79
+
80
+ - Fix geo attachments [`#777`](https://github.com/nyaruka/temba-components/pull/777)
81
+ - Cache tile URL calculation to avoid recomputation on every render [`#781`](https://github.com/nyaruka/temba-components/pull/781)
82
+ - Add test coverage for latLngToTile coordinate conversion [`#780`](https://github.com/nyaruka/temba-components/pull/780)
83
+ - Bump validator from 13.15.20 to 13.15.23 [`#774`](https://github.com/nyaruka/temba-components/pull/774)
84
+ - Send `X-Temba-Workspace` header instead of `X-Temba-Org` [`#776`](https://github.com/nyaruka/temba-components/pull/776)
85
+ - Add comprehensive tests for latLngToTile method [`8ffc89c`](https://github.com/nyaruka/temba-components/commit/8ffc89c298093cbcf3e36381f9c2d1e905de6b44)
86
+ - Update progress - validation complete [`0dec144`](https://github.com/nyaruka/temba-components/commit/0dec1446e0b038d904d4dd43a8ccafba8fb82859)
87
+ - Send X-Temba-Workspace header instead of X-Temba-Org [`5fed4b7`](https://github.com/nyaruka/temba-components/commit/5fed4b7684eb8e94202796d90218b48ddcc6265a)
88
+
7
89
  #### [v0.134.6](https://github.com/nyaruka/temba-components/compare/v0.134.5...v0.134.6)
8
90
 
91
+ > 3 December 2025
92
+
9
93
  - Deleted message treatment [`#775`](https://github.com/nyaruka/temba-components/pull/775)
10
94
  - Add screenshot tests for deleted messages [`db32633`](https://github.com/nyaruka/temba-components/commit/db32633ab3153d658e7d8f77cf77e8ce84186bdc)
11
95
  - MsgEVent._deleted.user is optional [`b8135d9`](https://github.com/nyaruka/temba-components/commit/b8135d944cb260b0594a0b40c7c4764d420045c3)
@@ -53,7 +53,7 @@
53
53
  <temba-textinput
54
54
  onkeypress="handleKeyPress(event)"
55
55
  placeholder="Channel UUID"
56
- value="5b39fa63-67a1-48e5-a91c-f7b17d304da2"
56
+ value="f6e7fa80-bec9-409b-bd39-e687f136f6e6"
57
57
  ></temba-textinput>
58
58
  </div>
59
59
  <temba-button
@@ -62,7 +62,9 @@
62
62
  ></temba-button>
63
63
  </div>
64
64
 
65
- <temba-webchat></temba-webchat>
65
+ <temba-webchat
66
+ channel="f6e7fa80-bec9-409b-bd39-e687f136f6e6"
67
+ ></temba-webchat>
66
68
 
67
69
  <script type="module">
68
70
  import '/out-tsc/temba-modules.js';