Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,175 changes: 3,175 additions & 0 deletions packages/core/dist/chunk-2MXF4RYZ.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-2MXF4RYZ.js.map

Large diffs are not rendered by default.

2,150 changes: 2,150 additions & 0 deletions packages/core/dist/chunk-3VAKUFNQ.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-3VAKUFNQ.js.map

Large diffs are not rendered by default.

3,184 changes: 3,184 additions & 0 deletions packages/core/dist/chunk-56GUBLJE.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-56GUBLJE.cjs.map

Large diffs are not rendered by default.

608 changes: 608 additions & 0 deletions packages/core/dist/chunk-CO4B5EYF.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-CO4B5EYF.js.map

Large diffs are not rendered by default.

547 changes: 547 additions & 0 deletions packages/core/dist/chunk-DB2GJJTM.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-DB2GJJTM.js.map

Large diffs are not rendered by default.

574 changes: 574 additions & 0 deletions packages/core/dist/chunk-EGUDIX6Q.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-EGUDIX6Q.cjs.map

Large diffs are not rendered by default.

29,421 changes: 29,421 additions & 0 deletions packages/core/dist/chunk-HVTSE2SF.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-HVTSE2SF.cjs.map

Large diffs are not rendered by default.

29,391 changes: 29,391 additions & 0 deletions packages/core/dist/chunk-IYFSNRZN.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-IYFSNRZN.js.map

Large diffs are not rendered by default.

1,878 changes: 1,878 additions & 0 deletions packages/core/dist/chunk-NZWFCUDA.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-NZWFCUDA.cjs.map

Large diffs are not rendered by default.

2,152 changes: 2,152 additions & 0 deletions packages/core/dist/chunk-SER23XI4.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-SER23XI4.cjs.map

Large diffs are not rendered by default.

1,823 changes: 1,823 additions & 0 deletions packages/core/dist/chunk-TBJY2FF7.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-TBJY2FF7.js.map

Large diffs are not rendered by default.

620 changes: 620 additions & 0 deletions packages/core/dist/chunk-XCP5GCBE.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/core/dist/chunk-XCP5GCBE.cjs.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions packages/core/dist/migrations-GMHTJI7D.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

var chunkSER23XI4_cjs = require('./chunk-SER23XI4.cjs');
require('./chunk-IGJUBJBW.cjs');



Object.defineProperty(exports, "MigrationService", {
enumerable: true,
get: function () { return chunkSER23XI4_cjs.MigrationService; }
});
//# sourceMappingURL=migrations-GMHTJI7D.cjs.map
//# sourceMappingURL=migrations-GMHTJI7D.cjs.map
1 change: 1 addition & 0 deletions packages/core/dist/migrations-GMHTJI7D.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/core/dist/migrations-IVFIDOSO.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/core/dist/migrations-IVFIDOSO.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions packages/core/src/plugins/core-plugins/_shared/admin-template.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/**
* Shared Admin Page Template
*
* Provides the HTML wrapper for plugin admin pages with:
* - Tailwind CSS (CDN) with dark mode
* - HTMX for AJAX operations
* - CSRF token auto-injection (matches core admin layout pattern)
* - Inter font
*/

export function wrapAdminPage(opts: {
title: string
body: string
}): string {
return `<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${opts.title} - SonicJS</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>tailwind.config = { darkMode: 'class' }</script>
<script src="https://unpkg.com/htmx.org@2.0.3"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap">
<style>body { font-family: 'Inter', system-ui, sans-serif; }</style>

<!-- CSRF: Auto-attach token to all HTMX and fetch requests (matches core admin pattern) -->
<script>
function getCsrfToken() {
var cookie = document.cookie.split('; ')
.find(function(row) { return row.startsWith('csrf_token='); });
return cookie ? cookie.substring(cookie.indexOf('=') + 1) : '';
}

// HTMX: attach CSRF token to all requests
document.addEventListener('htmx:configRequest', function(event) {
var token = getCsrfToken();
if (token) {
event.detail.headers['X-CSRF-Token'] = token;
}
});

// fetch(): attach CSRF token to mutating requests
(function() {
var originalFetch = window.fetch;
window.fetch = function(url, options) {
options = options || {};
var method = (options.method || 'GET').toUpperCase();
if (method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS') {
options.headers = options.headers || {};
if (options.headers instanceof Headers) {
if (!options.headers.has('X-CSRF-Token')) {
options.headers.set('X-CSRF-Token', getCsrfToken());
}
} else if (!Array.isArray(options.headers) && !options.headers['X-CSRF-Token']) {
options.headers['X-CSRF-Token'] = getCsrfToken();
}
}
return originalFetch.call(this, url, options);
};
})();
</script>
</head>
<body class="bg-zinc-50 dark:bg-zinc-950 text-zinc-900 dark:text-zinc-100 min-h-screen">
${opts.body}
</body>
</html>`
}
3 changes: 3 additions & 0 deletions packages/core/src/plugins/core-plugins/_shared/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { wrapAdminPage } from './admin-template'
export { getSharedQuillStyles, getSharedQuillScript, getQuillEnhancerPollerScript } from './quill-shared'
export { getSharedTinyMceStyles, getTinyMcePluginScript } from './tinymce-shared'
Loading
Loading