pawa-ssr 1.0.1 → 1.0.3
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 +8 -4
- package/package.json +1 -1
- package/pawaElement.js +1 -0
- package/power.js +1 -0
package/index.js
CHANGED
|
@@ -149,17 +149,20 @@ const component=(el)=>{
|
|
|
149
149
|
}
|
|
150
150
|
})
|
|
151
151
|
const children=el._componentChildren
|
|
152
|
+
/**
|
|
153
|
+
* @type{import('./pawaComponent.js').default}
|
|
154
|
+
*/
|
|
152
155
|
const component =el._component
|
|
153
156
|
stateContext=component
|
|
154
157
|
const insert=(arg={})=>{
|
|
155
|
-
Object.assign(stateContext.
|
|
158
|
+
Object.assign(stateContext._insert,arg)
|
|
156
159
|
}
|
|
157
160
|
/**
|
|
158
161
|
*
|
|
159
162
|
* @param {object} props
|
|
160
163
|
* @returns {object}
|
|
161
164
|
*/
|
|
162
|
-
stateContext._prop={children,...el._props}
|
|
165
|
+
stateContext._prop={children,...el._props,...slots}
|
|
163
166
|
stateContext._name=el._componentName
|
|
164
167
|
const useValidateProps=(props={}) => {
|
|
165
168
|
if (!stateContext) {
|
|
@@ -193,7 +196,7 @@ stateContext._name=el._componentName
|
|
|
193
196
|
try{
|
|
194
197
|
compo=sanitizeTemplate(component.component(app))
|
|
195
198
|
}catch(error){
|
|
196
|
-
console.error(error.message,error.stack)
|
|
199
|
+
console.error(`error from ${stateContext._name}`,error.message,error.stack)
|
|
197
200
|
}
|
|
198
201
|
if (component?._insert) {
|
|
199
202
|
Object.assign(el._context,component._insert)
|
|
@@ -255,7 +258,8 @@ const textContentHandler=(el)=>{
|
|
|
255
258
|
|
|
256
259
|
});
|
|
257
260
|
} catch (error) {
|
|
258
|
-
console.warn(`error at ${el} textcontent`)
|
|
261
|
+
console.warn(`error at ${el._template} textcontent`)
|
|
262
|
+
console.error(error.message,error.stack)
|
|
259
263
|
}
|
|
260
264
|
};
|
|
261
265
|
evaluate()
|
package/package.json
CHANGED
package/pawaElement.js
CHANGED
package/power.js
CHANGED