Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/hyoo-ru/mam_mol
Browse files Browse the repository at this point in the history
  • Loading branch information
nin-jin committed Oct 11, 2023
2 parents d41258a + dc68f20 commit e225bfe
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/docs/demo.meta.tree
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ include \/mol/layout/demo
include \/mol/link/demo
include \/mol/link/iconed/demo
include \/mol/link/lazy/demo
include \/mol/link/source/demo
include \/mol/list/demo
include \/mol/list/demo/table
include \/mol/list/demo/tree
Expand Down
20 changes: 16 additions & 4 deletions book2/book2.view.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,29 @@
content: '';
position: absolute;
top: 1.5rem;
width: 1px;
width: 3px;
height: 1rem;
background: var(--mol_theme_focus);
background: linear-gradient(
to bottom,
var(--mol_theme_focus) 0%,
var(--mol_theme_focus) 15%,
transparent 15%,
transparent 45%,
var(--mol_theme_focus) 45%,
var(--mol_theme_focus) 55%,
transparent 55%,
transparent 85%,
var(--mol_theme_focus) 85%,
var(--mol_theme_focus) 100%
);
border-radius: var(--mol_gap_round);
opacity: .5;
}
[mol_book2] > *:not(:first-of-type):before {
left: -1px;
left: -2px;
}
[mol_book2] > *:not(:last-of-type)::after {
right: -1px;
right: -2px;
}

:where([mol_book2]) > * {
Expand Down
3 changes: 3 additions & 0 deletions link/link.view.tree
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
$mol_link $mol_view
uri \
dom_name \a
uri_off \
uri_native null
external false
attr *
^
href <= uri_toggle \
Expand Down
18 changes: 18 additions & 0 deletions link/source/demo/demo.view.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$mol_link_source_demo $mol_example_small
title \Link with icon
sub /
<= Blocks $mol_list
rows /
<= Input $mol_string
value? <=> uri? \https://github.com/hyoo-ru/mam_mol/
<= Output $mol_link_source
uri <= uri?
tags /
\link
\icon
\source
\github
\url
aspects /
\Navigation
\Widget/Button
20 changes: 20 additions & 0 deletions link/source/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# $mol_link_source

Hyperlink on source with GitHub icon.

## [Online demo](https://mol.hyoo.ru/#!section=demos/readme/demo=mol_link_source_demo)

## Usage example

```
<= GitHub $mol_link_source
uri \https://github.com/hyoo-ru/mam_mol/
```
## Extends: [$mol_link](https://mol.hyoo.ru/#!section=demos/readme/demo=mol_link_demo)

## Properties

**`uri() : string`**

Returns target URI.

5 changes: 4 additions & 1 deletion list/demo/tree/tree.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ namespace $.$$ {
@ $mol_mem_key
row_content( id : number[] ) {
$mol_wire_solid()
return [ ... $mol_range2( index => this.Row([ ... id , index ]) , ()=> Math.floor( Math.random() * 10 + 5 ) ) ]
return Array.from(
{ length: Math.floor( Math.random() * 10 + 5 ) },
( _, index )=> this.Row([ ... id , index ]),
)
}

@ $mol_mem_key
Expand Down
4 changes: 1 addition & 3 deletions wire/race/race.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ namespace $ {
export function $mol_wire_race<
Tasks extends ( ( ... args: any )=> any )[]
>( ... tasks: Tasks ): {
[ index in keyof Tasks ]: index extends number
? ReturnType< Tasks[ index ] >
: Tasks[ index ]
[ index in keyof Tasks ]: ReturnType< Tasks[ index ] >
} {

const results = tasks.map( task => {
Expand Down

0 comments on commit e225bfe

Please sign in to comment.