From 7b40dbb3a4c4187c636152cd8da45d686464ca6c Mon Sep 17 00:00:00 2001 From: Mikhail Ivanov Date: Sat, 9 Sep 2023 09:52:38 +0300 Subject: [PATCH 1/7] add docs mol_link_source --- link/source/demo.view.tree | 18 ++++++++++++++++++ link/source/readme.md | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 link/source/demo.view.tree create mode 100644 link/source/readme.md diff --git a/link/source/demo.view.tree b/link/source/demo.view.tree new file mode 100644 index 00000000000..182c85c1c79 --- /dev/null +++ b/link/source/demo.view.tree @@ -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 diff --git a/link/source/readme.md b/link/source/readme.md new file mode 100644 index 00000000000..7fcda5a708e --- /dev/null +++ b/link/source/readme.md @@ -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. + From be57aa6ac9ce7b5e50c08da3b929765add540772 Mon Sep 17 00:00:00 2001 From: jin Date: Fri, 6 Oct 2023 19:23:11 +0300 Subject: [PATCH 2/7] $mol_book2: ellipsis hints --- book2/book2.view.css | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/book2/book2.view.css b/book2/book2.view.css index 20c6b86dc0b..15315c23d81 100644 --- a/book2/book2.view.css +++ b/book2/book2.view.css @@ -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]) > * { From e3426a9b6311ad1deaf7c00300fd4bd6df8a503d Mon Sep 17 00:00:00 2001 From: jin Date: Sat, 7 Oct 2023 22:16:57 +0300 Subject: [PATCH 3/7] $mol_wire_race: removed crutch --- wire/race/race.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wire/race/race.ts b/wire/race/race.ts index 14d41f067d0..635621431ca 100644 --- a/wire/race/race.ts +++ b/wire/race/race.ts @@ -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 => { From 16c3b947ee318dd3833fc4a3bbf0be3a3f7385a5 Mon Sep 17 00:00:00 2001 From: jin Date: Sat, 7 Oct 2023 23:24:55 +0300 Subject: [PATCH 4/7] $mol_list_demo_tree: fixed error --- list/demo/tree/tree.view.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/list/demo/tree/tree.view.ts b/list/demo/tree/tree.view.ts index ef348e73215..7508065f0a2 100644 --- a/list/demo/tree/tree.view.ts +++ b/list/demo/tree/tree.view.ts @@ -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 From b01632aadb47e454d869a2411f2d6b2ed50c2c00 Mon Sep 17 00:00:00 2001 From: Stefan Zerkalica Date: Mon, 9 Oct 2023 17:27:27 +0300 Subject: [PATCH 5/7] $mol_link, expose some api --- link/link.view.tree | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/link/link.view.tree b/link/link.view.tree index aa42cc7949f..df0aec49055 100644 --- a/link/link.view.tree +++ b/link/link.view.tree @@ -1,6 +1,10 @@ $mol_link $mol_view uri \ dom_name \a + uri \ + uri_off \ + uri_native null + external false attr * ^ href <= uri_toggle \ From 1bc7c9791c58f4ee3d8f866bbbf18f322329fba0 Mon Sep 17 00:00:00 2001 From: Stefan Zerkalica Date: Mon, 9 Oct 2023 17:32:48 +0300 Subject: [PATCH 6/7] $mol_link: fix url --- link/link.view.tree | 1 - 1 file changed, 1 deletion(-) diff --git a/link/link.view.tree b/link/link.view.tree index df0aec49055..de8008826fb 100644 --- a/link/link.view.tree +++ b/link/link.view.tree @@ -1,7 +1,6 @@ $mol_link $mol_view uri \ dom_name \a - uri \ uri_off \ uri_native null external false From a298f4560aa9a0e6603c586153631dfc980d504f Mon Sep 17 00:00:00 2001 From: Mikhail Ivanov Date: Mon, 9 Oct 2023 15:32:14 +0000 Subject: [PATCH 7/7] move demo --- app/docs/demo.meta.tree | 1 + link/source/{ => demo}/demo.view.tree | 0 2 files changed, 1 insertion(+) rename link/source/{ => demo}/demo.view.tree (100%) diff --git a/app/docs/demo.meta.tree b/app/docs/demo.meta.tree index 13a2b7e9ebe..da3c8d9f437 100644 --- a/app/docs/demo.meta.tree +++ b/app/docs/demo.meta.tree @@ -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 diff --git a/link/source/demo.view.tree b/link/source/demo/demo.view.tree similarity index 100% rename from link/source/demo.view.tree rename to link/source/demo/demo.view.tree