ui/AI.yaml

49 lines
2.8 KiB
YAML

package: apigo.cc/web/ui
rules:
- Read only documents required by the task.
- Preserve declarative bindings when extending a component.
- Do not change framework internals unless framework changes are requested.
- Add or update a regression test for every public behavior change.
- Before declaring a public API complete, compare its YAML attributes, properties, methods, events, slots, state fields, options, and rules against named test assertions and examples. Every documented item needs coverage; examples must visibly demonstrate the core behavior declaratively.
- In an ordered value list, the first value is the default.
- Treat each component test as a concise, declarative usage sample: prepare immutable top-level `const` data before DOM parsing, then bind it directly (for example `$.state.list="users"`). Do not add State or window bridge assignments unless shared mutable state is required.
- Prefer framework directives ($if, $bind, $onclick, slots) and Bootstrap classes over imperative page setup or custom CSS. Keep test actions limited to assertions and interaction verification.
- Test pages use full-height flex layouts: the component area fills remaining space and result output is a bounded, internally scrollable region.
- The outer test console keeps the selected test active and represents pass/fail with a visible status badge; detailed output belongs inside the selected test page.
- Public source and YAML use the same PascalCase basename (for example `components/base/List.js` and `components/base/List.yaml`, `frameworks/State.js` and `frameworks/State.yaml`).
loading:
example: '<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/ui@1.0.0/ui.js" components="base,form"></script>'
rules:
- Load ui.js in head without async, defer, or type="module".
- Always write components with every public component used by the page.
- Use `base` or `form` to load the documented component category; individual names and category names can be mixed.
- Do not list utilities or framework dependencies.
- ui.js loads frameworks/State.js and frameworks/Bootstrap.js beside itself.
- npm run build writes source modification versions into ui.js; ui.min.js loads matching adjacent .min.js files.
framework:
- frameworks/State.yaml
- frameworks/Bootstrap.yaml
components:
- components/base/API.yaml
- components/base/AutoForm.yaml
- components/base/List.yaml
- components/base/Modal.yaml
- components/base/Dialog.yaml
- components/base/Toast.yaml
- components/base/Nav.yaml
- components/base/Resizer.yaml
- components/form/DatePicker.yaml
- components/form/ColorPicker.yaml
- components/form/IconPicker.yaml
- components/form/TagsInput.yaml
- components/data/DataGrid.yaml
- components/data/Chart.yaml
utilities:
- utilities/HTTP.yaml
- utilities/VirtualScroll.yaml