file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
src/lib/slack.ts | TypeScript | import request from './request'
interface Params {
readonly channel: string
readonly reachedNum: number
readonly removedNum: number
readonly webhookUrl: string
}
const slack = (data: Params) => {
const attachments = [{
author_icon: 'https://developer.apple.com/assets/elements/icons/testflight/testflight... | xwartz/testflight-monitor | 7 | 🚑 Manage beta builds of your app, testers, and groups. | TypeScript | xwartz | xwartz | |
src/lib/utils.ts | TypeScript | export function sleep(ms: number): Promise<null> {
return new Promise(resolve => {
setTimeout(resolve, ms)
})
}
export async function asyncForEach(array: any[], callback: Function): Promise<any> {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
| xwartz/testflight-monitor | 7 | 🚑 Manage beta builds of your app, testers, and groups. | TypeScript | xwartz | xwartz | |
src/types/example.d.ts | TypeScript | /**
* If you import a dependency which does not include its own type definitions,
* TypeScript will try to find a definition for it by following the `typeRoots`
* compiler option in tsconfig.json. For this project, we've configured it to
* fall back to this folder if nothing is found in node_modules/@types.
*
* O... | xwartz/testflight-monitor | 7 | 🚑 Manage beta builds of your app, testers, and groups. | TypeScript | xwartz | xwartz | |
eslint.config.mjs | JavaScript | import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{ ignores: ['dist', 'node_modules', '*.config.js', '*.config.mjs'] },
{
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
index.html | HTML | <!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="A clean and elegant X (Twitter) timeline aggregator" />
<title... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
postcss.config.js | JavaScript | export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
| xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
scripts/build-followers.mjs | JavaScript | #!/usr/bin/env node
/**
* 将 followers.txt 转换为 followers.json
*
* 此脚本在构建时自动运行,将简单的文本格式转换为 JSON 格式
* 以便前端代码使用
*/
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const ROOT_DIR = path.join(__dirname, '..');
const DATA... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
scripts/fetch-tweets.mjs | JavaScript | #!/usr/bin/env node
/**
* 推文抓取脚本
*
* 使用方式:
* node scripts/fetch-tweets.mjs
*
* 此脚本从 Nitter 实例抓取推文并保存到 data/tweets.json
* 可在本地运行或通过 GitHub Actions 定时执行
*/
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { exec } from 'child_process';
import { promisify } from 'util';
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
scripts/manage-followers.mjs | JavaScript | #!/usr/bin/env node
/**
* 管理关注者列表脚本
*
* 使用方式:
* node scripts/manage-followers.mjs add <username> [group]
* node scripts/manage-followers.mjs remove <username>
*
* 此脚本用于添加或删除关注者,更新 followers.txt 文件
*/
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
scripts/validate-followers.mjs | JavaScript | #!/usr/bin/env node
/**
* 验证关注者列表 JSON 文件格式
*
* 使用方式:
* node scripts/validate-followers.mjs
*/
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const ROOT_DIR = path.join(__dirname, '..');
const FOLLOWERS_TXT_FILE... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/App.tsx | TypeScript (TSX) | import { useCallback, useMemo } from 'react'
import { Header } from './components/Header'
import { Timeline } from './components/Timeline'
import { FollowerList } from './components/FollowerList'
import { ScrollToTop } from './components/ScrollToTop'
import { useTweets } from './hooks/useTweets'
import { useLocalStorag... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/Avatar.tsx | TypeScript (TSX) | import { clsx } from 'clsx'
interface AvatarProps {
src?: string
alt: string
size?: 'sm' | 'md' | 'lg'
className?: string
}
const sizeMap = {
sm: 32,
md: 48,
lg: 64,
}
const defaultAvatar =
'https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png'
export function Avatar({ src,... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/Button.tsx | TypeScript (TSX) | import { clsx } from 'clsx'
import { Loader2 } from 'lucide-react'
import type { ButtonHTMLAttributes, ReactNode } from 'react'
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
variant?: 'primary' | 'secondary' | 'ghost'
size?: 'sm' | 'md' | 'lg'
loading?: boolean
children: ReactNode
}
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/FollowerList.tsx | TypeScript (TSX) | import { useMemo } from 'react'
import { clsx } from 'clsx'
import { Avatar } from './Avatar'
import type { Follower, Tweet } from '../types'
interface FollowerListProps {
followers: Follower[]
selectedUsers: string[]
onToggleUser: (username: string) => void
tweets?: Tweet[]
}
export function FollowerList({
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/Header.tsx | TypeScript (TSX) | import { Github } from 'lucide-react'
import { Logo } from './Logo'
import { ThemeToggle } from './ThemeToggle'
import { useScrollDirection } from '../hooks/useScrollDirection'
import { clsx } from 'clsx'
export function Header() {
const { scrollDirection, isAtTop } = useScrollDirection()
const shouldShow = isAtTo... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/Logo.tsx | TypeScript (TSX) | import { clsx } from 'clsx'
interface LogoProps {
className?: string
size?: number
}
export function Logo({ className, size = 24 }: LogoProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 64 64"
fill="none"
className={clsx('te... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/ScrollToTop.tsx | TypeScript (TSX) | import { useState, useEffect } from 'react'
import { ArrowUp } from 'lucide-react'
export function ScrollToTop() {
const [isVisible, setIsVisible] = useState(false)
useEffect(() => {
const toggleVisibility = () => {
// Check window scroll position
if (window.scrollY > 400) {
setIsVisible(t... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/ThemeProvider.tsx | TypeScript (TSX) | import {
createContext,
useContext,
useEffect,
useMemo,
useState,
type ReactNode,
} from 'react'
import { useLocalStorage } from '../hooks/useLocalStorage'
type Theme = 'light' | 'dark' | 'system'
interface ThemeContextType {
theme: Theme
setTheme: (theme: Theme) => void
resolvedTheme: 'light' | 'da... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/ThemeToggle.tsx | TypeScript (TSX) | import { Moon, Sun, Monitor } from 'lucide-react'
import { useTheme } from './ThemeProvider'
export function ThemeToggle() {
const { theme, setTheme } = useTheme()
const cycleTheme = () => {
const themes: Array<'light' | 'dark' | 'system'> = [
'light',
'dark',
'system',
]
const curre... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/Timeline.tsx | TypeScript (TSX) | import { formatDistanceToNow } from 'date-fns'
import { zhCN } from 'date-fns/locale'
import { MessageSquare } from 'lucide-react'
import { TweetCard } from './TweetCard'
import { TimelineSkeleton } from './TweetSkeleton'
import type { Tweet } from '../types'
interface TimelineProps {
tweets: Tweet[]
lastUpdated: ... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/TweetCard.tsx | TypeScript (TSX) | import { formatDistanceToNow, format } from 'date-fns'
import { zhCN } from 'date-fns/locale'
import { Repeat2 } from 'lucide-react'
import { Avatar } from './Avatar'
import type { Tweet } from '../types'
interface TweetCardProps {
tweet: Tweet
}
export function TweetCard({ tweet }: TweetCardProps) {
const publis... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/components/TweetSkeleton.tsx | TypeScript (TSX) | export function TweetSkeleton() {
return (
<div className="px-4 py-6 sm:px-6 border-b border-[var(--border)] animate-pulse">
<div className="flex gap-4">
{/* Avatar skeleton */}
<div className="w-12 h-12 rounded-full skeleton flex-shrink-0" />
<div className="flex-1 space-y-3">
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/config/followers.ts | TypeScript | import type { Follower } from '../types'
import followersData from '../../data/followers.json'
/**
* 关注者列表配置
*
* 数据源: data/followers.json
* 可以直接在 GitHub Web UI 编辑此文件来更新关注者列表
*/
export const followers: Follower[] = followersData.followers
/**
* 获取所有关注者用户名
*/
export function getFollowerUsernames(): string[] {
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/hooks/useLocalStorage.ts | TypeScript | import { useState, useEffect, useCallback } from 'react'
/**
* 通用的本地存储 Hook
* @param key 存储键名
* @param initialValue 初始值
* @returns [storedValue, setValue, removeValue] 存储的值、设置函数、删除函数
*/
export function useLocalStorage<T>(
key: string,
initialValue: T
): [T, (value: T | ((val: T) => T)) => void, () => void] {
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/hooks/useScrollDirection.ts | TypeScript | import { useState, useEffect } from 'react'
interface UseScrollDirectionOptions {
threshold?: number
initialDirection?: 'up' | 'down'
}
export function useScrollDirection(options: UseScrollDirectionOptions = {}) {
const { threshold = 10, initialDirection = 'up' } = options
const [scrollDirection, setScrollDir... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/hooks/useTweets.ts | TypeScript | import { useMemo } from 'react'
import tweetsData from '../../data/tweets.json'
import type { Tweet } from '../types'
interface TweetsDataType {
lastUpdated: string
tweets: Tweet[]
}
export function useTweets() {
const data = tweetsData as TweetsDataType
const tweets = useMemo(() => {
return data.tweets.... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/index.css | CSS | @tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--background: #ffffff;
--foreground: #0f172a;
--card: #ffffff;
--card-foreground: #0f172a;
--border: #e2e8f0;
--muted: #f1f5f9;
--muted-foreground: #64748b;
--accent: #1da1f2;
--accent-foreground: #ffffff;
}
.dark {
--background: #... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/main.tsx | TypeScript (TSX) | import React from 'react'
import ReactDOM from 'react-dom/client'
import { App } from './App'
import { ThemeProvider } from './components/ThemeProvider'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<ThemeProvider>
<App />
</ThemeProvider>
</Rea... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/types.ts | TypeScript | // 推文类型
export interface Tweet {
id: string
username: string
displayName: string
avatar: string
content: string
contentHtml: string
publishedAt: Date | string
link: string
// 媒体内容
media?: TweetMedia[]
// 转推信息
retweet?: {
username: string
displayName: string
}
// 引用推文
quote?: {
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
src/vite-env.d.ts | TypeScript | /// <reference types="vite/client" />
| xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
tailwind.config.js | JavaScript | /** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
darkMode: 'class',
theme: {
extend: {
colors: {
twitter: {
blue: '#1DA1F2',
dark: '#15202B',
darker: '#192734',
border: '#38444D',
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
vite.config.ts | TypeScript | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
port: 3000,
open: true,
},
build: {
outDir: 'dist',
... | xwartz/x-line | 0 | A clean and elegant X timeline aggregator | JavaScript | xwartz | xwartz | |
index.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Logseq Assets Plus</title>
</head>
<body>
<... | xyhp915/logseq-assets-plus | 28 | A Logseq plugin to enhance assets features 🚀 | TypeScript | xyhp915 | Charlie | logseq |
libs/animate.min.css | CSS | @charset "UTF-8";/*!
* animate.css - https://animate.style/
* Version - 4.1.1
* Licensed under the MIT license - http://opensource.org/licenses/MIT
*
* Copyright (c) 2020 Animate.css
*/:root{--animate-duration:1s;--animate-delay:1s;--animate-repeat:1}.animate__animated{-webkit-animation-duration:1s;animation-dura... | xyhp915/logseq-assets-plus | 28 | A Logseq plugin to enhance assets features 🚀 | TypeScript | xyhp915 | Charlie | logseq |
libs/uFuzzy.iife.min.js | JavaScript | /*! https://github.com/leeoniya/uFuzzy (v1.0.10) */
window.uFuzzy=function(){"use strict";const e=new Intl.Collator("en").compare,t=1/0,l=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n="eexxaacctt",r=(e,t,l)=>e.replace("A-Z",t).replace("a-z",l),i={unicode:!1,alpha:null,interSplit:"[^A-Za-z\\d']+",intraSplit:"[a-z][A-Z]",... | xyhp915/logseq-assets-plus | 28 | A Logseq plugin to enhance assets features 🚀 | TypeScript | xyhp915 | Charlie | logseq |
src/index.css | CSS | :root, html {
--ls-primary-background-color: #ffffff;
--ls-secondary-background-color: #f7f7f7;
--ls-tertiary-background-color: #eaeaea;
--ls-quaternary-background-color: #dcdcdc;
--ls-active-primary-color: rgb(0, 105, 182);
--ls-active-secondary-color: #00477c;
--ls-border-color: #ccc;
--ls-secondary-b... | xyhp915/logseq-assets-plus | 28 | A Logseq plugin to enhance assets features 🚀 | TypeScript | xyhp915 | Charlie | logseq |
src/index.tsx | TypeScript (TSX) | import './index.css'
import 'react-virtualized/styles.css'
import '@logseq/libs'
import { render } from 'preact'
import { useEffect, useRef, useState } from 'preact/hooks'
import cx from 'classnames'
import {
ArrowsClockwise,
Books,
Faders,
FileAudio,
Folder,
Images,
ListMagnifyingGlass,
Prohibit
} from... | xyhp915/logseq-assets-plus | 28 | A Logseq plugin to enhance assets features 🚀 | TypeScript | xyhp915 | Charlie | logseq |
src/uFuzzy.d.ts | TypeScript | declare class uFuzzy {
constructor(opts?: uFuzzy.Options);
/** search API composed of filter/info/sort, with a info/ranking threshold (1e3) and fast outOfOrder impl */
search(
haystack: string[],
needle: string,
/** limit how many terms will be permuted, default = 0; 5 will result in up to 5! (120) s... | xyhp915/logseq-assets-plus | 28 | A Logseq plugin to enhance assets features 🚀 | TypeScript | xyhp915 | Charlie | logseq |
index.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Logseq fenced code Plus</title>
<script... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
playground/index.css | CSS | body {
@apply p-2;
--lx-gray-01: #eee;
--lx-gray-02: #ddd;
--lx-gray-03: #ccc;
--lx-gray-06: #aaa;
--lx-accent-10: #0096ff;
}
.wp-tile-layout-root {
@apply h-[calc(100vh-30px)] bg-amber-100;
}
.wp-tile-layout.flex {
@apply !flex;
}
.wp-tile-layout-view {
@apply w-full;
} | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
playground/index.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="./index.tsx" type="module"></script>
... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
playground/index.tsx | TypeScript (TSX) | import '../src/main.css'
import './index.css'
import ReactDOM from 'react-dom'
import { getCardViewCtorFromRegistry, TileLayoutRoot } from '../src/Layout'
function Playground() {
return (
<div className={'relative'}>
<TileLayoutRoot
onRequireCardView={async (tile) => {
const cardID = ['Hi... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
postcss.config.js | JavaScript | module.exports = {
plugins: {
'tailwindcss/nesting': {},
tailwindcss: {},
},
}
| xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/App.tsx | TypeScript (TSX) | import React, { useEffect } from 'react'
import { tickEffect } from './Workspace'
export function App() {
useEffect(() => {
console.info('Hi from workspace+ APP!')
}, [])
return (
<div className={'app-inner'}>
<pre className={'p-2'}>
{JSON.stringify(logseq.baseInfo, null, 2)}
</pre>
... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/Layout.spec.tsx | TypeScript (TSX) | import { test, expect } from 'vitest'
import { parseTileDataWithTkey, resizeTileLeft, resizeTileRight } from './Layout'
import { produce } from 'immer'
test('tile layout apis 1', async () => {
const draftData: any = {
direction: 'row',
children: [
{ span: 24, children: [16, { span: 22 }, 7, -1] },
... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/Layout.tsx | TypeScript (TSX) | import './layout.css'
import { useImmer } from 'use-immer'
import { FC, FunctionComponent, useEffect, useRef, useState } from 'react'
import uniqid from 'uniqid'
import { CardID, ICardView, ICardViewConstructor } from './cards/shared'
import { HiCard } from './cards/Hi'
import { original } from 'immer'
import { Youtube... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/Workspace.tsx | TypeScript (TSX) | import './workspace.css'
import React from 'react'
import { applyCardViewInTile, getCardViewCtorFromRegistry, TileLayoutRoot } from './Layout'
import { LSUI, SHUI, toClj, toJs } from './utils'
export function initTestCustomRoute() {
// @ts-ignore
logseq.Experiments.registerRouteRenderer(
'x-route',
{
... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/cards/Calendar.tsx | TypeScript (TSX) | import { TileLayoutAttrs } from '../Layout'
import { ICardView } from './shared'
import React from 'react'
import { LSUI } from '../utils'
export class CalendarCard implements ICardView {
static name = 'CalendarCard'
private _id: string = 'CalendarCard'
private _title: string = 'Calendar Card'
private readonly... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/cards/Editor.tsx | TypeScript (TSX) | import { ICardView } from './shared'
import { LSUI } from '../utils'
import React, { useEffect, useState } from 'react'
import { applyCardViewInTile, TileLayoutAttrs } from '../Layout'
// @ts-ignore
const Components = window.logseq?.Experiments?.Components
const hostSDKBaseAPIs = window.logseq?.Experiments?.ensureHost... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/cards/EmptyPlaceholder.tsx | TypeScript (TSX) | import React from 'react'
import { CardID, ICardViewConstructor } from './shared'
import { applyCardViewInTile, TileLayoutAttrs } from '../Layout'
export function EmptyPlaceholder(
props: {
tileLayout: Partial<TileLayoutAttrs>,
cardsViewRegistry: Map<CardID, ICardViewConstructor>
}
) {
const { tileLayout... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/cards/Hi.tsx | TypeScript (TSX) | import { ICardView } from './shared'
import React from 'react'
import { TileLayoutAttrs } from '../Layout'
export class HiCard implements ICardView {
static name = 'HiCard'
private _id: string = 'HiCard'
private _title: string = 'A card to say Hi for beginners!'
private readonly _tileLayout: Partial<TileLayout... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/cards/Image.tsx | TypeScript (TSX) | import { persistLayoutAndViewState, TileLayoutAttrs } from '../Layout'
import { ICardView } from './shared'
import { useEffect, useState } from 'react'
export class ImageCard implements ICardView {
static name = 'ImageCard'
private _id: string = 'ImageCard'
private _title: string = 'A card to show images!'
pri... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/cards/Youtube.tsx | TypeScript (TSX) | import { CardID, ICardView } from './shared'
import * as console from 'console'
import { persistLayoutAndViewState, TileLayoutAttrs } from '../Layout'
import { useEffect, useState } from 'react'
export class YoutubeCard implements ICardView {
static name = 'YoutubeCard'
private _id: string = 'YoutubeCard'
privat... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/cards/shared.ts | TypeScript | import { ReactElement } from 'react'
import { TileLayoutAttrs } from '../Layout'
export type CardID = string
export interface ICardViewConstructor {
new(tile: Partial<TileLayoutAttrs>, opts?: any): ICardView
onBeforeAddView?(tile: Partial<TileLayoutAttrs>): Promise<any>
onEmptyPlaceholderDrop?(e: any): Promis... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/layout.css | CSS | .wp-tile-layout-root {
@apply relative w-full h-[calc(100vh-48px)];
background-color: var(--lx-gray-03);
}
.wp-tile-layout {
@apply h-full relative grid;
@apply relative overflow-auto outline-none;
border-width: 1px;
border-color: var(--lx-gray-06);
background-color: var(--lx-gray-01);
&:focus, &:fo... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/main.css | CSS | @tailwind base;
@tailwind components;
@tailwind utilities; | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/main.ts | TypeScript | import './main.css'
import '@logseq/libs'
import { App } from './App'
import React from 'react'
import ReactDOM from 'react-dom'
import { initWorkspace } from './Workspace'
function main() {
console.info('Hello from workspace+ plugin!')
logseq.App.registerCommandShortcut(
'mod+1'
, () => {
logseq.Ap... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/react-dom.js | JavaScript | module.exports = logseq.Experiments.ReactDOM | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/react.js | JavaScript | module.exports = logseq.Experiments.React | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/utils.ts | TypeScript | import { FunctionComponent, PropsWithChildren } from 'react'
import { snakeCase } from 'snake-case'
export function toClj(s) {
if (!s) return s
try {
s = logseq.Experiments.ensureHostScope().logseq.sdk.utils.jsx_to_clj(s)
return s
} catch (e) {
console.error(e)
}
}
export function toJs(o) {
if (... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
src/workspace.css | CSS | body[data-page="x-route"] {
.cp__sidebar-main-content {
@apply !max-w-none;
> .pb-24 {
@apply !pb-0 !mb-0;
}
}
#main-content-container {
@apply !p-0;
}
}
.wp-tile-label-text {
@apply text-xs right-10 top-3;
}
.wp-tile-layout-view {
@apply h-full w-full overflow-auto;
&:focus-wit... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
tailwind.config.js | JavaScript | /** @type {import('tailwindcss').Config} */
export default {
content: [
'./index.html',
'./src/**/*.{js,ts,jsx,tsx}',
'./playground/**/*.{js,ts,jsx,tsx}',
],
safelist: [
{ pattern: /grid-/ },
{ pattern: /(col|row)-/ },
],
theme: {
extend: {
gridTemplateColumns: {
'64': 'r... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
vite.config.ts | TypeScript | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// build: {
// rollupOptions: {
// external: ['react', 'react-dom'],
// output: {
// globals: {
// react: 'logseq.Experiment... | xyhp915/logseq-workspace-plus | 0 | A Logseq plugin to enhance workspace features! | TypeScript | xyhp915 | Charlie | logseq |
index.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<link rel="icon" type="image/svg+xml" href="/vite.svg"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>logseq-zotero-plugin</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.t... | xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
src/App.css | CSS | @reference "tailwindcss";
@layer components {
html {
@apply w-screen h-screen bg-black/20 flex items-center justify-center;
}
#root {
@apply p-4 w-[90vw] sm:max-w-[1280px] bg-white rounded-xl overflow-y-auto dark:bg-black;
}
.badge {
background: transparent !important;
white-space: nowrap !... | xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
src/App.tsx | TypeScript (TSX) | import './App.css'
import {
setZoteroUserSettings,
useAppState,
useCacheZEntitiesEffects,
useCollections,
useFilteredTopItems,
usePaginatedTopItems,
useTopItems,
useTopItemsGroupedByCollection,
validateZoteroCredentials,
type ZoteroItemEntity,
} from './store.ts'
import { type PropsWithChildren, use... | xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
src/common.ts | TypeScript | import { v5 } from 'uuid'
import { appState, type ZoteroItemEntity } from './store.ts'
import type { Immutable } from '@hookstate/core'
export const isInLogseq = location.href.includes('v=lsp')
const NAMESPACE_UUID = 'b83c1a7b-50ab-4cd1-b80f-39f5ef6f9dea'
export function id2UUID(id: string): string {
return v5(id,... | xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
src/handlers.ts | TypeScript | import { appState, pushingLogger, zCollectionsState, type ZoteroItemEntity, zTopItemsState } from './store.ts'
import type { Immutable, ImmutableArray } from '@hookstate/core'
import { delay, id2UUID } from './common.ts'
let itemTypesData: Array<any> = []
let itemTypesMapping: Record<string, Array<{ field: string }>> ... | xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
src/hooks/useTableSort.ts | TypeScript | // src/hooks/useTableSort.ts
import { useMemo } from 'react'
import { hookstate, useHookstate } from '@hookstate/core'
export type SortDir = 'asc' | 'desc'
export default function useTableSort(
items: any,
initialKey: string | null = null,
initialDir: SortDir = 'asc',
accessors?: Record<string, (it: any) => a... | xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
src/index.css | CSS | @import "tailwindcss";
@plugin "daisyui";
| xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
src/main.tsx | TypeScript (TSX) | import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import '@logseq/libs'
import { isInLogseq } from './common.ts'
import { appState } from './store.ts'
function render () {
createRoot(document.getElementById('root')!).render(<App/>)
}
if (isInLogseq) {
logseq.ready().th... | xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
src/store.ts | TypeScript | // @ts-ignore
import * as z from 'zotero-api-client'
import { hookstate, type Immutable, type ImmutableArray, type State, useHookstate } from '@hookstate/core'
import { useCallback, useEffect } from 'react'
export type ZoteroItemEntity = {
key: string,
title: string,
itemType: string,
note: string,
dateAdded... | xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
vite.config.ts | TypeScript | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss()
],
})
| xyhp915/logseq-zotero-plugin | 8 | A simple Logseq plugin for Zotero. | TypeScript | xyhp915 | Charlie | logseq |
gsr/__init__.py | Python | """Google Search Resource (GSR) - Research Tool Components"""
| yaacov/gsr | 1 | A tool for researching and analyzing Google search page behavior and structure. | Python | yaacov | Yaacov Zamir | Red Hat |
gsr/browser.py | Python | """
Browser initialization and standard environment configuration
"""
import random
import time
from playwright.sync_api import sync_playwright
import logging
logger = logging.getLogger(__name__)
class BrowserManager:
"""Manages browser initialization with standard browser environment settings"""
def __ini... | yaacov/gsr | 1 | A tool for researching and analyzing Google search page behavior and structure. | Python | yaacov | Yaacov Zamir | Red Hat |
gsr/captcha.py | Python | """
CAPTCHA detection and handling
"""
import time
from typing import Optional, Dict
from datetime import datetime
import logging
from .enums import CAPTCHAType
logger = logging.getLogger(__name__)
class CAPTCHADetector:
"""Detects various types of Google CAPTCHAs and blocks"""
@staticmethod
def detect... | yaacov/gsr | 1 | A tool for researching and analyzing Google search page behavior and structure. | Python | yaacov | Yaacov Zamir | Red Hat |
gsr/cli.py | Python | """
Google Search Resource (GSR) - Main Entry Point
Research tool for analyzing Google search page structure
"""
import argparse
import logging
import sys
import json
from pathlib import Path
from gsr.searcher import HumanLikeGoogleSearcher
from gsr.enums import SearchStatus
logger = logging.getLogger(__name__)
def... | yaacov/gsr | 1 | A tool for researching and analyzing Google search page behavior and structure. | Python | yaacov | Yaacov Zamir | Red Hat |
gsr/enums.py | Python | """
Enumeration types for search status and CAPTCHA detection
"""
from enum import Enum
class SearchStatus(Enum):
"""Status codes for search results"""
SUCCESS = "success"
CAPTCHA_DETECTED = "captcha_detected"
BLOCKED = "blocked"
RATE_LIMITED = "rate_limited"
ERROR = "error"
TIMEOUT = "t... | yaacov/gsr | 1 | A tool for researching and analyzing Google search page behavior and structure. | Python | yaacov | Yaacov Zamir | Red Hat |
gsr/models.py | Python | """
Data models for search results
"""
from typing import List, Dict
from datetime import datetime
from .enums import SearchStatus
class SearchResult:
"""Container for search results with status information"""
def __init__(
self,
status: SearchStatus,
results: List = None,
ca... | yaacov/gsr | 1 | A tool for researching and analyzing Google search page behavior and structure. | Python | yaacov | Yaacov Zamir | Red Hat |
gsr/searcher.py | Python | """
Human-like Google search implementation for research purposes
"""
import random
import time
from datetime import datetime, timedelta
from typing import Optional, Callable
import logging
from .enums import SearchStatus, CAPTCHAType
from .models import SearchResult
from .captcha import CAPTCHADetector
from .session... | yaacov/gsr | 1 | A tool for researching and analyzing Google search page behavior and structure. | Python | yaacov | Yaacov Zamir | Red Hat |
gsr/session.py | Python | """
Session management for browser persistence
"""
import random
import json
from datetime import datetime, timedelta
from pathlib import Path
class SessionManager:
"""Manages browser sessions"""
def __init__(self, session_dir="./sessions"):
self.session_dir = Path(session_dir)
self.session_... | yaacov/gsr | 1 | A tool for researching and analyzing Google search page behavior and structure. | Python | yaacov | Yaacov Zamir | Red Hat |
.devcontainer/post-install.sh | Shell | #!/bin/bash
set -x
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
mv ./kind /usr/local/bin/kind
curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/linux/amd64
chmod +x kubebuilder
mv kubebuilder /usr/local/bin/
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
api/v1/groupversion_info.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
api/v1/pipeline_types.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
api/v1/zz_generated.deepcopy.go | Go | //go:build !ignore_autogenerated
/*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
cmd/main.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_controller.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_dependencies.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_dependencies_test.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_jobs.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_jobs_test.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_reconciler.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_reconciler_test.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_status.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
internal/controller/pipeline_status_test.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
test/e2e/e2e_suite_test.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
test/e2e/e2e_test.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
test/utils/utils.go | Go | /*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed un... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
ui/eslint.config.js | JavaScript | import eslint from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
export default [
eslint.configs.recommended,
{
files: ['src/**/*.ts', 'src/**/*.js'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVer... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
ui/public/index.html | HTML | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JobRunner - Pipeline Builder & Monitor</title>
<link rel="icon" type="image/svg+xml" href="/jobrunner-logo.svg">
<!-- Red Hat fonts -->
<link rel="preconnect" href=... | yaacov/jobrunner | 1 | A job runner runs Kubernetes jobs sequentially. | TypeScript | yaacov | Yaacov Zamir | Red Hat |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.