Skip to content

Commit

Permalink
0.0.880
Browse files Browse the repository at this point in the history
  • Loading branch information
bahrus committed Jan 19, 2025
1 parent 68cbdad commit 48e0e06
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions Mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export class Mount<TProps extends {}, TActions = TProps, ETProps = TProps>
hydrated: true
}
}

async onNoXForm(self: this): ProPMP<TProps, TActions, ETProps> {
return {
hydrated: true,
Expand Down
8 changes: 7 additions & 1 deletion lib/mixins/TemplMgmt.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const TemplMgmt = (superclass) => class extends superclass {
if (this.#mounted)
return;
this.#mounted = true;
const { xform, xformImpl, clonedTemplate, shadowRootMode, lcXform } = base;
const { xform, xformImpl, clonedTemplate, shadowRootMode, lcXform, xxform } = base;
const fragment = clonedTemplate === undefined ?
!shadowRootMode ? this : this.shadowRoot
: clonedTemplate;
Expand All @@ -92,6 +92,9 @@ export const TemplMgmt = (superclass) => class extends superclass {
}
//await MainTransforms(this as any as TemplMgmtBaseMixin & HTMLElement, base, fragment as DocumentFragment);
}
if (xxform) {
throw 'NI';
}
if (shadowRootMode && lcXform) {
const { Transform } = await import('../../Transform.js');
await Transform(this, this, lcXform, {
Expand Down Expand Up @@ -128,6 +131,9 @@ export const propInfo = {
lcXform: {
parse: false,
},
xxform: {
parse: false,
},
styles: {
parse: false,
},
Expand Down
10 changes: 9 additions & 1 deletion lib/mixins/TemplMgmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const TemplMgmt = (superclass: TemplMgmtBaseMixin) => class extends super
async doTemplMount(base: TemplMgmtBase){
if(this.#mounted) return;
this.#mounted = true;
const {xform, xformImpl, clonedTemplate, shadowRootMode, lcXform} = base;
const {xform, xformImpl, clonedTemplate, shadowRootMode, lcXform, xxform } = base;
const fragment = clonedTemplate === undefined ?
!shadowRootMode ? this : this.shadowRoot!
: clonedTemplate as DocumentFragment;
Expand All @@ -105,6 +105,11 @@ export const TemplMgmt = (superclass: TemplMgmtBaseMixin) => class extends super

//await MainTransforms(this as any as TemplMgmtBaseMixin & HTMLElement, base, fragment as DocumentFragment);
}

if(xxform){
throw 'NI';
}

if(shadowRootMode && lcXform){
const {Transform} = await import('../../Transform.js');
await Transform<any>(this, this, lcXform, {
Expand Down Expand Up @@ -147,6 +152,9 @@ export const propInfo: Partial<{[key in keyof TemplMgmtProps]: PropInfo}> = {
lcXform:{
parse: false,
},
xxform:{
parse: false,
},
styles: {
parse: false,
},
Expand Down
4 changes: 4 additions & 0 deletions lib/mixins/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export interface TemplMgmtProps<MCProps extends Partial<HTMLElement> = HTMLEleme
* Use ":root" to match on the root element
*/
lcXform: XForm<any, any>,
/**
* Use view transitions for the updates
*/
xxform: XForm<any, any, any>,
xformImpl?: () => Promise<ToTransformer<MCProps, MCMethods>>,
skipTemplateClone?: boolean;
//homeInOn?: Partial<{[key in keyof MCProps]: Partial<{[key: string]: RHS<MCProps, MCMethods>}>}>;
Expand Down
2 changes: 1 addition & 1 deletion ts-refs
Submodule ts-refs updated from 406843 to 459ba5

0 comments on commit 48e0e06

Please sign in to comment.