@smartsoft001-mobilems/claude-plugins 2.125.0 → 2.127.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-objects/SKILL.md +10 -7
- package/plugins/mobilems/skills/mobilems-objects/references/lib-contents.md +3 -2
- package/plugins/mobilems/skills/mobilems-objects/scripts/verify-module.sh +16 -0
- package/plugins/mobilems/skills/mobilems-project-init/references/shared-lib.md +14 -12
package/package.json
CHANGED
|
@@ -35,13 +35,16 @@ list — re-implementing framework code is a defect, not a shortcut:
|
|
|
35
35
|
2. [`packages/objects/README.md`](https://github.com/smartsoft001/mobilems-framework/blob/main/packages/objects/README.md) — this module's package catalog
|
|
36
36
|
3. `libs/shared/angular/README.md` — the app's own shared lib (built by `mobilems-project-init`)
|
|
37
37
|
|
|
38
|
-
| Do not hand-roll
|
|
39
|
-
|
|
|
40
|
-
| a masonry grid (`new Masonry(...)`, per-page masonry JS/CSS)
|
|
41
|
-
| filter state / hand-built `query` arrays
|
|
42
|
-
| list page logic (first read, persistence, SSR read, read guard, load-more, masonry lifecycle, list SEO)
|
|
43
|
-
| detail
|
|
44
|
-
|
|
|
38
|
+
| Do not hand-roll | Use |
|
|
39
|
+
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| a masonry grid (`new Masonry(...)`, per-page masonry JS/CSS) | `<smart-mobilems-masonry-grid>` (`MasonryGridComponent`) with a `#masonryContentTpl`; the `Masonry` provider in step 3 only feeds it |
|
|
41
|
+
| filter state / hand-built `query` arrays | `FiltersBaseComponent<MsObject>` + its `FiltersContext` accessors (`searchText`, `keywords`, `page`, `sort`, `onlyImage`, …) |
|
|
42
|
+
| list page logic (first read, persistence, SSR read, read guard, load-more, masonry lifecycle, list SEO) | `ObjectsCatalogBaseComponent` (`pages/list` extends it; the app keeps its own markup and `sortOptions` over `isNewType`) |
|
|
43
|
+
| detail page logic (SSR SEO, scroll, visit counter, retry, opt-in related / related collections) | `ObjectDetailsBaseComponent` (extends `ObjectsItemComponent`; `pages/item` extends it, `related` and `relatedCollections` are opt-in via the constructor options) |
|
|
44
|
+
| object detail field helpers (title, tags, inventory, bibliography, description, related articles, ask-about link) | the `objectTitle`, `tagValues`, `inventoryValues`, `bibliography`, `descriptionHtml`, `relatedArticles`, `askAboutObjectHref` tools |
|
|
45
|
+
| gallery / media lists | `ObjectMediaService` |
|
|
46
|
+
| visit counter, related objects, collection / archaeological dictionaries | `ObjectsDataService` (extends `ObjectsService`) |
|
|
47
|
+
| media URLs, meta/OG tags, filter dictionaries, modals, WCAG | `FileUrlService`, `SeoService`/`MetaService`, `DictionaryService`, `ModalService`, `WcagService` |
|
|
45
48
|
|
|
46
49
|
Anything the framework genuinely lacks goes into `libs/shared/angular` **once** (and into its
|
|
47
50
|
README) — never a per-module copy. `scripts/verify-module.sh` fails the run on hand-rolled masonry.
|
|
@@ -23,12 +23,13 @@ libs/museum-objects/
|
|
|
23
23
|
├── components/ # description, filter-input (may extend FilterInputBaseComponent - its API is a subset), high-def-request-modal,
|
|
24
24
|
│ # menu, objects-searchbar (standalone, live search), tabs/*
|
|
25
25
|
├── pages/ # list (ListComponent), item (ItemComponent) + index
|
|
26
|
-
└── services/ # objects.service.
|
|
26
|
+
└── services/ # no local objects.service / object-media.service (framework ObjectsDataService, ObjectMediaService)
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
`pages/list` extends `ObjectsCatalogBaseComponent` (logic only: first read, persistence, SSR read, read guard,
|
|
30
30
|
load-more, masonry lifecycle, list SEO) and keeps the app's own markup and `sortOptions` over `isNewType`;
|
|
31
|
-
`pages/item` extends `
|
|
31
|
+
`pages/item` extends `ObjectDetailsBaseComponent` (SSR SEO, scroll, visit counter, retry, opt-in related / related
|
|
32
|
+
collections; the app keeps its markup). There is no local `objects.service` or `object-media.service`.
|
|
32
33
|
|
|
33
34
|
## Domain entity (verbatim, thread nothing — pure types)
|
|
34
35
|
|
|
@@ -122,6 +122,22 @@ if [ -f "$LISTF" ]; then
|
|
|
122
122
|
fi
|
|
123
123
|
fi
|
|
124
124
|
|
|
125
|
+
# 6. detail page logic lives in the framework details base; no local copies of its helpers
|
|
126
|
+
ITEMF="$LIBDIR/pages/item/item.component.ts"
|
|
127
|
+
if [ -f "$ITEMF" ]; then
|
|
128
|
+
if grep -qE "extends[[:space:]]+ObjectDetailsBaseComponent" "$ITEMF"; then
|
|
129
|
+
pass "pages/item extends ObjectDetailsBaseComponent"
|
|
130
|
+
else
|
|
131
|
+
bad "pages/item/item.component.ts does not extend ObjectDetailsBaseComponent — detail logic belongs to the framework base ($ITEMF)"
|
|
132
|
+
fi
|
|
133
|
+
fi
|
|
134
|
+
if grep -rqE "logVisit\(|applyForSsr\(|class ObjectMediaService" "$LIBDIR" 2>/dev/null; then
|
|
135
|
+
bad "lib contains logVisit(, applyForSsr( or class ObjectMediaService — use ObjectDetailsBaseComponent / ObjectsDataService / ObjectMediaService from the framework:"
|
|
136
|
+
grep -rnE "logVisit\(|applyForSsr\(|class ObjectMediaService" "$LIBDIR" >&2 || true
|
|
137
|
+
else
|
|
138
|
+
pass "no hand-rolled visit counter, SSR apply or media service"
|
|
139
|
+
fi
|
|
140
|
+
|
|
125
141
|
echo "== Translations (REF_ROOT=${REF_ROOT:-unset}) =="
|
|
126
142
|
# Groups: present in pl+en, no dead references, complete vs the reference repo
|
|
127
143
|
# (export REF_ROOT=<reference-repo-root> to enable the completeness diff).
|
|
@@ -146,20 +146,20 @@ files duplicate exports that now exist; copying those is the single most common
|
|
|
146
146
|
|
|
147
147
|
Framework now — do **not** generate (import from `@smartsoft001-mobilems/angular`):
|
|
148
148
|
|
|
149
|
-
| Kind | Framework exports
|
|
150
|
-
| ------------ |
|
|
151
|
-
| environment | `createMobilemsEnvironment`, `MOBILEMS_ENVIRONMENT`, `EnvironmentService`
|
|
152
|
-
| pipes | `altText`, `fileUrl`, `backgroundUrl`, `plainText`, `stripAnchors`, `capitalize`
|
|
153
|
-
| tools | `classifyLink`, `isInternalLink`, `normalizeUrl`, `stripHtml`, `formatNamedEntries`, `normalizeSearchText`, `newTabText`, `pageToOffset`, `decodeHtmlEntities`, `ElementIdSequence`, `createSafeTimeouts`, `createLazyLoader` (single-flight dynamic `import()`, e.g. `online-3d-viewer`), `photoFileName`/`urlExtension`, `widgetImageUrl`, `overflowingTags`, `themeTagKey`, `themeTagsLayout`, `THEME_TAGS_VISIBLE_LIMIT`, `resolveMenuItemTarget`, `isNavigableMenuItem` (+ `MenuItemTarget`), `objectCardMeta`/`objectCardPlace`/`objectCardExhibition`/`exhibitionText` (+ `IObjectCardSource`), `SERIES_TITLES_FILTER`, `catalogEntryFilterParams` (the named-entries filter query params), `recommendedPerPage`, `widgetDomId`, `cleanWidgetText`, `formatFileSize`, `safeDecode`
|
|
154
|
-
| directives | `a[smartExternalLink]`, `[smartExternalLinks]`, `[smartFocusTrap]`, `[smartTruncatedTitle]`, `[smartInPageAnchors]` (`InPageAnchorsDirective`; references use `app…` — rename the attributes)
|
|
155
|
-
| services | `ConfirmationModalService`, `ExternalLinkConfirmationService`, `FilterPersistenceService`, `OrientationService`, `WcagChangesService`, `LineHeightService`, `BreadcrumbsService`, `ContactService`, `DataService`, `MuseumSeoService`
|
|
156
|
-
| interceptors | `LanguageInterceptor`, `PreviewAuthInterceptor`, `SsrTimeoutInterceptor`, `DedupeRequestInterceptor`
|
|
157
|
-
| bases | `CalendarBaseComponent`, `PaginationDotsBaseComponent`, `PaginationBaseComponent`, `CarouselBaseComponent`, `PartnersCarouselBaseComponent`, `NewObjectsCarouselBaseComponent`, `ArticlesCarouselBaseComponent`, `SliderBaseComponent` (+ `ISliderOptions`; `ScrollTopComponent` is server-guarded), `GalleryBaseComponent`, `GalleryFullscreenDialogBaseComponent` (`GalleryFullscreenBaseComponent` is `@deprecated`), `ConfirmationModalBaseComponent`, `NewsletterModalBaseComponent`, `MapBaseComponent`, `FilterInputBaseComponent`, `FilterDateInputBaseComponent`, `FilterCustomDictionaryInputBaseComponent`, `FilterDictionaryInputBaseComponent` (inline tree, `source`, paging), `ThemeTagsFilterBaseComponent`, `CatalogFilterBarBaseComponent`, `CatalogToolbarBaseComponent`, `SearchbarBaseComponent`, `SelectCheckboxBaseComponent` (+ `ISelectionHooks`), `DropdownBaseComponent`, `TabsBaseComponent`, `WcagBaseComponent` (+ `WCAG_OPTION_GROUPS`), `BreadcrumbsBaseComponent`, `BreadcrumbsBarBaseComponent`, `MenuItemBaseComponent`, `ObjectCardBaseComponent`, `ObjectsGridItemBaseComponent`, `ObjectsListItemBaseComponent`, `CollectionCardBaseComponent`, `CollectionsGridItemBaseComponent`, `FavoriteButtonBaseComponent` (+ `IFavoriteHooks`, `IFavoriteRef`), `FavoritesNoticeBaseComponent`, `SelectionActionsBaseComponent`, `DownloadCardsBaseComponent`, `RecommendedBaseComponent`, `WidgetImageBaseComponent`, `WidgetMediaBaseComponent`, `WidgetGalleryImageBaseComponent`, `WidgetAudioBaseComponent`, `WidgetGalleryObjectBaseComponent` (all extend `WidgetBaseComponent`) |
|
|
158
|
-
| SSR tools | `injectServerResponseInit`, `appendPreloadLinks` (image preload `Link` headers)
|
|
149
|
+
| Kind | Framework exports |
|
|
150
|
+
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
151
|
+
| environment | `createMobilemsEnvironment`, `MOBILEMS_ENVIRONMENT`, `EnvironmentService` |
|
|
152
|
+
| pipes | `altText`, `fileUrl`, `backgroundUrl`, `plainText`, `stripAnchors`, `capitalize` |
|
|
153
|
+
| tools | `isHomePath` (+ `IHomePathOptions`; lenient by default, `{ strict: true }` is the header rule), `footerSocialLinks` (+ `IFooterSocialLink`, `IFooterSocialSource`), `classifyLink`, `isInternalLink`, `normalizeUrl`, `stripHtml`, `formatNamedEntries`, `normalizeSearchText`, `newTabText`, `pageToOffset`, `decodeHtmlEntities`, `ElementIdSequence`, `createSafeTimeouts`, `createLazyLoader` (single-flight dynamic `import()`, e.g. `online-3d-viewer`), `photoFileName`/`urlExtension`, `widgetImageUrl`, `overflowingTags`, `themeTagKey`, `themeTagsLayout`, `THEME_TAGS_VISIBLE_LIMIT`, `resolveMenuItemTarget`, `isNavigableMenuItem` (+ `MenuItemTarget`), `objectCardMeta`/`objectCardPlace`/`objectCardExhibition`/`exhibitionText` (+ `IObjectCardSource`), `SERIES_TITLES_FILTER`, `catalogEntryFilterParams` (the named-entries filter query params), `recommendedPerPage`, `widgetDomId`, `cleanWidgetText`, `formatFileSize`, `safeDecode` |
|
|
154
|
+
| directives | `a[smartExternalLink]`, `[smartExternalLinks]`, `[smartFocusTrap]`, `[smartTruncatedTitle]`, `[smartInPageAnchors]` (`InPageAnchorsDirective`; references use `app…` — rename the attributes) |
|
|
155
|
+
| services | `ConfirmationModalService`, `ExternalLinkConfirmationService`, `FilterPersistenceService`, `OrientationService`, `WcagChangesService`, `LineHeightService`, `BreadcrumbsService`, `ContactService`, `DataService`, `MuseumSeoService` |
|
|
156
|
+
| interceptors | `LanguageInterceptor`, `PreviewAuthInterceptor`, `SsrTimeoutInterceptor`, `DedupeRequestInterceptor` |
|
|
157
|
+
| bases | `CalendarBaseComponent`, `PaginationDotsBaseComponent`, `PaginationBaseComponent`, `CarouselBaseComponent`, `PartnersCarouselBaseComponent`, `NewObjectsCarouselBaseComponent`, `ArticlesCarouselBaseComponent`, `SliderBaseComponent` (+ `ISliderOptions`; `ScrollTopComponent` is server-guarded), `GalleryBaseComponent`, `GalleryFullscreenDialogBaseComponent` (`GalleryFullscreenBaseComponent` is `@deprecated`), `ConfirmationModalBaseComponent`, `NewsletterModalBaseComponent`, `MapBaseComponent`, `FilterInputBaseComponent`, `FilterDateInputBaseComponent`, `FilterCustomDictionaryInputBaseComponent`, `FilterDictionaryInputBaseComponent` (inline tree, `source`, paging), `ThemeTagsFilterBaseComponent`, `CatalogFilterBarBaseComponent`, `CatalogToolbarBaseComponent`, `SearchbarBaseComponent`, `SelectCheckboxBaseComponent` (+ `ISelectionHooks`), `DropdownBaseComponent`, `TabsBaseComponent`, `WcagBaseComponent` (+ `WCAG_OPTION_GROUPS`), `BreadcrumbsBaseComponent`, `BreadcrumbsBarBaseComponent`, `MenuItemBaseComponent`, `HeaderBaseComponent<TPanel>` (home flag, contrast, mobile panels, Escape host listener; `HeaderComponent` is `@deprecated`), `FooterBaseComponent` (CMS config, contrast, year; `FooterComponent` is `@deprecated`), `LanguageSwitchBaseComponent` (+ `injectLanguageSwitch` for a header that already extends a base), `ObjectCardBaseComponent`, `ObjectsGridItemBaseComponent`, `ObjectsListItemBaseComponent`, `CollectionCardBaseComponent`, `CollectionsGridItemBaseComponent`, `FavoriteButtonBaseComponent` (+ `IFavoriteHooks`, `IFavoriteRef`), `FavoritesNoticeBaseComponent`, `SelectionActionsBaseComponent`, `DownloadCardsBaseComponent`, `RecommendedBaseComponent`, `WidgetImageBaseComponent`, `WidgetMediaBaseComponent`, `WidgetGalleryImageBaseComponent`, `WidgetAudioBaseComponent`, `WidgetGalleryObjectBaseComponent` (all extend `WidgetBaseComponent`) |
|
|
158
|
+
| SSR tools | `injectServerResponseInit`, `appendPreloadLinks` (image preload `Link` headers) |
|
|
159
159
|
|
|
160
160
|
What stays in the app lib: the **template and styles** of every base above — the museum keeps its
|
|
161
161
|
own HTML and Tailwind classes (the filter inputs, searchbar, catalog toolbar and filter bar, theme tags and select
|
|
162
|
-
checkbox, dropdown, tabs, wcag panel, breadcrumbs
|
|
162
|
+
checkbox, dropdown, tabs, wcag panel, breadcrumbs, menu item, header, footer and language switch are logic only — extend the base, write the markup yourself; e.g. the confirmation-modal component is markup over `ConfirmationModalBaseComponent` /
|
|
163
163
|
`ConfirmationModalService`), the `leaflet` dependency (`MapBaseComponent` asks the subclass for
|
|
164
164
|
`loadLeaflet()`), `truncateHtml` and any museum-only tools. `local-storage`, `configs-cache`, `not-found-content` are gone: language lives in
|
|
165
165
|
the framework `TranslationService`, the config cache in `ConfigsFacade.init()`.
|
|
@@ -173,7 +173,9 @@ barrel, documented in the app's own README so the module skills can find it.
|
|
|
173
173
|
`./lib/configs.module`, `./lib/models`, `./lib/pipes`, `./lib/tools`, `./lib/environments` (only
|
|
174
174
|
the folders that still have files).
|
|
175
175
|
- `components/index.ts` — export the foundation shared components (and keep the `COMPONENTS` array,
|
|
176
|
-
which holds `AppComponent`/`FooterComponent`/`HeaderComponent`).
|
|
176
|
+
which holds `AppComponent`/`FooterComponent`/`HeaderComponent`). The app's own `app-header` / `app-footer`
|
|
177
|
+
extend `HeaderBaseComponent` / `FooterBaseComponent` and carry the app markup (the framework
|
|
178
|
+
`HeaderComponent`/`FooterComponent` are `@deprecated`). Module skills add their feature
|
|
177
179
|
shared components' exports when they build them.
|
|
178
180
|
|
|
179
181
|
## `libs/shared/angular/README.md` — required
|