@@ -2,7 +2,7 @@ import { css, html } from "lit";
22import { property , state } from "lit/decorators.js" ;
33import { BaseView } from "./BaseView.ts" ;
44import { Task } from "@lit/task" ;
5- import * as DefaultRecipe from "../lib/default-recipe .ts" ;
5+ import * as DefaultPattern from "../lib/default-pattern .ts" ;
66import { RuntimeInternals } from "../lib/runtime.ts" ;
77
88export class XSpaceView extends BaseView {
@@ -20,7 +20,7 @@ export class XSpaceView extends BaseView {
2020 showShellCharmListView = false ;
2121
2222 @state ( )
23- creatingDefaultRecipe = false ;
23+ creatingDefaultPattern = false ;
2424
2525 private _charms = new Task ( this , {
2626 task : async ( [ rt ] ) => {
@@ -34,23 +34,23 @@ export class XSpaceView extends BaseView {
3434 args : ( ) => [ this . rt ] ,
3535 } ) ;
3636
37- async onRequestDefaultRecipe ( e : Event ) {
37+ async onRequestDefaultPattern ( e : Event ) {
3838 e . preventDefault ( ) ;
39- if ( this . creatingDefaultRecipe ) {
39+ if ( this . creatingDefaultPattern ) {
4040 return ;
4141 }
4242 if ( ! this . rt ) {
4343 throw new Error (
44- "Cannot create default recipe without a runtime." ,
44+ "Cannot create default pattern without a runtime." ,
4545 ) ;
4646 }
47- this . creatingDefaultRecipe = true ;
47+ this . creatingDefaultPattern = true ;
4848 try {
49- await DefaultRecipe . create ( this . rt . cc ( ) ) ;
49+ await DefaultPattern . create ( this . rt . cc ( ) ) ;
5050 } catch ( e ) {
51- console . error ( `Could not create default recipe : ${ e } ` ) ;
51+ console . error ( `Could not create default pattern : ${ e } ` ) ;
5252 } finally {
53- this . creatingDefaultRecipe = false ;
53+ this . creatingDefaultPattern = false ;
5454 this . _charms . run ( ) ;
5555 }
5656 }
@@ -60,8 +60,8 @@ export class XSpaceView extends BaseView {
6060 ? this . rt . cc ( ) . manager ( ) . getSpaceName ( )
6161 : undefined ;
6262 const charms = this . _charms . value ;
63- const defaultRecipe = charms
64- ? DefaultRecipe . getDefaultRecipe ( charms )
63+ const defaultPattern = charms
64+ ? DefaultPattern . getDefaultPattern ( charms )
6565 : undefined ;
6666
6767 const inner = ! charms
@@ -77,24 +77,24 @@ export class XSpaceView extends BaseView {
7777 @charm-removed ="${ ( ) => this . _charms . run ( ) } "
7878 > </ x-charm-list-view >
7979 `
80- : ! defaultRecipe
81- ? ( this . creatingDefaultRecipe
80+ : ! defaultPattern
81+ ? ( this . creatingDefaultPattern
8282 ? html `
8383 < v-box center ="${ true } ">
84- < div > Creating default recipe ...</ div >
84+ < div > Creating default pattern ...</ div >
8585 < x-spinner > </ x-spinner >
8686 </ v-box >
8787 `
8888 : html `
8989 < v-box center ="${ true } ">
90- < div > Create default recipe ?</ div >
90+ < div > Create default pattern ?</ div >
9191 < x-button variant ="primary " @click ="${ this
92- . onRequestDefaultRecipe } "> Go!</ x-button >
92+ . onRequestDefaultPattern } "> Go!</ x-button >
9393 </ v-box >
9494 ` )
9595 // TBD if we want to use x-charm or ct-render directly here
9696 : html `
97- < x-charm-view .charm ="${ defaultRecipe } "> </ x-charm-view >
97+ < x-charm-view .charm ="${ defaultPattern } "> </ x-charm-view >
9898 ` ;
9999
100100 return html `
0 commit comments