From b17f61d59b14037086f9c42c1a5ae8144ef96132 Mon Sep 17 00:00:00 2001 From: Karsten Schmidt Date: Fri, 15 Oct 2021 15:37:43 +0200 Subject: [PATCH] docs(examples): update doc links --- examples/commit-heatmap/src/index.ts | 2 +- examples/hdom-canvas-clock/src/index.ts | 2 +- examples/hydrate-basics/src/index.ts | 2 +- examples/poly-spline/src/index.ts | 50 +++++++++++-------------- examples/router-basics/src/config.ts | 7 ++-- examples/router-basics/src/effects.ts | 4 +- examples/router-basics/src/routes.ts | 4 +- examples/rstream-grid/src/config.ts | 2 +- examples/rstream-grid/src/effects.ts | 4 +- examples/rstream-grid/src/events.ts | 4 +- examples/rstream-hdom/src/index.ts | 6 +-- examples/svg-waveform/src/config.ts | 5 +-- examples/svg-waveform/src/effects.ts | 4 +- examples/svg-waveform/src/events.ts | 4 +- examples/triple-query/src/config.ts | 5 +-- examples/triple-query/src/effects.ts | 2 +- examples/triple-query/src/events.ts | 4 +- examples/webgl-shadertoy/src/index.ts | 4 +- 18 files changed, 53 insertions(+), 62 deletions(-) diff --git a/examples/commit-heatmap/src/index.ts b/examples/commit-heatmap/src/index.ts index 7b26b9e057..0151e30da2 100644 --- a/examples/commit-heatmap/src/index.ts +++ b/examples/commit-heatmap/src/index.ts @@ -260,7 +260,7 @@ const packageCommits = (i: number, pkg: string) => /** * Assemble & output full SVG document using hiccup-svg primitives. * - * See: https://github.com/thi-ng/umbrella/blob/develop/packages/compose/src/thread-last.ts + * See: https://docs.thi.ng/umbrella/compose/modules.html#threadLast */ threadLast( commitsByPackage, diff --git a/examples/hdom-canvas-clock/src/index.ts b/examples/hdom-canvas-clock/src/index.ts index 3d06aaf19c..87a454d92d 100644 --- a/examples/hdom-canvas-clock/src/index.ts +++ b/examples/hdom-canvas-clock/src/index.ts @@ -71,7 +71,7 @@ start(() => { // applied in a nested manner... // // see here for a list of all supported attribs: - // https://github.com/thi-ng/umbrella/blob/develop/packages/hdom-canvas/src/index.ts#L35 + // https://docs.thi.ng/umbrella/hiccup-canvas/#attributes [ "g", { diff --git a/examples/hydrate-basics/src/index.ts b/examples/hydrate-basics/src/index.ts index ea2a86a759..5df76698b4 100644 --- a/examples/hydrate-basics/src/index.ts +++ b/examples/hydrate-basics/src/index.ts @@ -19,7 +19,7 @@ const setFreq = (x: number) => state.resetIn(["freq"], x); const app = () => { // HOF canvas component w/ life cycle methods see for further // reference: - // https://github.com/thi-ng/umbrella/blob/develop/packages/hdom-components/src/canvas.ts + // https://docs.thi.ng/umbrella/hdom-components/modules.html#canvas2D // // when serializing to html only the component's `render` method // will be invoked. the component's `init` is invoked later when diff --git a/examples/poly-spline/src/index.ts b/examples/poly-spline/src/index.ts index 1a34199d05..fe5212e50e 100644 --- a/examples/poly-spline/src/index.ts +++ b/examples/poly-spline/src/index.ts @@ -7,7 +7,6 @@ import { line } from "@thi.ng/geom/line"; import { pathFromCubics } from "@thi.ng/geom/path"; import { star } from "@thi.ng/geom/polygon"; import { withAttribs } from "@thi.ng/geom/with-attribs"; -import { convertTree } from "@thi.ng/hiccup-svg/convert"; import { fromRAF } from "@thi.ng/rstream/raf"; import { reactive, Stream } from "@thi.ng/rstream/stream"; import { sync } from "@thi.ng/rstream/sync"; @@ -132,33 +131,28 @@ const app = ], [ "div", - // all @thi.ng/geom shapes implement the `IToHiccup` - // interface and so can be used directly in - // @thi.ng/hdom-canvas visualizations. However, here we're - // using SVG and hence will need to call `convertTree()` to - // transform the hiccup format into a SVG compatible format - // see: - // https://github.com/thi-ng/umbrella/blob/develop/packages/hiccup-svg/src/convert.ts#L34 - convertTree( - svgDoc( - { - width: 480, - height: 480, - viewBox: "-150 -150 300 300", - fill: "none", - stroke: "#ccc", - "stroke-width": 0.25, - }, - poly, - withAttribs(pathFromCubics(cubics), { - stroke: mode ? "blue" : "red", - "stroke-width": 1, - }), - group({ stroke: "#333" }, [ - ...controlPoints, - ...handles, - ]) - ) + // all @thi.ng/geom shapes implement the `IToHiccup` interface + // and so can be used directly in @thi.ng/hdom-canvas + // visualizations. However, here we're using SVG and hence will + // need to provide a `convert` attribute to transform the hiccup + // format into a hiccup-svg compatible format see: + // https://docs.thi.ng/umbrella/hiccup-svg/modules.html#convertTree + svgDoc( + { + convert: true, + width: 480, + height: 480, + viewBox: "-150 -150 300 300", + fill: "none", + stroke: "#ccc", + "stroke-width": 0.25, + }, + poly, + withAttribs(pathFromCubics(cubics), { + stroke: mode ? "blue" : "red", + "stroke-width": 1, + }), + group({ stroke: "#333" }, [...controlPoints, ...handles]) ), ], ]; diff --git a/examples/router-basics/src/config.ts b/examples/router-basics/src/config.ts index 330d353073..54b2fe47b7 100644 --- a/examples/router-basics/src/config.ts +++ b/examples/router-basics/src/config.ts @@ -19,7 +19,7 @@ import * as routes from "./routes"; export const CONFIG: AppConfig = { // router configuration // docs here: - // https://github.com/thi-ng/umbrella/blob/develop/packages/router/src/api.ts#L100 + // https://docs.thi.ng/umbrella/router/ router: { // use URI hash for routes (KISS) useFragment: true, @@ -44,7 +44,7 @@ export const CONFIG: AppConfig = { // and only side effect functions execute any "real" work. // see EventBus docs here: - // https://github.com/thi-ng/umbrella/blob/develop/packages/atom/src/event-bus.ts#L14 + // https://docs.thi.ng/umbrella/interceptors/#event-bus-interceptors-side-effects events: { // sets status to "done" @@ -198,8 +198,7 @@ export const CONFIG: AppConfig = { bodyLink: { class: "link dim black" }, card: { container: { - class: - "mw5 center bg-white br3 pa3 pa4-ns mv3 ba b--black-10 tc", + class: "mw5 center bg-white br3 pa3 pa4-ns mv3 ba b--black-10 tc", }, thumb: { class: "br-100 h3 w3 dib" }, title: { class: "ma1" }, diff --git a/examples/router-basics/src/effects.ts b/examples/router-basics/src/effects.ts index 492d776e29..40135759c0 100644 --- a/examples/router-basics/src/effects.ts +++ b/examples/router-basics/src/effects.ts @@ -1,7 +1,7 @@ // best practice tip: define event & effect names as consts or enums // and avoid hardcoded strings for more safety and easier refactoring -// also see pre-defined event handlers & interceptors in @thi.ng/atom: -// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L14 +// also see pre-defined event handlers & interceptors: +// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L31 export const JSON = "load-json"; export const ROUTE_TO = "route-to"; diff --git a/examples/router-basics/src/routes.ts b/examples/router-basics/src/routes.ts index 321f28cac6..20ec8420bd 100644 --- a/examples/router-basics/src/routes.ts +++ b/examples/router-basics/src/routes.ts @@ -6,8 +6,8 @@ import type { Route } from "@thi.ng/router"; // the `match` arrays specify the individual route elements // docs here: -// https://github.com/thi-ng/umbrella/blob/develop/packages/router/ -// https://github.com/thi-ng/umbrella/blob/develop/packages/router/src/api.ts#L31 +// https://docs.thi.ng/umbrella/router/ +// https://docs.thi.ng/umbrella/router/interfaces/Route.html export const HOME: Route = { id: "home", diff --git a/examples/rstream-grid/src/config.ts b/examples/rstream-grid/src/config.ts index 39499aca55..88d130181b 100644 --- a/examples/rstream-grid/src/config.ts +++ b/examples/rstream-grid/src/config.ts @@ -25,7 +25,7 @@ export const CONFIG: AppConfig = { // and only side effect functions execute any "real" work. // Docs here: - // https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/event-bus.ts#L14 + // https://docs.thi.ng/umbrella/interceptors/#event-bus-interceptors-side-effects events: { // generate slider event handlers. each uses the `snapshot()` // interceptor to record a snapshot of the current app state diff --git a/examples/rstream-grid/src/effects.ts b/examples/rstream-grid/src/effects.ts index 45b256c259..f5707b8556 100644 --- a/examples/rstream-grid/src/effects.ts +++ b/examples/rstream-grid/src/effects.ts @@ -1,7 +1,7 @@ // best practice tip: define event & effect names as consts or enums // and avoid hardcoded strings for more safety and easier refactoring -// also see pre-defined event handlers & interceptors in @thi.ng/atom: -// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L14 +// also see pre-defined event handlers & interceptors: +// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L31 export const SAVE_SVG = "save-svg"; export const SAVE_ANIM = "save-anim"; diff --git a/examples/rstream-grid/src/events.ts b/examples/rstream-grid/src/events.ts index 930faf6ff6..9e75c4ab22 100644 --- a/examples/rstream-grid/src/events.ts +++ b/examples/rstream-grid/src/events.ts @@ -2,8 +2,8 @@ import { EV_REDO, EV_UNDO } from "@thi.ng/interceptors"; // best practice tip: define event & effect names as consts or enums // and avoid hardcoded strings for more safety and easier refactoring -// also see pre-defined event handlers & interceptors in @thi.ng/atom: -// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L14 +// also see pre-defined event handlers & interceptors: +// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L31 export const UNDO = EV_UNDO; export const REDO = EV_REDO; diff --git a/examples/rstream-hdom/src/index.ts b/examples/rstream-hdom/src/index.ts index 8b85fba9b5..9308e2fbe2 100644 --- a/examples/rstream-hdom/src/index.ts +++ b/examples/rstream-hdom/src/index.ts @@ -97,7 +97,7 @@ const counter = (start: number, step: number) => { const s = subscription( undefined, // the `scan` transducer is used to provide counter functionality - // see: https://github.com/thi-ng/umbrella/blob/develop/packages/transducers/src/scan.ts + // see: https://docs.thi.ng/umbrella/transducers/modules.html#scan { xform: scan( reducer( @@ -141,8 +141,8 @@ const app = (ctx: any, initial: number[][]) => { // however, by stating `reset: false` (actually the default) any // subsequent changes to any of the inputs will not be // synchronized see here for further details: - // https://github.com/thi-ng/umbrella/blob/develop/packages/rstream/src/stream-sync.ts#L21 - // https://github.com/thi-ng/umbrella/blob/develop/packages/transducers/src/partition-sync.ts#L7 + // https://docs.thi.ng/umbrella/rstream/interfaces/StreamSyncOpts.html + // https://docs.thi.ng/umbrella/transducers/modules.html#partitionSync reset: false, }); }; diff --git a/examples/svg-waveform/src/config.ts b/examples/svg-waveform/src/config.ts index 2de845b3a2..79fc1ecc54 100644 --- a/examples/svg-waveform/src/config.ts +++ b/examples/svg-waveform/src/config.ts @@ -16,7 +16,7 @@ export const CONFIG: AppConfig = { // and only side effect functions execute any "real" work. // Docs here: - // https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/event-bus.ts#L14 + // https://docs.thi.ng/umbrella/interceptors/#event-bus-interceptors-side-effects events: { // generate event handlers from imported slider definitions @@ -75,8 +75,7 @@ export const CONFIG: AppConfig = { // re-skinning of the whole app ui: { button: { - class: - "pointer bg-black hover-bg-blue bg-animate white pa2 mr1 w-100 ttu b tracked-tight", + class: "pointer bg-black hover-bg-blue bg-animate white pa2 mr1 w-100 ttu b tracked-tight", }, buttongroup: { class: "flex mb2" }, footer: { class: "absolute bottom-1" }, diff --git a/examples/svg-waveform/src/effects.ts b/examples/svg-waveform/src/effects.ts index 7b4efbbe9a..cfd4a4d101 100644 --- a/examples/svg-waveform/src/effects.ts +++ b/examples/svg-waveform/src/effects.ts @@ -1,7 +1,7 @@ // best practice tip: define event & effect names as consts or enums // and avoid hardcoded strings for more safety and easier refactoring -// also see pre-defined event handlers & interceptors in @thi.ng/atom: -// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L14 +// also see pre-defined event handlers & interceptors: +// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L31 /** * Effect description diff --git a/examples/svg-waveform/src/events.ts b/examples/svg-waveform/src/events.ts index 4e0990b074..7eb5e4a7df 100644 --- a/examples/svg-waveform/src/events.ts +++ b/examples/svg-waveform/src/events.ts @@ -2,8 +2,8 @@ import { EV_REDO, EV_UNDO } from "@thi.ng/interceptors"; // best practice tip: define event & effect names as consts or enums // and avoid hardcoded strings for more safety and easier refactoring -// also see pre-defined event handlers & interceptors in @thi.ng/atom: -// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L14 +// also see pre-defined event handlers & interceptors: +// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L31 export const SET_AMP = "set-amp"; export const SET_FREQ = "set-freq"; diff --git a/examples/triple-query/src/config.ts b/examples/triple-query/src/config.ts index b7af8326c4..df583c6347 100644 --- a/examples/triple-query/src/config.ts +++ b/examples/triple-query/src/config.ts @@ -13,7 +13,7 @@ export const CONFIG: AppConfig = { // and only side effect functions execute any "real" work. // Docs here: - // https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/event-bus.ts#L14 + // https://docs.thi.ng/umbrella/interceptors/#event-bus-interceptors-side-effects events: EVENTS, @@ -52,8 +52,7 @@ export const CONFIG: AppConfig = { // re-skinning of the whole app ui: { button: { - class: - "pointer bg-black hover-bg-blue bg-animate white pa2 mr1 w-100 ttu b tracked-tight noselect", + class: "pointer bg-black hover-bg-blue bg-animate white pa2 mr1 w-100 ttu b tracked-tight noselect", }, buttonDisabled: { class: "bg-gray white pa2 mr1 w-100 ttu b tracked-tight noselect", diff --git a/examples/triple-query/src/effects.ts b/examples/triple-query/src/effects.ts index 862e0320e4..5930282f2f 100644 --- a/examples/triple-query/src/effects.ts +++ b/examples/triple-query/src/effects.ts @@ -1,7 +1,7 @@ // best practice tip: define event & effect names as consts or enums // and avoid hardcoded strings for more safety and easier refactoring // also see pre-defined event handlers & interceptors in @thi.ng/atom: -// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L14 +// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L31 export const ADD_TRIPLE = "add-triples"; export const REMOVE_TRIPLE = "remove-triples"; diff --git a/examples/triple-query/src/events.ts b/examples/triple-query/src/events.ts index 2129df63a5..bfc70e9407 100644 --- a/examples/triple-query/src/events.ts +++ b/examples/triple-query/src/events.ts @@ -1,7 +1,7 @@ // best practice tip: define event & effect names as consts or enums // and avoid hardcoded strings for more safety and easier refactoring -// also see pre-defined event handlers & interceptors in @thi.ng/atom: -// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L14 +// also see pre-defined event handlers & interceptors: +// https://github.com/thi-ng/umbrella/blob/develop/packages/interceptors/src/api.ts#L31 export const ADD_CITY = "add-city"; export const ADD_COUNTRY = "add-country"; diff --git a/examples/webgl-shadertoy/src/index.ts b/examples/webgl-shadertoy/src/index.ts index 418264d4e1..3cb876f7de 100644 --- a/examples/webgl-shadertoy/src/index.ts +++ b/examples/webgl-shadertoy/src/index.ts @@ -28,8 +28,8 @@ interface DemoUniforms extends ShaderToyUniforms { // the 2 args given are objects containing GLSL builtin vars and uniforms // // see: -// https://github.com/thi-ng/umbrella/blob/develop/packages/shader-ast-glsl/src/api.ts#L22 -// https://github.com/thi-ng/umbrella/blob/develop/packages/webgl-shadertoy/src/api.ts#L13 +// - https://docs.thi.ng/umbrella/shader-ast-glsl/interfaces/GLSLTarget.html +// - https://docs.thi.ng/umbrella/webgl-shadertoy/modules.html#MainImageFn const mainImage: MainImageFn = (gl, unis) => { // predeclare local vars / symbols let uv: Vec2Sym;