@smartsoft001-mobilems/claude-plugins 2.118.0 → 2.120.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/plugins/mobilems/.claude-plugin/plugin.json +1 -1
- package/plugins/mobilems/skills/mobilems-object-collections/SKILL.md +9 -7
- package/plugins/mobilems/skills/mobilems-object-collections/references/lib-contents.md +5 -2
- package/plugins/mobilems/skills/mobilems-object-collections/references/module-and-routes.md +3 -12
- package/plugins/mobilems/skills/mobilems-object-collections/scripts/verify-module.sh +21 -0
package/package.json
CHANGED
|
@@ -34,12 +34,14 @@ list — re-implementing framework code is a defect, not a shortcut:
|
|
|
34
34
|
2. [`packages/public-collections/README.md`](https://github.com/smartsoft001/mobilems-framework/blob/main/packages/public-collections/README.md) — this module's package catalog
|
|
35
35
|
3. `libs/shared/angular/README.md` — the app's own shared lib (built by `mobilems-project-init`)
|
|
36
36
|
|
|
37
|
-
| Do not hand-roll
|
|
38
|
-
|
|
|
39
|
-
| a masonry grid (`new Masonry(...)`, per-page masonry JS/CSS)
|
|
40
|
-
| filter state / hand-built `query` arrays
|
|
41
|
-
| list
|
|
42
|
-
|
|
|
37
|
+
| Do not hand-roll | Use |
|
|
38
|
+
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| a masonry grid (`new Masonry(...)`, per-page masonry JS/CSS) | `<smart-mobilems-masonry-grid>` (`MasonryGridComponent`) with a `#masonryContentTpl`; the `Masonry` provider only feeds it |
|
|
40
|
+
| filter state / hand-built `query` arrays | `FiltersBaseComponent<PublicCollection>` + its `FiltersContext` accessors (`searchText`, `keywords`, `cycles`, `page`, `sort`, …) |
|
|
41
|
+
| list page logic (first read, persistence, SSR read, read guard, load-more, tag bar) | `CollectionsCatalogBaseComponent` (extends `PublicCollectionsListComponent`; the page keeps its own markup) |
|
|
42
|
+
| collection page logic (paged items, sort/limit, 404 vs error, SEO, list mode) | `CollectionDetailsBaseComponent` (extends `PublicCollectionsItemComponent`) + `PublicCollectionItemsService` (provided by `PublicCollectionsSharedModule`) |
|
|
43
|
+
| list/detail plumbing (facade wiring, id-from-route) | the `PublicCollectionsListComponent` / `PublicCollectionsItemComponent` base classes (already under the two catalog bases) |
|
|
44
|
+
| media URLs, meta/OG tags, filter dictionaries, modals, WCAG | `FileUrlService`, `SeoService`/`MetaService`, `DictionaryService`, `ModalService`, `WcagService` |
|
|
43
45
|
|
|
44
46
|
Anything the framework genuinely lacks goes into `libs/shared/angular` **once** (and into its
|
|
45
47
|
README) — never a per-module copy. `scripts/verify-module.sh` fails the run on hand-rolled masonry.
|
|
@@ -62,7 +64,7 @@ README) — never a per-module copy. `scripts/verify-module.sh` fails the run on
|
|
|
62
64
|
`references/lib-contents.md`. The `museum-collections` commit scope registers automatically from the `libs/` dir name.
|
|
63
65
|
3. **Module + routes** — see `references/module-and-routes.md`: `MuseumCollectionsModule` wraps
|
|
64
66
|
`PublicCollectionsSharedModule.forFeature({ routing: false, config: { type: MuseumCollection, apiUrl, entity: 'publicCollections' } })`
|
|
65
|
-
with
|
|
67
|
+
with `provideBrowserMasonry()`. No `CollectionsService` — the framework `PublicCollectionsSharedModule` provides `PublicCollectionItemsService`. Add the lazy
|
|
66
68
|
`kolekcje` route to `appRoutes` in `apps/web/src/app/app.routes.ts` and a matching child under the
|
|
67
69
|
`wyszukaj/:text` search route.
|
|
68
70
|
4. **Collections shared component** — see `references/shared-components.md`: build
|
|
@@ -20,10 +20,13 @@ libs/museum-collections/
|
|
|
20
20
|
├── collections.module.ts # MuseumCollectionsModule (references/module-and-routes.md)
|
|
21
21
|
├── collections.routes.ts
|
|
22
22
|
├── components/ # filters (keywords/cycles) + index
|
|
23
|
-
|
|
24
|
-
└── services/ # collections.service.ts + index
|
|
23
|
+
└── pages/ # list (ListComponent), item (ItemComponent) + index
|
|
25
24
|
```
|
|
26
25
|
|
|
26
|
+
There is no `services/` dir: the module declares no collections service (`PublicCollectionsSharedModule`
|
|
27
|
+
provides `PublicCollectionItemsService`). `pages/list` extends `CollectionsCatalogBaseComponent` and
|
|
28
|
+
`pages/item` extends `CollectionDetailsBaseComponent`; each keeps the app's own markup (the bases hold logic only).
|
|
29
|
+
|
|
27
30
|
There are no `enums/`, `specifications/`, or `value-objects/` dirs in the domain — the connection
|
|
28
31
|
shape (keywords/cycles) is inlined on the entity below.
|
|
29
32
|
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
## `libs/museum-collections/shell/angular/src/lib/collections.module.ts`
|
|
4
4
|
|
|
5
5
|
Thread `<PREFIX>` (the `environment` + domain imports). `PublicCollectionsSharedModule.forFeature`
|
|
6
|
-
provides the list/detail behaviour over `MuseumCollection
|
|
7
|
-
|
|
6
|
+
provides the list/detail behaviour over `MuseumCollection` (including `PublicCollectionItemsService`, so the
|
|
7
|
+
module declares no collections service of its own); `provideBrowserMasonry()` supplies the real library in the browser and `null` during
|
|
8
8
|
SSR (the grid then skips layout). Note: unlike the objects module this one does NOT import `SmartSharedModule`.
|
|
9
9
|
|
|
10
10
|
```ts
|
|
11
11
|
import { NgModule } from '@angular/core';
|
|
12
12
|
import { FormsModule } from '@angular/forms';
|
|
13
13
|
import { RouterModule } from '@angular/router';
|
|
14
|
-
import { CrudService } from '@smartsoft001/crud-shell-angular';
|
|
15
14
|
import { PublicCollectionsSharedModule } from '@smartsoft001-mobilems/public-collections-shell-angular';
|
|
16
15
|
import { provideBrowserMasonry } from '@smartsoft001-mobilems/angular';
|
|
17
16
|
|
|
@@ -19,17 +18,9 @@ import { environment } from '@<PREFIX>/angular';
|
|
|
19
18
|
import { MuseumCollection } from '@<PREFIX>/museum-collections/domain';
|
|
20
19
|
|
|
21
20
|
import { routes } from './collections.routes';
|
|
22
|
-
import { CollectionsService } from './services';
|
|
23
21
|
|
|
24
22
|
@NgModule({
|
|
25
|
-
providers: [
|
|
26
|
-
CollectionsService,
|
|
27
|
-
{
|
|
28
|
-
provide: CrudService,
|
|
29
|
-
useClass: CollectionsService,
|
|
30
|
-
},
|
|
31
|
-
provideBrowserMasonry(),
|
|
32
|
-
],
|
|
23
|
+
providers: [provideBrowserMasonry()],
|
|
33
24
|
imports: [
|
|
34
25
|
FormsModule,
|
|
35
26
|
PublicCollectionsSharedModule.forFeature({
|
|
@@ -102,6 +102,27 @@ else
|
|
|
102
102
|
pass "no filters component in this module"
|
|
103
103
|
fi
|
|
104
104
|
|
|
105
|
+
# 5. page logic lives in the framework catalog bases — the pages only add markup
|
|
106
|
+
for pair in "list:CollectionsCatalogBaseComponent" "item:CollectionDetailsBaseComponent"; do
|
|
107
|
+
pdir="${pair%%:*}"; base="${pair#*:}"
|
|
108
|
+
pf="$LIBDIR/pages/$pdir/$pdir.component.ts"
|
|
109
|
+
if [ -f "$pf" ]; then
|
|
110
|
+
if grep -qE "extends[[:space:]]+$base" "$pf"; then
|
|
111
|
+
pass "pages/$pdir extends $base"
|
|
112
|
+
else
|
|
113
|
+
bad "pages/$pdir/$pdir.component.ts does not extend $base — page logic belongs to the framework base ($pf)"
|
|
114
|
+
fi
|
|
115
|
+
fi
|
|
116
|
+
done
|
|
117
|
+
# 6. no module-level CollectionsService that only re-declares getItems
|
|
118
|
+
CS="$(grep -rlE "class[[:space:]]+CollectionsService" "$LIBDIR" 2>/dev/null | xargs grep -lE "getItems" 2>/dev/null || true)"
|
|
119
|
+
if [ -n "$CS" ]; then
|
|
120
|
+
bad "module-level CollectionsService re-declares getItems — drop it, PublicCollectionItemsService covers it:"
|
|
121
|
+
printf ' %s\n' $CS >&2
|
|
122
|
+
else
|
|
123
|
+
pass "no module-level CollectionsService re-declaring getItems"
|
|
124
|
+
fi
|
|
125
|
+
|
|
105
126
|
echo "== Translations (REF_ROOT=${REF_ROOT:-unset}) =="
|
|
106
127
|
# Groups: present in pl+en, no dead references, complete vs the reference repo
|
|
107
128
|
# (export REF_ROOT=<reference-repo-root> to enable the completeness diff).
|