pawa-ssr 1.3.15 → 1.3.17

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/index.js CHANGED
@@ -565,13 +565,6 @@ const streamingComponent=async (el,stream)=>{
565
565
  }
566
566
  })
567
567
  const children=el._componentChildren
568
- const hydrate={
569
- children:children,
570
- props:{
571
- ...el._hydrateProps,
572
- },
573
- slots:{...slotHydrates},
574
- }
575
568
 
576
569
  const id=pawaGenerateId(10)
577
570
  const encodeJSON = (obj) => Buffer.from(JSON.stringify(obj)).toString('base64').replace(/\+/g, '-');
@@ -645,6 +638,13 @@ appContext.component._prop={children,...el._props,...slots}
645
638
  if (appContext?.insert){
646
639
  Object.assign(el._context,appContext.insert)
647
640
  }
641
+ const hydrate={
642
+ children:children,
643
+ props:{
644
+ ...el._hydrateProps,
645
+ },
646
+ slots:{...slotHydrates},
647
+ }
648
648
  if (isBoundary) {
649
649
  store.getStore().batch.push({
650
650
  component:compo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawa-ssr",
3
- "version": "1.3.15",
3
+ "version": "1.3.17",
4
4
  "type":"module",
5
5
  "description": "pawajs ssr libary",
6
6
  "main": "index.js",
package/pawaElement.js CHANGED
@@ -195,17 +195,17 @@ class PawaElement {
195
195
  }else{
196
196
  name=attr.name
197
197
  }
198
- this._hydrateProps[name]=attr.value
198
+ let hydatename
199
+ if(name === 'class'){
200
+ hydatename=':'+'className'
201
+ }else if(name === 'default'){
202
+ hydatename=':'+'defaultValue'
203
+ }else{
204
+ hydatename=':'+name.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
205
+ }
206
+ this._hydrateProps[hydatename]=attr.value
199
207
  const setProps=()=>{
200
208
  delete this._restProps[name]
201
- let hydatename
202
- if(name === 'class'){
203
- hydatename=':'+'className'
204
- }else if(name === 'default'){
205
- hydatename=':'+'defaultValue'
206
- }else{
207
- hydatename=':'+name
208
- }
209
209
  let value=attr.value
210
210
  if (value.includes('@{')) {
211
211
  const regex = /@{([^}]*)}/g;