@explorer02/cfm-survey-sdk 0.1.9 → 0.2.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.
- package/package.json +1 -1
- package/templates/docs/01-components/01-survey-page.md +2 -0
- package/templates/docs/01-components/02-question.md +2 -0
- package/templates/docs/01-components/03-rating-scale.md +2 -0
- package/templates/docs/01-components/04-csat-scale.md +3 -1
- package/templates/docs/01-components/05-csat-matrix-scale.md +2 -0
- package/templates/docs/01-components/06-likert-matrix-scale.md +2 -0
- package/templates/docs/01-components/07-slider-matrix-scale.md +2 -0
- package/templates/docs/01-components/08-file-upload-scale.md +2 -0
- package/templates/docs/01-components/09-custom-slider-track.md +2 -0
- package/templates/docs/01-components/10-header-footer.md +3 -1
- package/templates/docs/01-components/11-progress-bar.md +2 -0
- package/templates/docs/01-components/12-language-selector.md +2 -0
- package/templates/docs/01-components/13-matrix-dropdown.md +2 -0
- package/templates/docs/01-components/README.md +2 -2
- package/templates/docs/02-reference/config-field-index.md +158 -0
- package/templates/docs/02-reference/routing-table.md +16 -16
- package/templates/docs/03-ui-specs/00-question-shell.md +89 -0
- package/templates/docs/03-ui-specs/01-rating.md +80 -0
- package/templates/docs/03-ui-specs/02-radio.md +57 -0
- package/templates/docs/03-ui-specs/03-text.md +51 -0
- package/templates/docs/03-ui-specs/04-csat.md +57 -0
- package/templates/docs/03-ui-specs/05-rating-scale.md +49 -0
- package/templates/docs/03-ui-specs/06-slider.md +42 -0
- package/templates/docs/03-ui-specs/07-matrix-cfm.md +66 -0
- package/templates/docs/03-ui-specs/08-matrix-csat-rating.md +65 -0
- package/templates/docs/03-ui-specs/09-slider-matrix.md +61 -0
- package/templates/docs/03-ui-specs/10-file-upload.md +54 -0
- package/templates/docs/03-ui-specs/11-text-and-media.md +49 -0
- package/templates/docs/03-ui-specs/12-survey-chrome.md +60 -0
- package/templates/docs/03-ui-specs/README.md +79 -0
- package/templates/docs/03-ui-specs/shared/custom-slider-track.md +52 -0
- package/templates/docs/03-ui-specs/shared/matrix-dropdown.md +38 -0
- package/templates/docs/MANIFEST.json +22 -1
- package/templates/docs/index.md +14 -3
- package/templates/docs/templates/implementation_plan.md +13 -0
|
@@ -125,5 +125,26 @@
|
|
|
125
125
|
"component": "01-components/02-question.md",
|
|
126
126
|
"reference": "02-reference/question-types/README.md#text_and_media"
|
|
127
127
|
}
|
|
128
|
-
}
|
|
128
|
+
},
|
|
129
|
+
"uiSpecs": {
|
|
130
|
+
"questionShell": "03-ui-specs/00-question-shell.md",
|
|
131
|
+
"rating": "03-ui-specs/01-rating.md",
|
|
132
|
+
"radio": "03-ui-specs/02-radio.md",
|
|
133
|
+
"text": "03-ui-specs/03-text.md",
|
|
134
|
+
"csat": "03-ui-specs/04-csat.md",
|
|
135
|
+
"rating_scale": "03-ui-specs/05-rating-scale.md",
|
|
136
|
+
"slider": "03-ui-specs/06-slider.md",
|
|
137
|
+
"matrix_CFM_MATRIX": "03-ui-specs/07-matrix-cfm.md",
|
|
138
|
+
"matrix_CSAT_MATRIX": "03-ui-specs/08-matrix-csat-rating.md",
|
|
139
|
+
"matrix_RATING_MATRIX": "03-ui-specs/08-matrix-csat-rating.md",
|
|
140
|
+
"slider_matrix": "03-ui-specs/09-slider-matrix.md",
|
|
141
|
+
"file_upload": "03-ui-specs/10-file-upload.md",
|
|
142
|
+
"text_and_media": "03-ui-specs/11-text-and-media.md",
|
|
143
|
+
"surveyChrome": "03-ui-specs/12-survey-chrome.md"
|
|
144
|
+
},
|
|
145
|
+
"sharedUiSpecs": {
|
|
146
|
+
"customSliderTrack": "03-ui-specs/shared/custom-slider-track.md",
|
|
147
|
+
"matrixDropdown": "03-ui-specs/shared/matrix-dropdown.md"
|
|
148
|
+
},
|
|
149
|
+
"configFieldIndex": "02-reference/config-field-index.md"
|
|
129
150
|
}
|
package/templates/docs/index.md
CHANGED
|
@@ -11,8 +11,9 @@ docs/
|
|
|
11
11
|
├── index.md ← YOU ARE HERE
|
|
12
12
|
├── MANIFEST.json ← Phase + question-type routing (for tooling)
|
|
13
13
|
├── 00-integration/ ← Setup, hook contract, constraints
|
|
14
|
-
├── 01-components/ ←
|
|
15
|
-
├── 02-reference/ ← Routing table +
|
|
14
|
+
├── 01-components/ ← Wiring blueprints (read ALL before coding)
|
|
15
|
+
├── 02-reference/ ← Routing table + config-field-index (on demand)
|
|
16
|
+
├── 03-ui-specs/ ← Authoritative UI specs (reference-client driven)
|
|
16
17
|
└── templates/
|
|
17
18
|
└── implementation_plan.md
|
|
18
19
|
```
|
|
@@ -73,7 +74,15 @@ For each question type in the fetched survey, also read matching docs from `02-r
|
|
|
73
74
|
|
|
74
75
|
Read: `00-integration/constraints.md`
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
For each question in `state.currentQuestions`:
|
|
78
|
+
|
|
79
|
+
1. Read `02-reference/question-types/{type}.md` for data shape
|
|
80
|
+
2. Read `03-ui-specs/{NN}-{type}.md` (use `MANIFEST.json` `uiSpecs`; split matrix by `subType`)
|
|
81
|
+
3. If `matrixFormat`, `buttonType`, or `sliderType` is present → read `03-ui-specs/shared/` specs
|
|
82
|
+
4. Cross-check `02-reference/config-field-index.md` for every non-default field
|
|
83
|
+
5. Match reference client behavior in `apps/client/src/components/` when available
|
|
84
|
+
|
|
85
|
+
Implement components per blueprints + UI specs. Use exported types:
|
|
77
86
|
|
|
78
87
|
```typescript
|
|
79
88
|
import { useSurveySDK, ACTIONS, type SurveyAction } from '@explorer02/cfm-survey-sdk';
|
|
@@ -106,4 +115,6 @@ If yes: `npx cfm-sdk deploy` (preferred) or `npx vercel --prod --yes`
|
|
|
106
115
|
| Always first | `index.md`, `00-integration/setup.md`, `00-integration/useSurveySDK.md`, `00-integration/constraints.md` |
|
|
107
116
|
| Before any React code | All `01-components/*.md` |
|
|
108
117
|
| On demand | `02-reference/question-types/<type>.md` for types in survey |
|
|
118
|
+
| Before building each question | `03-ui-specs/` per `MANIFEST.uiSpecs` |
|
|
119
|
+
| Config audit | `02-reference/config-field-index.md` |
|
|
109
120
|
| Tooling | `MANIFEST.json`, `templates/implementation_plan.md` |
|
|
@@ -59,6 +59,19 @@ Exhaustive switch — check each:
|
|
|
59
59
|
| LanguageSelector | | `01-components/12-language-selector.md` | |
|
|
60
60
|
| MatrixDropdown | | `01-components/13-matrix-dropdown.md` | |
|
|
61
61
|
|
|
62
|
+
## 4b. Per-Question Config & UI Coverage
|
|
63
|
+
|
|
64
|
+
Fill one row per question in the fetched survey:
|
|
65
|
+
|
|
66
|
+
| questionId | type | subType | configs detected | uiSpec read | ref component | branches implemented |
|
|
67
|
+
|------------|------|---------|------------------|-------------|---------------|---------------------|
|
|
68
|
+
| | | | | | | |
|
|
69
|
+
|
|
70
|
+
- **configs detected:** non-default fields from `02-reference/config-field-index.md` (e.g. `matrixFormat: carousel`, `buttonType: emoji`)
|
|
71
|
+
- **uiSpec read:** path from `MANIFEST.json` `uiSpecs` (matrix: use `matrix_{subType}`)
|
|
72
|
+
- **ref component:** `apps/client/src/components/{Component}.tsx`
|
|
73
|
+
- **branches implemented:** list decision-tree branches from the ui-spec (e.g. dropdown vs grid vs carousel)
|
|
74
|
+
|
|
62
75
|
## 5. Theme, Brand & Logo
|
|
63
76
|
|
|
64
77
|
- [ ] CSS-only logo (no `<img>`, no `public/` uploads)
|