@widgetic/creator 0.3.49

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 (42) hide show
  1. package/README.md +116 -0
  2. package/dist/CreatorApp.svelte +11821 -0
  3. package/dist/CreatorApp.svelte.d.ts +41 -0
  4. package/dist/components/EditableName.svelte +94 -0
  5. package/dist/components/EditableName.svelte.d.ts +27 -0
  6. package/dist/components/SelectorDropdown.svelte +238 -0
  7. package/dist/components/SelectorDropdown.svelte.d.ts +41 -0
  8. package/dist/components/WidgetDetails.svelte +3127 -0
  9. package/dist/components/WidgetDetails.svelte.d.ts +235 -0
  10. package/dist/components/index.d.ts +0 -0
  11. package/dist/components/index.js +4 -0
  12. package/dist/constants.d.ts +1 -0
  13. package/dist/constants.js +1 -0
  14. package/dist/creator-types.d.ts +64 -0
  15. package/dist/creator-types.js +1 -0
  16. package/dist/index.d.ts +4 -0
  17. package/dist/index.js +5 -0
  18. package/dist/localCacheGate.d.ts +7 -0
  19. package/dist/localCacheGate.js +29 -0
  20. package/dist/pageHelpers.d.ts +15 -0
  21. package/dist/pageHelpers.js +194 -0
  22. package/dist/stores/userSession.d.ts +7 -0
  23. package/dist/stores/userSession.js +32 -0
  24. package/dist/stores/websocketStore.d.ts +53 -0
  25. package/dist/stores/websocketStore.js +289 -0
  26. package/dist/syncSiteAuth.d.ts +9 -0
  27. package/dist/syncSiteAuth.js +53 -0
  28. package/dist/utils/creatorDraftStorage.d.ts +17 -0
  29. package/dist/utils/creatorDraftStorage.js +87 -0
  30. package/dist/utils/embedCode.d.ts +51 -0
  31. package/dist/utils/embedCode.js +69 -0
  32. package/dist/utils/models.d.ts +4 -0
  33. package/dist/utils/models.js +94 -0
  34. package/dist/utils/operationStream.d.ts +29 -0
  35. package/dist/utils/operationStream.js +116 -0
  36. package/dist/utils/prototypes.d.ts +0 -0
  37. package/dist/utils/prototypes.js +20 -0
  38. package/dist/utils/widgeticChatUpload.d.ts +26 -0
  39. package/dist/utils/widgeticChatUpload.js +148 -0
  40. package/dist/utils.d.ts +11 -0
  41. package/dist/utils.js +38 -0
  42. package/package.json +124 -0
package/README.md ADDED
@@ -0,0 +1,116 @@
1
+ # Widget Creator – Local Development Notes
2
+
3
+ ## VM Preview Configuration
4
+
5
+ The Widget Preview modal proxies through the API Gateway. Configure the front-end by creating or updating `.env.local` with:
6
+
7
+ ```
8
+ VITE_WIDGET_VM_PREVIEW_ORIGIN=http://localhost:3000/v1/agent
9
+ ```
10
+
11
+ After editing the file, restart `pnpm dev` so Vite reloads the environment variables. When a VM session is selected, the modal and “Open in new tab” button will hit:
12
+
13
+ ```
14
+ {VITE_WIDGET_VM_PREVIEW_ORIGIN}/vms/{vmSessionId}/preview
15
+ ```
16
+
17
+ If the variable is missing, the UI shows guidance and logs a single warning in development.
18
+
19
+ ---
20
+
21
+ # create-svelte
22
+
23
+ Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
24
+
25
+ ## Creating a project
26
+
27
+ If you're seeing this, you've probably already done this step. Congrats!
28
+
29
+ ```bash
30
+ # create a new project in the current directory
31
+ npm create svelte@latest
32
+
33
+ # create a new project in my-app
34
+ npm create svelte@latest my-app
35
+ ```
36
+
37
+ ## Developing
38
+
39
+ Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
40
+
41
+ ```bash
42
+ npm run dev
43
+
44
+ # or start the server and open the app in a new browser tab
45
+ npm run dev -- --open
46
+ ```
47
+
48
+ ## Building
49
+
50
+ To create a production version of your app:
51
+
52
+ ```bash
53
+ npm run build
54
+ ```
55
+
56
+ You can preview the production build with `npm run preview`.
57
+
58
+ > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
59
+
60
+
61
+
62
+
63
+
64
+ o make it work with both Svelte 4 and Svelte 5, we need to take a more flexible approach. Here's how you can resolve this:
65
+
66
+ 1. First, remove the specific Svelte dependency from your project:
67
+ ```bash
68
+ npm uninstall svelte
69
+ ```
70
+
71
+ 2. Install svelte-preprocess-react as a dev dependency:
72
+ ```bash
73
+ npm install --save-dev svelte-preprocess-react
74
+ ```
75
+
76
+ 3. In your package.json, add a peer dependency for Svelte that allows both version 4 and 5:
77
+ ```json
78
+ "svelte": "^4.0.0 || ^5.0.0-next.0"
79
+ ```
80
+
81
+ 4. Update your svelte.config.js (or create one if it doesn't exist) to use svelte-preprocess-react:
82
+ ```js
83
+ import preprocessReact from 'svelte-preprocess-react/preprocessReact';
84
+
85
+ export default {
86
+ preprocess: [preprocessReact()]
87
+ };
88
+ ```
89
+
90
+ 5. In your project's root, create a .npmrc file (if it doesn't exist) and add:
91
+ ```bash
92
+ legacy-peer-deps=true
93
+ ```
94
+ This allows npm to install packages with peer dependencies that don't strictly match.
95
+
96
+ 6. Clear your npm cache:
97
+ ```bash
98
+ npm cache clean --force
99
+ ```
100
+
101
+ 7. Remove the node_modules folder and package-lock.json:
102
+ ```bash
103
+ rm -rf node_modules package-lock.json
104
+ ```
105
+
106
+ 8. Reinstall dependencies:
107
+ ```bash
108
+ npm install
109
+ ```
110
+
111
+ These steps should resolve the dependency conflicts and allow your project to work with both Svelte 4 and Svelte 5. The key points are:
112
+ - Using peer dependencies to allow flexibility in the Svelte version.
113
+ - Using svelte-preprocess-react as a dev dependency to handle React preprocessing.
114
+ - Allowing legacy peer dependencies to resolve version conflicts.
115
+ - Remember to adjust your code to be compatible with both Svelte 4 and Svelte 5 syntax where necessary. For example, use conditional imports or runtime checks to handle differences between versions.
116
+ - If you still encounter issues, you might need to review other dependencies in your project that might be causing conflicts with Svelte versions.