@@ -93,27 +93,53 @@ function color(): string {
9393 <DocData text =" Since" value ={ docType .since } />
9494 <DocData text =" Cancellable" value ={ docType .cancellable != null ? (docType .cancellable ? " Yes" : " No" ) : null } />
9595 <DocData text =" Requirements" value ={ docType .requirements } />
96- <DocData text =" Event values" value ={ docType .eventValues ?.map (x => x .name .toLowerCase ()) ?? null } />
9796 <DocData text =" Supported events" value ={ docType .events } />
9897 <DocData text =" Returns" value ={ docType .returnType ?.name ?? null } />
9998 </div >
10099
101- { [docType .examples ]
102- .filter (x => x !== null )
103- .map (_ =>
104- <button class = " examples"
105- style = { { backgroundColor: ` #${color ()} ` }} >
106- <svg class = " transition my-auto fill-white" width = " 18" height = " 18" viewBox = " 0 0 18 18" xmlns = " http://www.w3.org/2000/svg" >
107- <path d = " M8.60627 10.8563L5.88752 8.1375C5.85002 8.1 5.82202 8.0595 5.80352 8.016C5.78502 7.9725 5.77552 7.9255 5.77502 7.875C5.77502 7.775 5.80952 7.6875 5.87852 7.6125C5.94752 7.5375 6.03802 7.5 6.15002 7.5H11.85C11.9625 7.5 12.0533 7.5375 12.1223 7.6125C12.1913 7.6875 12.2255 7.775 12.225 7.875C12.225 7.9 12.1875 7.9875 12.1125 8.1375L9.39377 10.8563C9.33127 10.9188 9.26877 10.9625 9.20627 10.9875C9.14377 11.0125 9.07502 11.025 9.00002 11.025C8.92502 11.025 8.85627 11.0125 8.79377 10.9875C8.73127 10.9625 8.66877 10.9188 8.60627 10.8563Z" />
108- </svg >
109- Examples
110- </button >
111- )}
100+ <div class =" flex flex-row gap-4" >
101+ { [docType .examples ]
102+ .filter (x => x !== null )
103+ .map (_ =>
104+ <button class = " examples"
105+ style = { { backgroundColor: ` #${color ()} ` }} >
106+ <svg class = " transition my-auto fill-white" width = " 18" height = " 18" viewBox = " 0 0 18 18" xmlns = " http://www.w3.org/2000/svg" >
107+ <path d = " M8.60627 10.8563L5.88752 8.1375C5.85002 8.1 5.82202 8.0595 5.80352 8.016C5.78502 7.9725 5.77552 7.9255 5.77502 7.875C5.77502 7.775 5.80952 7.6875 5.87852 7.6125C5.94752 7.5375 6.03802 7.5 6.15002 7.5H11.85C11.9625 7.5 12.0533 7.5375 12.1223 7.6125C12.1913 7.6875 12.2255 7.775 12.225 7.875C12.225 7.9 12.1875 7.9875 12.1125 8.1375L9.39377 10.8563C9.33127 10.9188 9.26877 10.9625 9.20627 10.9875C9.14377 11.0125 9.07502 11.025 9.00002 11.025C8.92502 11.025 8.85627 11.0125 8.79377 10.9875C8.73127 10.9625 8.66877 10.9188 8.60627 10.8563Z" />
108+ </svg >
109+ Examples
110+ </button >
111+ )}
112+
113+ { [docType .eventValues ]
114+ .filter (x => x !== null )
115+ .map (_ =>
116+ <button class = " eventValues"
117+ style = { { backgroundColor: ` #${color ()} ` }} >
118+ <svg class = " transition my-auto fill-white" width = " 18" height = " 18" viewBox = " 0 0 18 18" xmlns = " http://www.w3.org/2000/svg" >
119+ <path d = " M8.60627 10.8563L5.88752 8.1375C5.85002 8.1 5.82202 8.0595 5.80352 8.016C5.78502 7.9725 5.77552 7.9255 5.77502 7.875C5.77502 7.775 5.80952 7.6875 5.87852 7.6125C5.94752 7.5375 6.03802 7.5 6.15002 7.5H11.85C11.9625 7.5 12.0533 7.5375 12.1223 7.6125C12.1913 7.6875 12.2255 7.775 12.225 7.875C12.225 7.9 12.1875 7.9875 12.1125 8.1375L9.39377 10.8563C9.33127 10.9188 9.26877 10.9625 9.20627 10.9875C9.14377 11.0125 9.07502 11.025 9.00002 11.025C8.92502 11.025 8.85627 11.0125 8.79377 10.9875C8.73127 10.9625 8.66877 10.9188 8.60627 10.8563Z" />
120+ </svg >
121+ Event values
122+ </button >
123+ )}
124+ </div >
112125
113126 <div class =" example hidden" >
114127 { [docType .examples ]
115128 .filter (x => x !== null )
116129 .map (x => <Code code = { ` ${x ?.join (" \n " )} ` } lang = " applescript" />)}
117- <span class =" hidden" >{ docType .keywords ?.filter (x => x )} </span >
118130 </div >
131+ <div class =" event-value hidden" >
132+ { [docType .eventValues ]
133+ .filter (x => x !== null )
134+ .map (x => <Code code = { ` ${x .map (y => {
135+ const name = y .name ;
136+ if (name .includes (" " )) {
137+ const parts = name .split (" " );
138+ return ` ${parts [0 ]} event-${parts [1 ]} ` ;
139+ } else {
140+ return ` event-${name } ` ;
141+ }
142+ }).join (" \n " )} ` } lang = " applescript" />)}
143+ </div >
144+ <span class =" hidden" >{ docType .keywords ?.filter (x => x )} </span >
119145</section >
0 commit comments