index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/xitanggg/open-resume/src/app/components/Resume
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF/ResumePDFSkills.tsx
import { View } from "@react-pdf/renderer"; import { ResumePDFSection, ResumePDFBulletList, ResumeFeaturedSkill, } from "components/Resume/ResumePDF/common"; import { styles, spacing } from "components/Resume/ResumePDF/styles"; import type { ResumeSkills } from "lib/redux/types"; export const ResumePDFSkills = (...
9,400
0
petrpan-code/xitanggg/open-resume/src/app/components/Resume
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF/ResumePDFWorkExperience.tsx
import { View } from "@react-pdf/renderer"; import { ResumePDFSection, ResumePDFBulletList, ResumePDFText, } from "components/Resume/ResumePDF/common"; import { styles, spacing } from "components/Resume/ResumePDF/styles"; import type { ResumeWorkExperience } from "lib/redux/types"; export const ResumePDFWorkExpe...
9,401
0
petrpan-code/xitanggg/open-resume/src/app/components/Resume
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF/index.tsx
import { Page, View, Document } from "@react-pdf/renderer"; import { styles, spacing } from "components/Resume/ResumePDF/styles"; import { ResumePDFProfile } from "components/Resume/ResumePDF/ResumePDFProfile"; import { ResumePDFWorkExperience } from "components/Resume/ResumePDF/ResumePDFWorkExperience"; import { Resum...
9,402
0
petrpan-code/xitanggg/open-resume/src/app/components/Resume
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF/styles.ts
import { StyleSheet } from "@react-pdf/renderer"; // Tailwindcss Spacing Design System: https://tailwindcss.com/docs/theme#spacing // It is converted from rem to pt (1rem = 12pt) since https://react-pdf.org/styling only accepts pt unit export const spacing = { 0: "0", 0.5: "1.5pt", 1: "3pt", 1.5: "4.5pt", 2:...
9,403
0
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF/common/ResumePDFIcon.tsx
import { Svg, Path } from "@react-pdf/renderer"; import { styles } from "components/Resume/ResumePDF/styles"; /** * Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License * - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. */ const EMAIL_PATH_D = "M64 112c-8.8...
9,404
0
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF/common/SuppressResumePDFErrorMessage.tsx
"use client"; /** * Suppress ResumePDF development errors. * See ResumePDF doc string for context. */ if (typeof window !== "undefined" && window.location.hostname === "localhost") { const consoleError = console.error; const SUPPRESSED_WARNINGS = ["DOCUMENT", "PAGE", "TEXT", "VIEW"]; console.error = function ...
9,405
0
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF
petrpan-code/xitanggg/open-resume/src/app/components/Resume/ResumePDF/common/index.tsx
import { Text, View, Link } from "@react-pdf/renderer"; import type { Style } from "@react-pdf/types"; import { styles, spacing } from "components/Resume/ResumePDF/styles"; import { DEBUG_RESUME_PDF_FLAG } from "lib/constants"; import { DEFAULT_FONT_COLOR } from "lib/redux/settingsSlice"; export const ResumePDFSection...
9,406
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/CustomForm.tsx
import { Form } from "components/ResumeForm/Form"; import { BulletListIconButton } from "components/ResumeForm/Form/IconButton"; import { BulletListTextarea } from "components/ResumeForm/Form/InputGroup"; import { useAppDispatch, useAppSelector } from "lib/redux/hooks"; import { changeCustom, selectCustom } from "lib/r...
9,407
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/EducationsForm.tsx
import { Form, FormSection } from "components/ResumeForm/Form"; import { BulletListTextarea, Input, } from "components/ResumeForm/Form/InputGroup"; import { BulletListIconButton } from "components/ResumeForm/Form/IconButton"; import type { CreateHandleChangeArgsWithDescriptions } from "components/ResumeForm/types";...
9,408
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/ProfileForm.tsx
import { BaseForm } from "components/ResumeForm/Form"; import { Input, Textarea } from "components/ResumeForm/Form/InputGroup"; import { useAppDispatch, useAppSelector } from "lib/redux/hooks"; import { changeProfile, selectProfile } from "lib/redux/resumeSlice"; import { ResumeProfile } from "lib/redux/types"; export...
9,409
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/ProjectsForm.tsx
import { Form, FormSection } from "components/ResumeForm/Form"; import { Input, BulletListTextarea, } from "components/ResumeForm/Form/InputGroup"; import type { CreateHandleChangeArgsWithDescriptions } from "components/ResumeForm/types"; import { useAppDispatch, useAppSelector } from "lib/redux/hooks"; import { se...
9,410
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/SkillsForm.tsx
import { Form } from "components/ResumeForm/Form"; import { BulletListTextarea, InputGroupWrapper, } from "components/ResumeForm/Form/InputGroup"; import { FeaturedSkillInput } from "components/ResumeForm/Form/FeaturedSkillInput"; import { BulletListIconButton } from "components/ResumeForm/Form/IconButton"; import ...
9,411
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/WorkExperiencesForm.tsx
import { Form, FormSection } from "components/ResumeForm/Form"; import { Input, BulletListTextarea, } from "components/ResumeForm/Form/InputGroup"; import type { CreateHandleChangeArgsWithDescriptions } from "components/ResumeForm/types"; import { useAppDispatch, useAppSelector } from "lib/redux/hooks"; import { ...
9,412
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/index.tsx
"use client"; import { useState } from "react"; import { useAppSelector, useSaveStateToLocalStorageOnChange, useSetInitialStore, } from "lib/redux/hooks"; import { ShowForm, selectFormsOrder } from "lib/redux/settingsSlice"; import { ProfileForm } from "components/ResumeForm/ProfileForm"; import { WorkExperiences...
9,413
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/types.ts
export type CreateHandleChangeArgsWithDescriptions<T> = | [field: Exclude<keyof T, "descriptions">, value: string] | [field: "descriptions", value: string[]];
9,414
0
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/Form/FeaturedSkillInput.tsx
import React, { useState } from "react"; import { INPUT_CLASS_NAME } from "components/ResumeForm/Form/InputGroup"; export const FeaturedSkillInput = ({ skill, rating, setSkillRating, placeholder, className, circleColor, }: { skill: string; rating: number; setSkillRating: (skill: string, rating: numbe...
9,415
0
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/Form/IconButton.tsx
import { IconButton } from "components/Button"; import { EyeIcon, EyeSlashIcon, ArrowSmallUpIcon, ArrowSmallDownIcon, TrashIcon, ListBulletIcon, } from "@heroicons/react/24/outline"; export const ShowIconButton = ({ show, setShow, }: { show: boolean; setShow: (show: boolean) => void; }) => { cons...
9,416
0
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/Form/InputGroup.tsx
import { useState, useEffect } from "react"; import ContentEditable from "react-contenteditable"; import { useAutosizeTextareaHeight } from "lib/hooks/useAutosizeTextareaHeight"; interface InputProps<K extends string, V extends string | string[]> { label: string; labelClassName?: string; // name is passed in as ...
9,417
0
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/Form/index.tsx
import { ExpanderWithHeightTransition } from "components/ExpanderWithHeightTransition"; import { DeleteIconButton, MoveIconButton, ShowIconButton, } from "components/ResumeForm/Form/IconButton"; import { useAppDispatch, useAppSelector } from "lib/redux/hooks"; import { changeFormHeading, changeFormOrder, ch...
9,418
0
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/ThemeForm/InlineInput.tsx
interface InputProps<K extends string, V extends string> { label: string; labelClassName?: string; name: K; value?: V; placeholder: string; inputStyle?: React.CSSProperties; onChange: (name: K, value: V) => void; } export const InlineInput = <K extends string>({ label, labelClassName, name, value...
9,419
0
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/ThemeForm/Selection.tsx
import type { GeneralSetting } from "lib/redux/settingsSlice"; import { PX_PER_PT } from "lib/constants"; import { FONT_FAMILY_TO_STANDARD_SIZE_IN_PT, FONT_FAMILY_TO_DISPLAY_NAME, type FontFamily, } from "components/fonts/constants"; import { getAllFontFamiliesToLoad } from "components/fonts/lib"; import dynamic ...
9,420
0
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/ThemeForm/constants.ts
export const THEME_COLORS = [ "#f87171", // Red-400 "#ef4444", // Red-500 "#fb923c", // Orange-400 "#f97316", // Orange-500 "#fbbf24", // Amber-400 "#f59e0b", // Amber-500 "#22c55e", // Green-500 "#15803d", // Green-700 "#38bdf8", // Sky-400 "#0ea5e9", // Sky-500 "#818cf8", // Indigo-400 "#6366f...
9,421
0
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm
petrpan-code/xitanggg/open-resume/src/app/components/ResumeForm/ThemeForm/index.tsx
import { BaseForm } from "components/ResumeForm/Form"; import { InputGroupWrapper } from "components/ResumeForm/Form/InputGroup"; import { THEME_COLORS } from "components/ResumeForm/ThemeForm/constants"; import { InlineInput } from "components/ResumeForm/ThemeForm/InlineInput"; import { DocumentSizeSelections, Font...
9,422
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/documentation/Badge.tsx
export const Badge = ({ children }: { children: React.ReactNode }) => ( <span className="inline-flex rounded-md bg-blue-50 px-2 pb-0.5 align-text-bottom text-xs font-semibold text-blue-700 ring-1 ring-inset ring-blue-700/10"> {children} </span> );
9,423
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/documentation/Heading.tsx
import { cx } from "lib/cx"; const HEADING_CLASSNAMES = { 1: "text-2xl font-bold", 2: "text-xl font-bold", 3: "text-lg font-semibold", }; export const Heading = ({ level = 1, children, className = "", }: { level?: 1 | 2 | 3; smallMarginTop?: boolean; children: React.ReactNode; className?: string; ...
9,424
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/documentation/Link.tsx
import { cx } from "lib/cx"; export const Link = ({ href, children, className = "", }: { href: string; children: React.ReactNode; className?: string; }) => { return ( <a href={href} target="_blank" className={cx( "underline underline-offset-2 hover:decoration-2", cla...
9,425
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/documentation/Paragraph.tsx
import { cx } from "lib/cx"; export const Paragraph = ({ smallMarginTop = false, children, className = "", }: { smallMarginTop?: boolean; children: React.ReactNode; className?: string; }) => { return ( <p className={cx( smallMarginTop ? "mt-[0.8em]" : "mt-[1.5em]", "text-lg text...
9,426
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/documentation/Table.tsx
import { cx } from "lib/cx"; export const Table = ({ table, title, className, trClassNames = [], tdClassNames = [], }: { table: React.ReactNode[][]; title?: string; className?: string; trClassNames?: string[]; tdClassNames?: string[]; }) => { const tableHeader = table[0]; const tableBody = tabl...
9,427
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/documentation/index.tsx
import { Heading } from "components/documentation/Heading"; import { Paragraph } from "components/documentation/Paragraph"; import { Link } from "components/documentation/Link"; import { Badge } from "components/documentation/Badge"; import { Table } from "components/documentation/Table"; export { Heading, Paragraph, ...
9,428
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/fonts/FontsZh.tsx
import "public/fonts/fonts-zh.css"; /** * Empty component. Main purpose is to load fonts-zh.css */ const FontsZh = () => <></>; export default FontsZh;
9,429
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/fonts/NonEnglishFontsCSSLoader.tsx
import { useState, useEffect } from "react"; import dynamic from "next/dynamic"; import { getAllFontFamiliesToLoad } from "components/fonts/lib"; const FontsZhCSR = dynamic(() => import("components/fonts/FontsZh"), { ssr: false, }); /** * Empty component to lazy load non-english fonts CSS conditionally * * Refer...
9,430
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/fonts/constants.ts
/** * Adding a new font family involves 4 steps: * Step 1. Add it to one of the below FONT_FAMILIES variable array: * English fonts -> SANS_SERIF_ENGLISH_FONT_FAMILIES or SERIF_ENGLISH_FONT_FAMILIES * Non-English fonts -> NON_ENGLISH_FONT_FAMILIES * Once the font is added, it would take car...
9,431
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/fonts/hooks.tsx
import { useEffect } from "react"; import { Font } from "@react-pdf/renderer"; import { ENGLISH_FONT_FAMILIES } from "components/fonts/constants"; import { getAllFontFamiliesToLoad } from "components/fonts/lib"; /** * Register all fonts to React PDF so it can render fonts correctly in PDF */ export const useRegister...
9,432
0
petrpan-code/xitanggg/open-resume/src/app/components
petrpan-code/xitanggg/open-resume/src/app/components/fonts/lib.ts
"use client"; import { ENGLISH_FONT_FAMILIES, NON_ENGLISH_FONT_FAMILIES, NON_ENGLISH_FONT_FAMILY_TO_LANGUAGE, } from "components/fonts/constants"; /** * getPreferredNonEnglishFontFamilies returns non-english font families that are included in * user's preferred languages. This is to avoid loading fonts/languag...
9,433
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/home/AutoTypingResume.tsx
"use client"; import { useEffect, useState, useRef } from "react"; import { ResumePDF } from "components/Resume/ResumePDF"; import { initialResumeState } from "lib/redux/resumeSlice"; import { initialSettings } from "lib/redux/settingsSlice"; import { ResumeIframeCSR } from "components/Resume/ResumeIFrame"; import { ST...
9,434
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/home/Features.tsx
import Image from "next/image"; import featureFreeSrc from "public/assets/feature-free.svg"; import featureUSSrc from "public/assets/feature-us.svg"; import featurePrivacySrc from "public/assets/feature-privacy.svg"; import featureOpenSourceSrc from "public/assets/feature-open-source.svg"; import { Link } from "compone...
9,435
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/home/Hero.tsx
import Link from "next/link"; import { FlexboxSpacer } from "components/FlexboxSpacer"; import { AutoTypingResume } from "home/AutoTypingResume"; export const Hero = () => { return ( <section className="lg:flex lg:h-[825px] lg:justify-center"> <FlexboxSpacer maxWidth={75} minWidth={0} className="hidden lg:...
9,436
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/home/LogoCloud.tsx
import logoCornellSrc from "public/assets/logo-cornell.svg"; import logoColumbiaSrc from "public/assets/logo-columbia.svg"; import logoNortheasternSrc from "public/assets/logo-northeastern.svg"; import logoDropboxSrc from "public/assets/logo-dropbox.svg"; import logoGoogleSrc from "public/assets/logo-google.svg"; impor...
9,437
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/home/QuestionsAndAnswers.tsx
import { Link } from "components/documentation"; const QAS = [ { question: "Q1. What is a resume builder? Why resume builder is better than resume template doc?", answer: ( <> <p> There are two ways to create a resume today. One option is to use a resume template, such...
9,438
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/home/Steps.tsx
const STEPS = [ { title: "Add a resume pdf", text: "or create from scratch" }, { title: "Preview design", text: "and make edits" }, { title: "Download new resume", text: "and apply with confidence" }, ]; export const Steps = () => { return ( <section className="mx-auto mt-8 rounded-2xl bg-sky-50 bg-dot px-...
9,439
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/home/Testimonials.tsx
"use client"; import heartSrc from "public/assets/heart.svg"; import testimonialSpiegelSrc from "public/assets/testimonial-spiegel.jpg"; import testimonialSantiSrc from "public/assets/testimonial-santi.jpg"; import testimonialVivianSrc from "public/assets/testimonial-vivian.jpg"; import React, { useEffect, useRef, useS...
9,440
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/home/constants.ts
import { initialEducation, initialProfile, initialProject, initialWorkExperience, } from "lib/redux/resumeSlice"; import type { Resume } from "lib/redux/types"; import { deepClone } from "lib/deep-clone"; export const END_HOME_RESUME: Resume = { profile: { name: "John Doe", summary: "Software e...
9,441
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/lib/constants.ts
export const PX_PER_PT = 4 / 3; // Reference: https://www.prepressure.com/library/paper-size/letter // Letter size is commonly used in US & Canada, while A4 is the standard for rest of world. export const LETTER_WIDTH_PT = 612; const LETTER_HEIGHT_PT = 792; export const LETTER_WIDTH_PX = LETTER_WIDTH_PT * PX_PER_PT; e...
9,442
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/lib/cx.ts
/** * cx is a simple util to join classNames together. Think of it as a simplified version of the open source classnames util * Reference: https://dev.to/gugaguichard/replace-clsx-classnames-or-classcat-with-your-own-little-helper-3bf * * @example * cx('px-1', 'mt-2'); // => 'px-1 mt-2' * cx('px-1', true && 'mt-2...
9,443
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/lib/deep-clone.ts
/** * Server side object deep clone util using JSON serialization. * Not efficient for large objects but good enough for most use cases. * * Client side can simply use structuredClone. */ export const deepClone = <T extends { [key: string]: any }>(object: T) => JSON.parse(JSON.stringify(object)) as T;
9,444
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/lib/deep-merge.ts
type Object = { [key: string]: any }; const isObject = (item: any): item is Object => { return item && typeof item === "object" && !Array.isArray(item); }; /** * Deep merge two objects by overriding target with fields in source. * It returns a new object and doesn't modify any object in place since * it deep clo...
9,445
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/lib/get-px-per-rem.ts
export const getPxPerRem = () => { const bodyComputedStyle = getComputedStyle( document.querySelector("body")! ) as any; return parseFloat(bodyComputedStyle["font-size"]) || 16; };
9,446
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/lib/make-object-char-iterator.ts
import { deepClone } from "lib/deep-clone"; type Object = { [key: string]: any }; /** * makeObjectCharIterator is a generator function that iterates a start object to * match an end object state by iterating through each string character. * * Note: Start object and end object must have the same structure and same...
9,447
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/__tests__/cx.test.ts
import { cx } from "lib/cx"; test("cx", () => { expect(cx("px-1", "mt-2")).toEqual("px-1 mt-2"); expect(cx("px-1", true && "mt-2")).toEqual("px-1 mt-2"); expect(cx("px-1", false && "mt-2")).toEqual("px-1"); });
9,448
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/__tests__/make-object-char-iterator.test.ts
import { makeObjectCharIterator } from "lib/make-object-char-iterator"; test("Simple object", () => { const start = { a: "" }; const end = { a: "abc" }; const iterator = makeObjectCharIterator(start, end); expect(iterator.next().value).toEqual({ a: "a" }); expect(iterator.next().value).toEqual({ a: "ab" }); ...
9,449
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/hooks/useAutosizeTextareaHeight.tsx
import { useEffect, useRef } from "react"; /** * Hook to autosize textarea height. * * The trick to resize is to first set its height to 0 and then set it back to scroll height. * Reference: https://stackoverflow.com/a/25621277/7699841 * * @example // Tailwind CSS * const textareaRef = useAutosizeTextareaHeight...
9,450
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/hooks/useTailwindBreakpoints.tsx
import { useEffect, useState } from "react"; const enum TailwindBreakpoint { sm = 640, md = 768, lg = 1024, xl = 1280, "2xl" = 1536, } export const useTailwindBreakpoints = () => { const [isSm, setIsSm] = useState(false); const [isMd, setIsMd] = useState(false); const [isLg, setIsLg] = useState(false)...
9,451
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/group-lines-into-sections.ts
import type { ResumeKey } from "lib/redux/types"; import type { Line, Lines, ResumeSectionToLines, } from "lib/parse-resume-from-pdf/types"; import { hasLetterAndIsAllUpperCase, hasOnlyLettersSpacesAmpersands, isBold, } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/common-features"; expo...
9,452
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/group-text-items-into-lines.ts
import { BULLET_POINTS } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/bullet-points"; import type { TextItems, Line, Lines } from "lib/parse-resume-from-pdf/types"; /** * Step 2: Group text items into lines. This returns an array where each position * contains text items in the same line of the p...
9,453
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/index.ts
import { readPdf } from "lib/parse-resume-from-pdf/read-pdf"; import { groupTextItemsIntoLines } from "lib/parse-resume-from-pdf/group-text-items-into-lines"; import { groupLinesIntoSections } from "lib/parse-resume-from-pdf/group-lines-into-sections"; import { extractResumeFromSections } from "lib/parse-resume-from-pd...
9,454
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/read-pdf.ts
// Getting pdfjs to work is tricky. The following 3 lines would make it work // https://stackoverflow.com/a/63486898/7699841 import * as pdfjs from "pdfjs-dist"; // @ts-ignore import pdfjsWorker from "pdfjs-dist/build/pdf.worker.entry"; pdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker; import type { TextItem as Pdfjs...
9,455
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/types.ts
import type { ResumeKey } from "lib/redux/types"; export interface TextItem { text: string; x: number; y: number; width: number; height: number; fontName: string; hasEOL: boolean; } export type TextItems = TextItem[]; export type Line = TextItem[]; export type Lines = Line[]; export type ResumeSectionT...
9,456
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-education.ts
import type { TextItem, FeatureSet, ResumeSectionToLines, } from "lib/parse-resume-from-pdf/types"; import type { ResumeEducation } from "lib/redux/types"; import { getSectionLinesByKeywords } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/get-section-lines"; import { divideSectionIntoSubsection...
9,457
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-profile.ts
import type { ResumeSectionToLines, TextItem, FeatureSet, } from "lib/parse-resume-from-pdf/types"; import { getSectionLinesByKeywords } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/get-section-lines"; import { isBold, hasNumber, hasComma, hasLetter, hasLetterAndIsAllUpperCase, } fro...
9,458
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-project.ts
import type { ResumeProject } from "lib/redux/types"; import type { FeatureSet, ResumeSectionToLines, } from "lib/parse-resume-from-pdf/types"; import { getSectionLinesByKeywords } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/get-section-lines"; import { DATE_FEATURE_SETS, getHasText, isBo...
9,459
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-resume-from-sections.test.ts
import { matchOnlyLetterSpaceOrPeriod, matchEmail, matchPhone, matchUrl, } from "lib/parse-resume-from-pdf/extract-resume-from-sections/extract-profile"; import type { TextItem } from "lib/parse-resume-from-pdf/types"; const makeTextItem = (text: string) => ({ text, } as TextItem); describe("extract-p...
9,460
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-skills.ts
import type { ResumeSkills } from "lib/redux/types"; import type { ResumeSectionToLines } from "lib/parse-resume-from-pdf/types"; import { deepClone } from "lib/deep-clone"; import { getSectionLinesByKeywords } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/get-section-lines"; import { initialFeatured...
9,461
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/extract-work-experience.ts
import type { ResumeWorkExperience } from "lib/redux/types"; import type { TextItem, FeatureSet, ResumeSectionToLines, } from "lib/parse-resume-from-pdf/types"; import { getSectionLinesByKeywords } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/get-section-lines"; import { DATE_FEATURE_SETS, ...
9,462
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/index.ts
import type { Resume } from "lib/redux/types"; import type { ResumeSectionToLines } from "lib/parse-resume-from-pdf/types"; import { extractProfile } from "lib/parse-resume-from-pdf/extract-resume-from-sections/extract-profile"; import { extractEducation } from "lib/parse-resume-from-pdf/extract-resume-from-sections/ex...
9,463
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/lib/bullet-points.ts
import type { Lines, TextItem } from "lib/parse-resume-from-pdf/types"; /** * List of bullet points * Reference: https://stackoverflow.com/questions/56540160/why-isnt-there-a-medium-small-black-circle-in-unicode * U+22C5 DOT OPERATOR (⋅) * U+2219 BULLET OPERATOR (∙) * U+1F784 BLACK SLIGHTLY SMALL CIRCLE (🞄)...
9,464
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/lib/common-features.ts
import type { TextItem, FeatureSet } from "lib/parse-resume-from-pdf/types"; const isTextItemBold = (fontName: string) => fontName.toLowerCase().includes("bold"); export const isBold = (item: TextItem) => isTextItemBold(item.fontName); export const hasLetter = (item: TextItem) => /[a-zA-Z]/.test(item.text); export c...
9,465
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/lib/feature-scoring-system.ts
import type { TextItems, TextScores, FeatureSet, } from "lib/parse-resume-from-pdf/types"; const computeFeatureScores = ( textItems: TextItems, featureSets: FeatureSet[] ): TextScores => { const textScores = textItems.map((item) => ({ text: item.text, score: 0, match: false, })); for (let ...
9,466
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/lib/get-section-lines.ts
import type { ResumeSectionToLines } from "lib/parse-resume-from-pdf/types"; /** * Return section lines that contain any of the keywords. */ export const getSectionLinesByKeywords = ( sections: ResumeSectionToLines, keywords: string[] ) => { for (const sectionName in sections) { const hasKeyWord = keywords...
9,467
0
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections
petrpan-code/xitanggg/open-resume/src/app/lib/parse-resume-from-pdf/extract-resume-from-sections/lib/subsections.ts
import { BULLET_POINTS } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/bullet-points"; import { isBold } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/common-features"; import type { Lines, Line, Subsections } from "lib/parse-resume-from-pdf/types"; /** * Divide lines into subsec...
9,468
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/redux/hooks.tsx
import { useEffect } from "react"; import { useDispatch, useSelector, type TypedUseSelectorHook, } from "react-redux"; import { store, type RootState, type AppDispatch } from "lib/redux/store"; import { loadStateFromLocalStorage, saveStateToLocalStorage, } from "lib/redux/local-storage"; import { initialResum...
9,469
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/redux/local-storage.ts
import type { RootState } from "lib/redux/store"; // Reference: https://dev.to/igorovic/simplest-way-to-persist-redux-state-to-localstorage-e67 const LOCAL_STORAGE_KEY = "open-resume-state"; export const loadStateFromLocalStorage = () => { try { const stringifiedState = localStorage.getItem(LOCAL_STORAGE_KEY);...
9,470
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/redux/resumeSlice.ts
import { createSlice, type PayloadAction } from "@reduxjs/toolkit"; import type { RootState } from "lib/redux/store"; import type { FeaturedSkill, Resume, ResumeEducation, ResumeProfile, ResumeProject, ResumeSkills, ResumeWorkExperience, } from "lib/redux/types"; import type { ShowForm } from "lib/redux/s...
9,471
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/redux/settingsSlice.ts
import { createSlice, type PayloadAction } from "@reduxjs/toolkit"; import type { RootState } from "lib/redux/store"; export interface Settings { themeColor: string; fontFamily: string; fontSize: string; documentSize: string; formToShow: { workExperiences: boolean; educations: boolean; projects: ...
9,472
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/redux/store.ts
import { configureStore } from "@reduxjs/toolkit"; import resumeReducer from "lib/redux/resumeSlice"; import settingsReducer from "lib/redux/settingsSlice"; export const store = configureStore({ reducer: { resume: resumeReducer, settings: settingsReducer, }, }); export type RootState = ReturnType<typeof s...
9,473
0
petrpan-code/xitanggg/open-resume/src/app/lib
petrpan-code/xitanggg/open-resume/src/app/lib/redux/types.ts
export interface ResumeProfile { name: string; email: string; phone: string; url: string; summary: string; location: string; } export interface ResumeWorkExperience { company: string; jobTitle: string; date: string; descriptions: string[]; } export interface ResumeEducation { school: string; d...
9,474
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/resume-builder/page.tsx
"use client"; import { Provider } from "react-redux"; import { store } from "lib/redux/store"; import { ResumeForm } from "components/ResumeForm"; import { Resume } from "components/Resume"; export default function Create() { return ( <Provider store={store}> <main className="relative h-full w-full overflo...
9,475
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/resume-import/page.tsx
"use client"; import { getHasUsedAppBefore } from "lib/redux/local-storage"; import { ResumeDropzone } from "components/ResumeDropzone"; import { useState, useEffect } from "react"; import Link from "next/link"; export default function ImportResume() { const [hasUsedAppBefore, setHasUsedAppBefore] = useState(false);...
9,476
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/resume-parser/ResumeParserAlgorithmArticle.tsx
import { isBold } from "lib/parse-resume-from-pdf/extract-resume-from-sections/lib/common-features"; import { Badge, Heading, Link, Paragraph, Table, } from "components/documentation"; import type { Line, Lines, ResumeSectionToLines, TextItem, TextItems, TextScores, } from "lib/parse-resume-from-p...
9,477
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/resume-parser/ResumeTable.tsx
import { Fragment } from "react"; import type { Resume } from "lib/redux/types"; import { initialEducation, initialWorkExperience } from "lib/redux/resumeSlice"; import { deepClone } from "lib/deep-clone"; import { cx } from "lib/cx"; const TableRowHeader = ({ children }: { children: React.ReactNode }) => ( <tr clas...
9,478
0
petrpan-code/xitanggg/open-resume/src/app
petrpan-code/xitanggg/open-resume/src/app/resume-parser/page.tsx
"use client"; import { useState, useEffect } from "react"; import { readPdf } from "lib/parse-resume-from-pdf/read-pdf"; import type { TextItems } from "lib/parse-resume-from-pdf/types"; import { groupTextItemsIntoLines } from "lib/parse-resume-from-pdf/group-text-items-into-lines"; import { groupLinesIntoSections } fr...
9,479
0
petrpan-code/edp963
petrpan-code/edp963/davinci/.travis.yml
sudo: required dist: trusty language: java jdk: - oraclejdk8 cache: directories: - $HOME/.sbt - $HOME/.m2 notification: email: recipients: - edp_support@groups.163.com on_failure: always branches: only: - master
9,480
0
petrpan-code/edp963
petrpan-code/edp963/davinci/CONTRIBUTING-CH.md
# Contributing 非常感谢贡献 Davinci!在参与贡献之前,请仔细阅读以下指引。 ## 贡献范畴 ### Bug 反馈与修复 我们建议无论是 Bug 反馈还是修复,都先创建一个 Issue 来仔细描述 Bug 的状况,以助于社区可以通过 Issue 记录来找到和回顾问题以及代码。Bug 反馈 Issue 通常需要包含**完整描述 Bug 的信息**以及**可复现的场景**,这样社区才能快速定位导致 Bug 的原因并修复它。包含 `#bug` 标签的打开的 Issue 都是需要被修复的。 ### 功能交流、实现、重构 在交流过程中,详细描述新功能(或重构)的细节、机制和使用场景,能够促使它更好更快地被实现。**...
9,481
0
petrpan-code/edp963
petrpan-code/edp963/davinci/LICENSE
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
9,482
0
petrpan-code/edp963
petrpan-code/edp963/davinci/LICENSE-3RD-PARTY
List of third-party dependencies grouped by their license type. Apache 2: * druid (com.alibaba:druid:1.1.11 - https://github.com/alibaba/druid) * fastjson (com.alibaba:fastjson:1.2.28 - https://github.com/alibaba/fastjson) * Joda-Time (joda-time:joda-time:2.9.9 - http://www.joda.org/joda-...
9,483
0
petrpan-code/edp963
petrpan-code/edp963/davinci/MAINTAINING-CH.md
# Maintaining ## 项目管理 Davinci 项目通过 [Project](https://github.com/edp963/davinci/projects) 来管理开发计划和维护清单。 ### 开发计划 开发计划在 [Roadmap](https://github.com/edp963/davinci/projects/4) 中管理。Committers 可以在 `To do` 栏中自行添加功能卡片,当功能还在卡片阶段时,意味着此功能还在设计和讨论阶段,卡片中应当包含: - 功能描述标题 - 功能设计明细及原理 - 如果包含子功能项,请逐一列出 当功能经过设计和讨论阶段之后,可以将功能卡片转成 Issu...
9,484
0
petrpan-code/edp963
petrpan-code/edp963/davinci/NOTICE
Licensed to Apereo under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apereo licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Li...
9,485
0
petrpan-code/edp963
petrpan-code/edp963/davinci/README-CH.md
Davinci ============ [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![Total Lines](https://tokei.rs/b1/github/edp963/davinci?category=lines)](https://github.com/edp963/davinci) [![Build Status](https://travis-ci.org/edp963/davinci.svg?branch=...
9,486
0
petrpan-code/edp963
petrpan-code/edp963/davinci/README.md
# Davinci - DVaaS (Data Visualization as a Service) Solution [![](https://camo.githubusercontent.com/8cb994f6c4a156c623fe057fccd7fb7d7d2e8c9b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322d3445423142412e737667)](https://www.apache.org/licenses/LICENSE-2.0.html) [![](http...
9,487
0
petrpan-code/edp963
petrpan-code/edp963/davinci/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>edp.d...
9,488
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/assembly/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> ...
9,489
0
petrpan-code/edp963/davinci/assembly/src/main
petrpan-code/edp963/davinci/assembly/src/main/assembly/assembly.xml
<!-- << Davinci == Copyright (C) 2016 - 2018 EDP == 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 applic...
9,490
0
petrpan-code/edp963/davinci/assembly/src/main
petrpan-code/edp963/davinci/assembly/src/main/assembly/release.xml
<!-- << Davinci == Copyright (C) 2016 - 2018 EDP == 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 applic...
9,491
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/bin/build.sh
#!/usr/bin/env bash current_dir=`pwd` script_dir=$(cd `dirname $0`; pwd) echo $script_dir echo $current_dir cd $script_dir cd .. cd $current_dir
9,492
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/bin/davinci.sql
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for cron_job -- ---------------------------- DROP TABLE IF EXISTS `cron_job`; CREATE TABLE `cron_job` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(45) ...
9,493
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/bin/initdb.bat
:: << :: Davinci :: == :: Copyright (C) 2016 - 2019 EDP :: == :: 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 appli...
9,494
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/bin/initdb.sh
#!/bin/bash mysql -P 3306 -h localhost -u root -proot davinci0.3 < $DAVINCI3_HOME/bin/davinci.sql
9,495
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/bin/restart-server.sh
#!/bin/bash # << # Davinci # == # Copyright (C) 2016 - 2019 EDP # == # 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 requ...
9,496
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/bin/run.bat
:: << :: Davinci :: == :: Copyright (C) 2016 - 2019 EDP :: == :: 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 appli...
9,497
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/bin/start-server.sh
#!/bin/bash # << # Davinci # == # Copyright (C) 2016 - 2019 EDP # == # 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 requ...
9,498
0
petrpan-code/edp963/davinci
petrpan-code/edp963/davinci/bin/start.bat
:: << :: Davinci :: == :: Copyright (C) 2016 - 2019 EDP :: == :: 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 appli...
9,499