Skip to content

Commit

Permalink
rename calender to calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
theskinnycoder committed May 15, 2024
1 parent aa89841 commit ba66112
Show file tree
Hide file tree
Showing 54 changed files with 200 additions and 200 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "calender-sync/calender-sync-monorepo" }
{ "repo": "theskinnycoder/calendar-sync-monorepo" }
],
"commit": false,
"fixed": [],
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT LICENSE

Copyright (c) 2024 Calender Sync, by Rahul SriRam
Copyright (c) 2024 Calendar Sync, by Rahul SriRam

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
Expand Down
2 changes: 1 addition & 1 deletion configs/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"author": {
"name": "Rahul SriRam",
"email": "calender[email protected]",
"email": "calendar[email protected]",
"url": "https://rahulsriram.dev"
},
"license": "UNLICENSED",
Expand Down
2 changes: 1 addition & 1 deletion configs/tsconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"author": {
"name": "Rahul SriRam",
"email": "calender[email protected]",
"email": "calendar[email protected]",
"url": "https://rahulsriram.dev"
},
"license": "UNLICENSED",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "calender-sync-monorepo",
"name": "calendar-sync-monorepo",
"version": "0.0.1",
"description": "",
"scripts": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"keywords": [],
"author": {
"name": "Rahul SriRam",
"email": "calender[email protected]",
"email": "calendar[email protected]",
"url": "https://rahulsriram.dev"
},
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT LICENSE

Copyright (c) 2024 Calender Sync Core, by Rahul SriRam
Copyright (c) 2024 Calendar Sync Core, by Rahul SriRam

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@calender-sync/core",
"name": "@calendar-sync/core",
"version": "0.0.0",
"type": "module",
"main": "dist/index.js",
Expand All @@ -21,7 +21,7 @@
"lint:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --max-warnings 0 --fix"
},
"keywords": [
"calender-sync",
"calendar-sync",
"core"
],
"private": false,
Expand All @@ -31,7 +31,7 @@
"license": "MIT",
"author": {
"name": "Rahul SriRam",
"email": "calender[email protected]",
"email": "calendar[email protected]",
"url": "https://rahulsriram.dev"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import qs from "query-string"
import type {
CalendarEvent,
CalendarEventOrganizer,
CalenderType,
CalendarType,
Google,
NormalizedCalendarEvent,
Outlook,
Expand Down Expand Up @@ -230,5 +230,5 @@ export {
outlookMobile,
yahoo,
type CalendarEvent,
type CalenderType,
type CalendarType,
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ interface Yahoo extends Record<string, string | boolean | number | undefined> {
in_loc?: string
}

type CalenderType = "google" | "apple" | "yahoo" | "outlook"
type CalendarType = "google" | "apple" | "yahoo" | "outlook"

export type {
CalendarEvent,
CalendarEventOrganizer,
CalenderType,
CalendarType,
Google,
NormalizedCalendarEvent,
Outlook,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, "src/index.ts"),
name: "@calender-sync/core",
name: "@calendar-sync/core",
formats: ["es"],
fileName: "index",
},
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT LICENSE

Copyright (c) 2024 Calender Sync React, by Rahul SriRam
Copyright (c) 2024 Calendar Sync Hooks, by Rahul SriRam

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@calender-sync/hooks",
"name": "@calendar-sync/hooks",
"private": false,
"publishConfig": {
"access": "public"
},
"author": {
"name": "Rahul SriRam",
"email": "calender[email protected]",
"email": "calendar[email protected]",
"url": "https://rahulsriram.dev"
},
"license": "MIT",
Expand All @@ -31,7 +31,7 @@
"lint:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --max-warnings 0 --fix"
},
"keywords": [
"calender-sync",
"calendar-sync",
"react",
"vite",
"typescript",
Expand Down Expand Up @@ -61,6 +61,6 @@
"typescript": "^5.4.5"
},
"dependencies": {
"@calender-sync/core": "workspace:*"
"@calendar-sync/core": "workspace:*"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
outlookMobile,
yahoo,
type CalendarEvent,
type CalenderType,
} from "@calender-sync/core"
type CalendarType,
} from "@calendar-sync/core"

function useCalenderSync() {
const generateCalendarUrl = (type: CalenderType, event: CalendarEvent) => {
function useCalendarSync() {
const generateCalendarUrl = (type: CalendarType, event: CalendarEvent) => {
let url = ""

const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent)
Expand All @@ -33,7 +33,7 @@ function useCalenderSync() {
}

const addToCalendar = (
type: CalenderType,
type: CalendarType,
event: CalendarEvent,
newTab = true,
) => {
Expand All @@ -52,4 +52,4 @@ function useCalenderSync() {
}
}

export { useCalenderSync, type CalendarEvent, type CalenderType }
export { useCalendarSync, type CalendarEvent, type CalendarType }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, "src/index.tsx"),
name: "@calender-sync/hooks",
name: "@calendar-sync/hooks",
formats: ["es"],
fileName: "index",
},
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT LICENSE

Copyright (c) 2024 Calender Sync Hooks, by Rahul SriRam
Copyright (c) 2024 Calendar Sync React, by Rahul SriRam

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@calender-sync/react",
"name": "@calendar-sync/react",
"private": false,
"publishConfig": {
"access": "public"
},
"author": {
"name": "Rahul SriRam",
"email": "calender[email protected]",
"email": "calendar[email protected]",
"url": "https://rahulsriram.dev"
},
"license": "MIT",
Expand All @@ -33,7 +33,7 @@
"build-storybook": "storybook build"
},
"keywords": [
"calender-sync",
"calendar-sync",
"react",
"tailwindcss",
"vite",
Expand Down Expand Up @@ -83,6 +83,6 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"tailwind-merge": "^2.3.0",
"@calender-sync/hooks": "workspace:*"
"@calendar-sync/hooks": "workspace:*"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DropdownMenuItem } from "@/components/ui/dropdown-menu"
import ICONS from "@/lib/icons"
import { useCalenderSync } from "@calender-sync/hooks"
import { useCalendarSync } from "@calendar-sync/hooks"
import * as React from "react"
import useCalenderLinkDropdown from "./use-calender-link-dropdown"
import useCalendarLinkDropdown from "./use-calendar-link-dropdown"

interface CalSyncDropdownAppleButtonProps
extends React.ComponentPropsWithoutRef<typeof DropdownMenuItem> {
Expand All @@ -13,8 +13,8 @@ const CalSyncDropdownAppleButton = React.forwardRef<
React.ElementRef<typeof DropdownMenuItem>,
CalSyncDropdownAppleButtonProps
>((props, forwardedRef) => {
const { addToCalendar } = useCalenderSync()
const { event, newTab } = useCalenderLinkDropdown()
const { addToCalendar } = useCalendarSync()
const { event, newTab } = useCalendarLinkDropdown()

return (
<DropdownMenuItem
Expand All @@ -32,7 +32,7 @@ const CalSyncDropdownAppleButton = React.forwardRef<
>
<div className="flex items-center space-x-2">
<ICONS.apple />
<span>Add to Apple Calender</span>
<span>Add to Apple Calendar</span>
</div>
</DropdownMenuItem>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CalendarEvent } from "@calender-sync/hooks"
import type { CalendarEvent } from "@calendar-sync/hooks"
import * as React from "react"

type CalendarSyncDropdownProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DropdownMenuItem } from "@/components/ui/dropdown-menu"
import ICONS from "@/lib/icons"
import { useCalenderSync } from "@calender-sync/hooks"
import { useCalendarSync } from "@calendar-sync/hooks"
import * as React from "react"
import useCalenderLinkDropdown from "./use-calender-link-dropdown"
import useCalendarLinkDropdown from "./use-calendar-link-dropdown"

interface CalSyncDropdownGoogleButtonProps
extends React.ComponentPropsWithoutRef<typeof DropdownMenuItem> {
Expand All @@ -13,8 +13,8 @@ const CalSyncDropdownGoogleButton = React.forwardRef<
React.ElementRef<typeof DropdownMenuItem>,
CalSyncDropdownGoogleButtonProps
>((props, forwardedRef) => {
const { addToCalendar } = useCalenderSync()
const { event, newTab } = useCalenderLinkDropdown()
const { addToCalendar } = useCalendarSync()
const { event, newTab } = useCalendarLinkDropdown()

return (
<DropdownMenuItem
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DropdownMenuItem } from "@/components/ui/dropdown-menu"
import ICONS from "@/lib/icons"
import { useCalenderSync } from "@calender-sync/hooks"
import { useCalendarSync } from "@calendar-sync/hooks"
import * as React from "react"
import useCalenderLinkDropdown from "./use-calender-link-dropdown"
import useCalendarLinkDropdown from "./use-calendar-link-dropdown"

interface CalSyncDropdownOutlookButtonProps
extends React.ComponentPropsWithoutRef<typeof DropdownMenuItem> {
Expand All @@ -13,8 +13,8 @@ const CalSyncDropdownOutlookButton = React.forwardRef<
React.ElementRef<typeof DropdownMenuItem>,
CalSyncDropdownOutlookButtonProps
>((props, forwardedRef) => {
const { addToCalendar } = useCalenderSync()
const { event, newTab } = useCalenderLinkDropdown()
const { addToCalendar } = useCalendarSync()
const { event, newTab } = useCalendarLinkDropdown()

return (
<DropdownMenuItem
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import * as React from "react"
import { CalendarSyncDropdownContext } from "./context"

export default function useCalenderLinkDropdown() {
export default function useCalendarLinkDropdown() {
const context = React.useContext(CalendarSyncDropdownContext)

if (!context) {
throw new Error(
"useCalenderLinkDropdown must be used within a CalSyncDropdown component",
"useCalendarLinkDropdown must be used within a CalSyncDropdown component",
)
}

const { event, ...rest } = context

if (!event || Object.keys(event).length === 0) {
throw new Error(
"useCalenderLinkDropdown must be used within a CalSyncDropdown component with an event",
"useCalendarLinkDropdown must be used within a CalSyncDropdown component with an event",
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DropdownMenuItem } from "@/components/ui/dropdown-menu"
import ICONS from "@/lib/icons"
import { useCalenderSync } from "@calender-sync/hooks"
import { useCalendarSync } from "@calendar-sync/hooks"
import * as React from "react"
import useCalenderLinkDropdown from "./use-calender-link-dropdown"
import useCalendarLinkDropdown from "./use-calendar-link-dropdown"

interface CalSyncDropdownYahooButtonProps
extends React.ComponentPropsWithoutRef<typeof DropdownMenuItem> {
Expand All @@ -13,8 +13,8 @@ const CalSyncDropdownYahooButton = React.forwardRef<
React.ElementRef<typeof DropdownMenuItem>,
CalSyncDropdownYahooButtonProps
>((props, forwardedRef) => {
const { addToCalendar } = useCalenderSync()
const { event, newTab } = useCalenderLinkDropdown()
const { addToCalendar } = useCalendarSync()
const { event, newTab } = useCalendarLinkDropdown()

return (
<DropdownMenuItem
Expand Down
Loading

0 comments on commit ba66112

Please sign in to comment.