ezfw-core 1.0.67 → 1.0.69
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.
|
@@ -776,8 +776,8 @@ async function renderPageBuild(page, opts, renderer, analyzer, root, islands) {
|
|
|
776
776
|
function generateHydrationScript(islands, isDev, cssModules = []) {
|
|
777
777
|
const islandsJson = JSON.stringify(islands);
|
|
778
778
|
const cssModulesJson = JSON.stringify(cssModules);
|
|
779
|
-
// In dev mode, use
|
|
780
|
-
const runtimePath = isDev ? '/
|
|
779
|
+
// In dev mode, use node_modules path (works for projects using ezfw-core from npm)
|
|
780
|
+
const runtimePath = isDev ? '/node_modules/ezfw-core/islands/runtime.ts' : '/assets/islands-runtime.js';
|
|
781
781
|
// Use hydrate.js for SSR - it doesn't import CSS directly, avoiding MIME type issues
|
|
782
782
|
const frameworkPath = isDev ? '/hydrate.js' : '/assets/hydrate.js';
|
|
783
783
|
// Generate CSS loading code - load CSS modules BEFORE rendering
|
|
@@ -996,8 +996,8 @@ function generateHydrationScript(
|
|
|
996
996
|
const islandsJson = JSON.stringify(islands);
|
|
997
997
|
const cssModulesJson = JSON.stringify(cssModules);
|
|
998
998
|
|
|
999
|
-
// In dev mode, use
|
|
1000
|
-
const runtimePath = isDev ? '/
|
|
999
|
+
// In dev mode, use node_modules path (works for projects using ezfw-core from npm)
|
|
1000
|
+
const runtimePath = isDev ? '/node_modules/ezfw-core/islands/runtime.ts' : '/assets/islands-runtime.js';
|
|
1001
1001
|
// Use hydrate.js for SSR - it doesn't import CSS directly, avoiding MIME type issues
|
|
1002
1002
|
const frameworkPath = isDev ? '/hydrate.js' : '/assets/hydrate.js';
|
|
1003
1003
|
|
package/islands/ssrShim.js
CHANGED
|
@@ -282,6 +282,7 @@ function registerFrameworkComponents() {
|
|
|
282
282
|
|
|
283
283
|
// EzSwitch - Toggle switch
|
|
284
284
|
ssrRegistry['EzSwitch'] = {
|
|
285
|
+
island: true, // Needs hydration for toggle state
|
|
285
286
|
template(props) {
|
|
286
287
|
return {
|
|
287
288
|
eztype: 'label',
|
|
@@ -487,6 +488,7 @@ function registerFrameworkComponents() {
|
|
|
487
488
|
|
|
488
489
|
// EzPanel - Collapsible panel
|
|
489
490
|
ssrRegistry['EzPanel'] = {
|
|
491
|
+
island: true, // Needs hydration for collapse/expand
|
|
490
492
|
template(props) {
|
|
491
493
|
return {
|
|
492
494
|
eztype: 'div',
|
|
@@ -576,6 +578,7 @@ function registerFrameworkComponents() {
|
|
|
576
578
|
|
|
577
579
|
// EzTabPanel - Tabbed content (renders first/active tab in SSR)
|
|
578
580
|
ssrRegistry['EzTabPanel'] = {
|
|
581
|
+
island: true, // Needs hydration for tab switching
|
|
579
582
|
template(props) {
|
|
580
583
|
const tabs = props.items || [];
|
|
581
584
|
const activeId = props.activeTab || props.active || (tabs[0]?.id);
|
|
@@ -621,6 +624,7 @@ function registerFrameworkComponents() {
|
|
|
621
624
|
|
|
622
625
|
// EzGrid - Data grid (renders simple table in SSR)
|
|
623
626
|
ssrRegistry['EzGrid'] = {
|
|
627
|
+
island: true, // Needs hydration for sorting, filtering, selection
|
|
624
628
|
template(props) {
|
|
625
629
|
const columns = props.columns || [];
|
|
626
630
|
const data = props.data || [];
|
|
@@ -670,6 +674,7 @@ function registerFrameworkComponents() {
|
|
|
670
674
|
|
|
671
675
|
// EzTree - Tree view
|
|
672
676
|
ssrRegistry['EzTree'] = {
|
|
677
|
+
island: true, // Needs hydration for expand/collapse
|
|
673
678
|
template(props) {
|
|
674
679
|
function renderNode(node, level = 0) {
|
|
675
680
|
const hasChildren = node.children && node.children.length > 0;
|
|
@@ -796,6 +801,7 @@ function registerFrameworkComponents() {
|
|
|
796
801
|
|
|
797
802
|
// EzDropdown - Dropdown menu
|
|
798
803
|
ssrRegistry['EzDropdown'] = {
|
|
804
|
+
island: true, // Needs hydration for dropdown toggle
|
|
799
805
|
template(props) {
|
|
800
806
|
// Just render the trigger, dropdown opens on interaction
|
|
801
807
|
return {
|
|
@@ -809,6 +815,7 @@ function registerFrameworkComponents() {
|
|
|
809
815
|
|
|
810
816
|
// EzPicker - Item picker
|
|
811
817
|
ssrRegistry['EzPicker'] = {
|
|
818
|
+
island: true, // Needs hydration for selection
|
|
812
819
|
template(props) {
|
|
813
820
|
return {
|
|
814
821
|
eztype: 'div',
|