This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { FiltersState } from '@/components/data-table-filter/core/types' | |
import { filtersSchema } from '@/components/data-table-filter/core/types' | |
import type { FilterKeys } from '@/data/globalState' | |
import { noOp } from '@/shared/things' | |
import { useZero } from '@/shared/zero/useZero' | |
import type { ZSchema } from '@/shared/zero/zeroSchema.mjs' | |
import { escapeLike, type Query, type TTL } from '@rocicorp/zero' | |
import { useQuery } from '@rocicorp/zero/react' | |
import { getTime } from 'date-fns/fp' | |
import { Array, Boolean, Option, pipe, String } from 'effect' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { options } from "preact"; | |
import { Signal } from "@preact/signals"; | |
// Add `bind:value` to JSX types | |
declare global { | |
namespace preact.createElement.JSX { | |
interface HTMLAttributes { | |
"bind:value"?: Signal<string | string[] | number | undefined>; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Using a JavaScript proxy for a super low code REST client */ | |
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
// also see https://github.com/fastify/manifetch | |
// also see https://github.com/flash-oss/allserver | |
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const createApi = (url) => { | |
return new Proxy({}, { | |
get(target, key) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example-client.js | |
Servient = require("@node-wot/core").Servient | |
HttpClientFactory = require("@node-wot/binding-http").HttpClientFactory | |
Helpers = require("@node-wot/core").Helpers | |
// create Servient and add HTTP binding | |
let servient = new Servient(); | |
servient.addCredentials({ | |
"urn:dev:wot:org:eclipse:thingweb:my-example-secure": { |