@reform-society/agera-survey 0.1.0 → 0.1.1

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.
package/README.md CHANGED
@@ -11,9 +11,18 @@ A lightweight, attribute-driven runtime for multi-step surveys on Webflow pages.
11
11
  - Persistent session state via `localStorage`
12
12
  - Lazy-loaded phone validation for optimal bundle size
13
13
  - Basin integration for form submissions
14
+ - Quiz mode with weighted scoring
14
15
 
15
16
  ## Installation
16
17
 
18
+ **Via CDN (recommended):**
19
+
20
+ ```html
21
+ <script src="https://cdn.jsdelivr.net/npm/@reform-society/agera-survey@0.1.0"></script>
22
+ ```
23
+
24
+ **Via npm:**
25
+
17
26
  ```bash
18
27
  pnpm add @reform-society/agera-survey
19
28
  ```
@@ -51,22 +60,18 @@ Available at `window.agera.survey`:
51
60
  |--------|-------------|
52
61
  | `goToStep(id)` | Navigate to a step |
53
62
  | `getCurrentStep()` | Get current step ID |
63
+ | `getStepPath()` | Get navigation history |
54
64
  | `getAnswers()` | Get all answers |
55
65
  | `setAnswer(key, value)` | Set an answer programmatically |
56
66
  | `validateCurrentStep()` | Validate current step |
57
67
  | `reset()` | Clear session and reload |
68
+ | `triggerPartialSubmit()` | Send partial submission to Basin |
69
+ | `triggerFinalSubmit()` | Send final submission to Basin |
70
+ | `getQuizResults()` | Get quiz scores (if quiz mode) |
71
+ | `getQuizScores()` | Get scores by category |
72
+ | `getQuizWinner()` | Get winning category |
58
73
  | `dev` | Enable/disable debug mode |
59
-
60
- ## Documentation
61
-
62
- See [docs/](./docs/) for detailed documentation:
63
-
64
- - [Attributes Reference](./docs/attributes.md)
65
- - [Transitions](./docs/transitions.md)
66
- - [Validation](./docs/validation.md)
67
- - [Conditional Logic](./docs/conditional-logic.md)
68
- - [Quiz Mode](./docs/quiz-mode.md)
69
- - [Basin Integration](./docs/basin-integration.md)
74
+ | `version` | Runtime version string |
70
75
 
71
76
  ## Development
72
77
 
@@ -78,4 +83,4 @@ pnpm check # Lint + typecheck
78
83
 
79
84
  ## License
80
85
 
81
- MIT - Reform Society
86
+ Proprietary - Reform Society. All rights reserved.