@illuminateeducation/dna-atd-frontend 1.0.5 → 2.0.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 (35) hide show
  1. package/README.md +20 -19
  2. package/dist/embed/dna-atd-embed.css +1 -0
  3. package/dist/embed/dna-atd-embed.iife.js +29 -0
  4. package/dist/embed/dna-atd-embed.iife.js.map +1 -0
  5. package/package.json +29 -7
  6. package/dist/AdminLayout-BQWZADPC.js +0 -74
  7. package/dist/AdminLayout-BQWZADPC.js.map +0 -1
  8. package/dist/AdminLayout-BaO704Tp.cjs +0 -2
  9. package/dist/AdminLayout-BaO704Tp.cjs.map +0 -1
  10. package/dist/CustomizationView-BJlqBq4I.js +0 -15
  11. package/dist/CustomizationView-BJlqBq4I.js.map +0 -1
  12. package/dist/CustomizationView-BRNwaKvj.cjs +0 -2
  13. package/dist/CustomizationView-BRNwaKvj.cjs.map +0 -1
  14. package/dist/HomeView-7jy27idX.js +0 -10
  15. package/dist/HomeView-7jy27idX.js.map +0 -1
  16. package/dist/HomeView-D6NWAtxc.cjs +0 -2
  17. package/dist/HomeView-D6NWAtxc.cjs.map +0 -1
  18. package/dist/NotFoundView-BCWgZLYs.js +0 -28
  19. package/dist/NotFoundView-BCWgZLYs.js.map +0 -1
  20. package/dist/NotFoundView-CNvAC47u.cjs +0 -2
  21. package/dist/NotFoundView-CNvAC47u.cjs.map +0 -1
  22. package/dist/ValidationView-DY83tE4M.js +0 -15
  23. package/dist/ValidationView-DY83tE4M.js.map +0 -1
  24. package/dist/ValidationView-ltSgO4AC.cjs +0 -2
  25. package/dist/ValidationView-ltSgO4AC.cjs.map +0 -1
  26. package/dist/assets/dna-atd-frontend.css +0 -1
  27. package/dist/index-1yktdPHs.cjs +0 -2
  28. package/dist/index-1yktdPHs.cjs.map +0 -1
  29. package/dist/index-CiZS9VrS.js +0 -461
  30. package/dist/index-CiZS9VrS.js.map +0 -1
  31. package/dist/index.cjs.js +0 -2
  32. package/dist/index.cjs.js.map +0 -1
  33. package/dist/index.es.js +0 -30
  34. package/dist/index.es.js.map +0 -1
  35. /package/dist/{favicon.ico → embed/favicon.ico} +0 -0
package/README.md CHANGED
@@ -1,16 +1,13 @@
1
1
  # DNA ATD Frontend
2
2
 
3
- [![CI](https://github.com/illuminateeducation/dna-atd-frontend/workflows/Continuous%20Integration/badge.svg)](https://github.com/illuminateeducation/dna-atd-frontend/actions/workflows/ci.yml)
4
- [![Publish to npm](https://github.com/illuminateeducation/dna-atd-frontend/workflows/Publish%20to%20npm/badge.svg)](https://github.com/illuminateeducation/dna-atd-frontend/actions/workflows/npm-publish.yml)
5
-
6
- Vue 3 application with feature-based architecture and backend integration.
3
+ Vue 3 library with feature-based architecture and host-app integration helpers.
7
4
 
8
5
  ---
9
6
 
10
7
  ## Quick Start
11
8
 
12
9
  ```bash
13
- npm install
10
+ npm ci
14
11
  npm run dev
15
12
  npm run build
16
13
  ```
@@ -37,32 +34,36 @@ src/
37
34
 
38
35
  ## Backend Integration
39
36
 
40
- **Pass data via HTML attributes:**
37
+ This library reads backend bootstrap data from a host-provided global object (default: `window.APP_DATA`) and exposes it via Vue Provide/Inject.
38
+
39
+ **Provide bootstrap data from PHP:**
41
40
 
42
41
  ```html
43
- <div id="app"
44
- data-config='{"api_url":"https://api.example.com"}'
45
- data-user='{"id":1,"name":"John"}'>
46
- </div>
47
- <script type="module" src="/dist/assets/index.js"></script>
42
+ <div id="app"></div>
43
+ <script>
44
+ window.APP_DATA = {
45
+ config: { api_url: 'https://api.example.com' },
46
+ user: { id: 1, name: 'John' },
47
+ }
48
+ </script>
48
49
  ```
49
50
 
50
- **Use in Vue:**
51
+ **Consume in Vue (Composition API):**
51
52
 
52
53
  ```javascript
53
- import integration from '@/services/integration'
54
+ import { useBackendContext } from '@illuminateeducation/dna-atd-frontend'
54
55
 
55
- const config = integration.getConfig()
56
- const user = integration.getUser()
56
+ const { config, user } = useBackendContext()
57
57
  ```
58
58
 
59
59
  ---
60
60
 
61
61
  ## Build Configuration
62
62
 
63
- - Single JS/CSS output
64
- - Relative paths
65
- - Manifest generation
63
+ This package is published as an **ESM-only** npm library.
64
+
65
+ - Build output: `dist/index.es.js` + `dist/index.d.ts`
66
+ - Library build: `npm run build`
66
67
 
67
68
  ---
68
69
 
@@ -73,4 +74,4 @@ const user = integration.getUser()
73
74
 
74
75
  ---
75
76
 
76
- **Built with Vue 3 + Vite + Pinia**
77
+ **Built with Vue 3 + Vite + Pinia + Vuetify**