@agent-cms/agentcms 0.0.0-stage → 0.1.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/LICENSE +143 -0
- package/README.md +1119 -2
- package/changelog.json +20 -0
- package/dist/admin/admin-files.json +48 -0
- package/dist/admin/assets/CodeEditor-DcFzGUt8.js +24 -0
- package/dist/admin/assets/flexweg-logo-CdtuqAFA.png +0 -0
- package/dist/admin/assets/index-CLZ1gQZl.js +5460 -0
- package/dist/admin/assets/index-DMcGogR2.css +1 -0
- package/dist/admin/assets/sql-wasm-C1U8OeUW.wasm +0 -0
- package/dist/admin/assets/sql-wasm-CYl3LXH_.js +2 -0
- package/dist/admin/assets/sql-wasm-V5jTDcrT.js +1 -0
- package/dist/admin/config.js +11 -0
- package/dist/admin/external.default.json +72 -0
- package/dist/admin/index.html +116 -0
- package/dist/admin/plugins/core-seo/bundle.js +55 -0
- package/dist/admin/plugins/core-seo/manifest.json +7 -0
- package/dist/admin/plugins/flexweg-archives/bundle.js +1414 -0
- package/dist/admin/plugins/flexweg-archives/manifest.json +7 -0
- package/dist/admin/plugins/flexweg-multilang/bundle.js +1187 -0
- package/dist/admin/plugins/flexweg-multilang/manifest.json +7 -0
- package/dist/admin/plugins/flexweg-rss/bundle.js +1354 -0
- package/dist/admin/plugins/flexweg-rss/manifest.json +7 -0
- package/dist/admin/plugins/flexweg-search/bundle.js +1243 -0
- package/dist/admin/plugins/flexweg-search/manifest.json +7 -0
- package/dist/admin/plugins/flexweg-sitemaps/bundle.js +1293 -0
- package/dist/admin/plugins/flexweg-sitemaps/manifest.json +7 -0
- package/dist/admin/runtime/cms-runtime.js +164 -0
- package/dist/admin/runtime/react-dom-client.js +13 -0
- package/dist/admin/runtime/react-dom.js +16 -0
- package/dist/admin/runtime/react-i18next.js +21 -0
- package/dist/admin/runtime/react-jsx-runtime.js +17 -0
- package/dist/admin/runtime/react.js +55 -0
- package/dist/admin/themes/corporate/bundle.js +14465 -0
- package/dist/admin/themes/corporate/manifest.json +7 -0
- package/dist/admin/themes/corporate/theme.css +2 -0
- package/dist/admin/themes/magazine/bundle.js +10229 -0
- package/dist/admin/themes/magazine/manifest.json +7 -0
- package/dist/admin/themes/magazine/theme.css +2 -0
- package/dist/admin/themes/marketplace-core/bundle.js +11213 -0
- package/dist/admin/themes/marketplace-core/manifest.json +7 -0
- package/dist/admin/themes/marketplace-core/theme.css +1613 -0
- package/dist/admin/themes/portfolio/bundle.js +9195 -0
- package/dist/admin/themes/portfolio/manifest.json +7 -0
- package/dist/admin/themes/portfolio/theme.css +2 -0
- package/dist/admin/themes/storefront/bundle.js +13172 -0
- package/dist/admin/themes/storefront/manifest.json +7 -0
- package/dist/admin/themes/storefront/theme.css +2 -0
- package/dist/agent/agentcms.mjs +1711 -0
- package/dist/agent/chunks/hosting-D_uj-Mt1.mjs +117 -0
- package/dist/agent/chunks/index-CrvEoyi0.mjs +3608 -0
- package/dist/agent/chunks/install-DkCCcKAO.mjs +577 -0
- package/dist/agent/chunks/plan-EYKegfhp.mjs +245 -0
- package/dist/agent/chunks/registry-lkfb_E9O.mjs +53517 -0
- package/dist/agent/chunks/siteAdd-BqcYt8nu.mjs +118 -0
- package/dist/agent/chunks/sql-wasm-GjJDiefO.mjs +10 -0
- package/dist/agent/chunks/sqljs-DjSCStJ0.mjs +20 -0
- package/dist/agent/vendor/sql-wasm.cjs +188 -0
- package/dist/theme-assets/corporate-menu.js +266 -0
- package/dist/theme-assets/corporate-posts.js +571 -0
- package/dist/theme-assets/corporate.css +2 -0
- package/dist/theme-assets/default-menu.js +266 -0
- package/dist/theme-assets/default-posts.js +378 -0
- package/dist/theme-assets/default.css +1 -0
- package/dist/theme-assets/magazine-menu.js +227 -0
- package/dist/theme-assets/magazine-posts.js +361 -0
- package/dist/theme-assets/magazine.css +2 -0
- package/dist/theme-assets/portfolio-filters.js +104 -0
- package/dist/theme-assets/portfolio-menu.js +240 -0
- package/dist/theme-assets/portfolio-posts.js +358 -0
- package/dist/theme-assets/portfolio.css +2 -0
- package/dist/theme-assets/storefront-catalog.js +504 -0
- package/dist/theme-assets/storefront-menu.js +239 -0
- package/dist/theme-assets/storefront-posts.js +404 -0
- package/dist/theme-assets/storefront.css +2 -0
- package/dist/version.json +9 -0
- package/package.json +101 -4
- package/plugin/.claude-plugin/plugin.json +16 -0
- package/plugin/skills/agentcms-install/SKILL.md +110 -0
- package/plugin/skills/agentcms-install/references/cloudflare.md +15 -0
- package/plugin/skills/agentcms-install/references/flexweg.md +11 -0
- package/plugin/skills/agentcms-install/references/github.md +67 -0
- package/plugin/skills/agentcms-install/references/gitlab.md +15 -0
- package/plugin/skills/agentcms-install/references/s3.md +81 -0
- package/plugin/skills/agentcms-manage/SKILL.md +92 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// Runtime stub for "@flexweg/cms-runtime" — the public API external
|
|
2
|
+
// plugins and themes use to register filters, actions, blocks, dashboard
|
|
3
|
+
// cards AND to call admin services (Flexweg Files API, Firestore CRUD,
|
|
4
|
+
// publishing, slug helpers, markdown utilities, …).
|
|
5
|
+
//
|
|
6
|
+
// External bundles install @flexweg/cms-runtime as a dev dependency
|
|
7
|
+
// for type definitions and externalize it at build time. The import-map
|
|
8
|
+
// in /admin/index.html redirects each `import` here. We read the live
|
|
9
|
+
// admin instances off window.__FLEXWEG_RUNTIME__ (populated by
|
|
10
|
+
// src/core/flexwegRuntime.ts on admin boot) and re-export them so the
|
|
11
|
+
// bundle gets the same module instances the admin itself uses —
|
|
12
|
+
// required for Firebase / i18next / React state to be coherent.
|
|
13
|
+
const R = (typeof window !== "undefined" && window.__FLEXWEG_RUNTIME__)
|
|
14
|
+
? window.__FLEXWEG_RUNTIME__
|
|
15
|
+
: null;
|
|
16
|
+
|
|
17
|
+
if (!R) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
"[flexweg] window.__FLEXWEG_RUNTIME__ is not initialised when @flexweg/cms-runtime was imported.",
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// API versioning
|
|
24
|
+
export const FLEXWEG_API_VERSION = R.apiVersion;
|
|
25
|
+
export const FLEXWEG_API_MIN_VERSION = R.minApiVersion;
|
|
26
|
+
|
|
27
|
+
// CMS plugin API + registries
|
|
28
|
+
export const pluginApi = R.pluginApi;
|
|
29
|
+
export const applyFilters = R.applyFilters;
|
|
30
|
+
export const applyFiltersSync = R.applyFiltersSync;
|
|
31
|
+
export const doAction = R.doAction;
|
|
32
|
+
export const registerBlock = R.registerBlock;
|
|
33
|
+
export const registerDashboardCard = R.registerDashboardCard;
|
|
34
|
+
export const registerInspectorTab = R.registerInspectorTab;
|
|
35
|
+
export const registerTermEditorSection = R.registerTermEditorSection;
|
|
36
|
+
export const registerEditorVariantProvider = R.registerEditorVariantProvider;
|
|
37
|
+
export const registerExternalPlugin = R.registerExternalPlugin;
|
|
38
|
+
export const registerExternalTheme = R.registerExternalTheme;
|
|
39
|
+
|
|
40
|
+
// core/slug
|
|
41
|
+
export const slugify = R.slugify;
|
|
42
|
+
export const isValidSlug = R.isValidSlug;
|
|
43
|
+
export const findAvailableSlug = R.findAvailableSlug;
|
|
44
|
+
export const buildPostUrl = R.buildPostUrl;
|
|
45
|
+
export const buildTermUrl = R.buildTermUrl;
|
|
46
|
+
export const pathToPublicUrl = R.pathToPublicUrl;
|
|
47
|
+
export const canonicalPath = R.canonicalPath;
|
|
48
|
+
export const canonicalUrl = R.canonicalUrl;
|
|
49
|
+
export const detectPathCollision = R.detectPathCollision;
|
|
50
|
+
export const detectTermSlugCollision = R.detectTermSlugCollision;
|
|
51
|
+
export const normalizeMediaSlug = R.normalizeMediaSlug;
|
|
52
|
+
export const basePathFromBaseUrl = R.basePathFromBaseUrl;
|
|
53
|
+
export const withBasePath = R.withBasePath;
|
|
54
|
+
export const registerStorageConnector = R.registerStorageConnector;
|
|
55
|
+
|
|
56
|
+
// core/media
|
|
57
|
+
export const mediaToView = R.mediaToView;
|
|
58
|
+
export const pickFormat = R.pickFormat;
|
|
59
|
+
export const pickMediaUrl = R.pickMediaUrl;
|
|
60
|
+
|
|
61
|
+
// core/markdown
|
|
62
|
+
export const markdownToPlainText = R.markdownToPlainText;
|
|
63
|
+
export const renderMarkdown = R.renderMarkdown;
|
|
64
|
+
|
|
65
|
+
// core/socialIcons
|
|
66
|
+
export const SocialIcon = R.SocialIcon;
|
|
67
|
+
export const socialLabel = R.socialLabel;
|
|
68
|
+
|
|
69
|
+
// core/postSort
|
|
70
|
+
export const postSortMillis = R.postSortMillis;
|
|
71
|
+
|
|
72
|
+
// core/render
|
|
73
|
+
export const renderPageToHtml = R.renderPageToHtml;
|
|
74
|
+
|
|
75
|
+
// services/flexwegApi — Flexweg Files API client
|
|
76
|
+
export const uploadFile = R.uploadFile;
|
|
77
|
+
export const deleteFile = R.deleteFile;
|
|
78
|
+
export const deleteFolder = R.deleteFolder;
|
|
79
|
+
export const renameFile = R.renameFile;
|
|
80
|
+
export const renameFolder = R.renameFolder;
|
|
81
|
+
export const createFolder = R.createFolder;
|
|
82
|
+
export const getFile = R.getFile;
|
|
83
|
+
export const listFiles = R.listFiles;
|
|
84
|
+
export const publicUrlFor = R.publicUrlFor;
|
|
85
|
+
export const fileToBase64 = R.fileToBase64;
|
|
86
|
+
export const getStorageLimits = R.getStorageLimits;
|
|
87
|
+
export const getStorageCapabilities = R.getStorageCapabilities;
|
|
88
|
+
export const withStorageBatch = R.withStorageBatch;
|
|
89
|
+
export const StorageError = R.StorageError;
|
|
90
|
+
export const FlexwegApiError = R.FlexwegApiError;
|
|
91
|
+
|
|
92
|
+
// services/posts — post Firestore CRUD
|
|
93
|
+
export const fetchAllPosts = R.fetchAllPosts;
|
|
94
|
+
export const createPost = R.createPost;
|
|
95
|
+
export const updatePost = R.updatePost;
|
|
96
|
+
|
|
97
|
+
// services/media — image upload pipeline
|
|
98
|
+
export const uploadMedia = R.uploadMedia;
|
|
99
|
+
|
|
100
|
+
// services/taxonomies — term CRUD
|
|
101
|
+
export const createTerm = R.createTerm;
|
|
102
|
+
export const updateTerm = R.updateTerm;
|
|
103
|
+
export const deleteTerm = R.deleteTerm;
|
|
104
|
+
|
|
105
|
+
// core/rss — shared RSS 2.0 feed builder
|
|
106
|
+
export const buildRssFeedXml = R.buildRssFeedXml;
|
|
107
|
+
|
|
108
|
+
// services/users — author resolution
|
|
109
|
+
export const buildAuthorLookup = R.buildAuthorLookup;
|
|
110
|
+
|
|
111
|
+
// services/publisher — page rendering / publishing
|
|
112
|
+
export const publishPost = R.publishPost;
|
|
113
|
+
export const buildPublishContext = R.buildPublishContext;
|
|
114
|
+
export const buildSiteContext = R.buildSiteContext;
|
|
115
|
+
export const renderHome = R.renderHome;
|
|
116
|
+
|
|
117
|
+
// services/menuPublisher — /menu.json upload
|
|
118
|
+
export const publishMenuJson = R.publishMenuJson;
|
|
119
|
+
|
|
120
|
+
// services/postsJsonPublisher + authorsJsonPublisher — sidebar data
|
|
121
|
+
export const publishPostsJson = R.publishPostsJson;
|
|
122
|
+
export const publishAuthorsJson = R.publishAuthorsJson;
|
|
123
|
+
|
|
124
|
+
// services/catalogPublisher — /data/products.json upload (storefront theme)
|
|
125
|
+
export const publishProductsJson = R.publishProductsJson;
|
|
126
|
+
export const deleteProductsJson = R.deleteProductsJson;
|
|
127
|
+
|
|
128
|
+
// services/settings — plugin/theme config storage
|
|
129
|
+
export const updatePluginConfig = R.updatePluginConfig;
|
|
130
|
+
export const updateThemeConfig = R.updateThemeConfig;
|
|
131
|
+
|
|
132
|
+
// lib/toast — global notification queue
|
|
133
|
+
export const toast = R.toast;
|
|
134
|
+
|
|
135
|
+
// lib/utils
|
|
136
|
+
export const sha256Hex = R.sha256Hex;
|
|
137
|
+
export const formatDateTime = R.formatDateTime;
|
|
138
|
+
export const cn = R.cn;
|
|
139
|
+
|
|
140
|
+
// React hooks — context access for plugin / theme settings pages
|
|
141
|
+
export const useCmsData = R.useCmsData;
|
|
142
|
+
export const useAuth = R.useAuth;
|
|
143
|
+
|
|
144
|
+
// i18n
|
|
145
|
+
export const i18n = R.i18n;
|
|
146
|
+
export const pickPublicLocale = R.pickPublicLocale;
|
|
147
|
+
export const setActiveLocale = R.setActiveLocale;
|
|
148
|
+
|
|
149
|
+
// UI components
|
|
150
|
+
export const EntityCombobox = R.EntityCombobox;
|
|
151
|
+
|
|
152
|
+
// Themes registry
|
|
153
|
+
export const getActiveTheme = R.getActiveTheme;
|
|
154
|
+
|
|
155
|
+
// Theme block authoring helpers
|
|
156
|
+
export const useAllPosts = R.useAllPosts;
|
|
157
|
+
export const getCurrentPublishContext = R.getCurrentPublishContext;
|
|
158
|
+
export const FontSelect = R.FontSelect;
|
|
159
|
+
export const MediaPicker = R.MediaPicker;
|
|
160
|
+
|
|
161
|
+
// Theme logo helpers
|
|
162
|
+
export const logoPath = R.logoPath;
|
|
163
|
+
export const uploadThemeLogo = R.uploadThemeLogo;
|
|
164
|
+
export const removeThemeLogo = R.removeThemeLogo;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Runtime stub for "react-dom/client".
|
|
2
|
+
const R = (typeof window !== "undefined" && window.__FLEXWEG_RUNTIME__)
|
|
3
|
+
? window.__FLEXWEG_RUNTIME__.reactDomClient
|
|
4
|
+
: null;
|
|
5
|
+
|
|
6
|
+
if (!R) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"[flexweg] window.__FLEXWEG_RUNTIME__ is not initialised when react-dom/client was imported.",
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const createRoot = R.createRoot;
|
|
13
|
+
export const hydrateRoot = R.hydrateRoot;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Runtime stub for "react-dom".
|
|
2
|
+
const R = (typeof window !== "undefined" && window.__FLEXWEG_RUNTIME__)
|
|
3
|
+
? window.__FLEXWEG_RUNTIME__.reactDom
|
|
4
|
+
: null;
|
|
5
|
+
|
|
6
|
+
if (!R) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"[flexweg] window.__FLEXWEG_RUNTIME__ is not initialised when react-dom was imported.",
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default R;
|
|
13
|
+
export const createPortal = R.createPortal;
|
|
14
|
+
export const flushSync = R.flushSync;
|
|
15
|
+
export const unstable_batchedUpdates = R.unstable_batchedUpdates;
|
|
16
|
+
export const version = R.version;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Runtime stub for "react-i18next". External plugin / theme settings
|
|
2
|
+
// pages call useTranslation('<plugin-id>') here, getting the same
|
|
3
|
+
// i18next instance as the admin so addResourceBundle calls land on the
|
|
4
|
+
// shared store.
|
|
5
|
+
const R = (typeof window !== "undefined" && window.__FLEXWEG_RUNTIME__)
|
|
6
|
+
? window.__FLEXWEG_RUNTIME__.reactI18next
|
|
7
|
+
: null;
|
|
8
|
+
|
|
9
|
+
if (!R) {
|
|
10
|
+
throw new Error(
|
|
11
|
+
"[flexweg] window.__FLEXWEG_RUNTIME__ is not initialised when react-i18next was imported.",
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default R;
|
|
16
|
+
export const useTranslation = R.useTranslation;
|
|
17
|
+
export const Trans = R.Trans;
|
|
18
|
+
export const withTranslation = R.withTranslation;
|
|
19
|
+
export const I18nextProvider = R.I18nextProvider;
|
|
20
|
+
export const initReactI18next = R.initReactI18next;
|
|
21
|
+
export const useSSR = R.useSSR;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Runtime stub for "react/jsx-runtime". External bundles compile JSX
|
|
2
|
+
// down to jsx() / jsxs() calls; the import-map redirects these here so
|
|
3
|
+
// they hit the same React instance as the admin.
|
|
4
|
+
const R = (typeof window !== "undefined" && window.__FLEXWEG_RUNTIME__)
|
|
5
|
+
? window.__FLEXWEG_RUNTIME__.reactJsxRuntime
|
|
6
|
+
: null;
|
|
7
|
+
|
|
8
|
+
if (!R) {
|
|
9
|
+
throw new Error(
|
|
10
|
+
"[flexweg] window.__FLEXWEG_RUNTIME__ is not initialised when react-jsx-runtime was imported.",
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const jsx = R.jsx;
|
|
15
|
+
export const jsxs = R.jsxs;
|
|
16
|
+
export const jsxDEV = R.jsxDEV;
|
|
17
|
+
export const Fragment = R.Fragment;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Runtime stub for "react". Loaded via the import-map in /admin/index.html
|
|
2
|
+
// when an external plugin or theme bundle does `import React from "react"`.
|
|
3
|
+
// Re-exports the live React module hosted by the admin so there is only
|
|
4
|
+
// ever ONE React instance in the page (React's hook integrity requires it).
|
|
5
|
+
//
|
|
6
|
+
// This file is intentionally written as plain ESM with no transpilation —
|
|
7
|
+
// it's served as-is from /admin/runtime/react.js without going through
|
|
8
|
+
// Vite's bundle pipeline.
|
|
9
|
+
|
|
10
|
+
const R = (typeof window !== "undefined" && window.__FLEXWEG_RUNTIME__)
|
|
11
|
+
? window.__FLEXWEG_RUNTIME__.react
|
|
12
|
+
: null;
|
|
13
|
+
|
|
14
|
+
if (!R) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
"[flexweg] window.__FLEXWEG_RUNTIME__ is not initialised. " +
|
|
17
|
+
"An external bundle imported react before the admin booted. " +
|
|
18
|
+
"Make sure flexwegRuntime is side-effect imported in main.tsx and " +
|
|
19
|
+
"the import-map in index.html resolves react to ./runtime/react.js.",
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default R;
|
|
24
|
+
export const Children = R.Children;
|
|
25
|
+
export const Component = R.Component;
|
|
26
|
+
export const Fragment = R.Fragment;
|
|
27
|
+
export const Profiler = R.Profiler;
|
|
28
|
+
export const PureComponent = R.PureComponent;
|
|
29
|
+
export const StrictMode = R.StrictMode;
|
|
30
|
+
export const Suspense = R.Suspense;
|
|
31
|
+
export const cloneElement = R.cloneElement;
|
|
32
|
+
export const createContext = R.createContext;
|
|
33
|
+
export const createElement = R.createElement;
|
|
34
|
+
export const createRef = R.createRef;
|
|
35
|
+
export const forwardRef = R.forwardRef;
|
|
36
|
+
export const isValidElement = R.isValidElement;
|
|
37
|
+
export const lazy = R.lazy;
|
|
38
|
+
export const memo = R.memo;
|
|
39
|
+
export const startTransition = R.startTransition;
|
|
40
|
+
export const useCallback = R.useCallback;
|
|
41
|
+
export const useContext = R.useContext;
|
|
42
|
+
export const useDebugValue = R.useDebugValue;
|
|
43
|
+
export const useDeferredValue = R.useDeferredValue;
|
|
44
|
+
export const useEffect = R.useEffect;
|
|
45
|
+
export const useId = R.useId;
|
|
46
|
+
export const useImperativeHandle = R.useImperativeHandle;
|
|
47
|
+
export const useInsertionEffect = R.useInsertionEffect;
|
|
48
|
+
export const useLayoutEffect = R.useLayoutEffect;
|
|
49
|
+
export const useMemo = R.useMemo;
|
|
50
|
+
export const useReducer = R.useReducer;
|
|
51
|
+
export const useRef = R.useRef;
|
|
52
|
+
export const useState = R.useState;
|
|
53
|
+
export const useSyncExternalStore = R.useSyncExternalStore;
|
|
54
|
+
export const useTransition = R.useTransition;
|
|
55
|
+
export const version = R.version;
|