Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COMPLIANCE] Add Copyright and License Headers #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/basic/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function RootLayout({
children,
}: {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/app/(app)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client'
import { useRouter } from 'next/navigation'
import { useEffect } from 'react'
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/app/(swingset)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import layout from 'swingset/theme'

export default layout
5 changes: 5 additions & 0 deletions examples/basic/app/(swingset)/swingset/[...path]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { generateStaticParams } from 'swingset/meta'
import { Page } from 'swingset/theme'

Expand Down
5 changes: 5 additions & 0 deletions examples/basic/app/(swingset)/swingset/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import Content from './content.mdx'

export default async function SwingsetRoot() {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/components/accordion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { ReactElement } from 'react'

interface AccordionProps {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/components/button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { ReactElement } from 'react'

interface ButtonProps {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/components/card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export function Card({ children }) {
return (
<div style={{ border: '1px solid gray', borderRadius: '4px' }}>
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/components/checkbox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export function Checkbox(props) {
return <input type="checkbox" {...props} />
}
5 changes: 5 additions & 0 deletions examples/basic/components/nested/title/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export function Title({ children }) {
return <h1>{children}</h1>
}
5 changes: 5 additions & 0 deletions examples/basic/components/text-input/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export function TextInput(props) {
return <input {...props} />
}
5 changes: 5 additions & 0 deletions examples/basic/components/text/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export default function Text({ children }) {
return <span>{children}</span>
}
5 changes: 5 additions & 0 deletions examples/basic/mdx-components.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import themeComponents from 'swingset-theme-hashicorp/MDXComponents'

export function useMDXComponents(components) {
Expand Down
5 changes: 5 additions & 0 deletions examples/basic/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

/// <reference types="next" />
/// <reference types="next/image-types/global" />

Expand Down
5 changes: 5 additions & 0 deletions examples/basic/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import withSwingset from 'swingset'
import remarkGfm from 'remark-gfm'
import rehypeMdxCodeProps from 'rehype-mdx-code-props'
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

module.exports = {
plugins: {
'postcss-import': {},
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/MDXComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { PropsTable } from './components/props-table'
import { Heading, Body } from './components/text'
import { LiveComponent } from './components/live-component'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client'
import { SideNavigation } from './side-nav'
import { categories } from 'swingset/meta'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client' //Library calls hooks internally
import { Highlight, themes } from 'prism-react-renderer'
import { parseCode, parseLanguage } from './helpers'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client'
import {
IconDuplicate16,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Language, MDXPreClass, MDXPreElement } from '@/types'

export const parseCode = (toParse: MDXPreElement | string): string => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { CodeBlock } from './code-block'

export { CodeBlock }
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export const CustomTheme = {
colors: {
accent: 'inherit',
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/components/link.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { type ComponentProps } from 'react'
import NextLink from 'next/link'
import { cx } from 'class-variance-authority'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { SandpackTheme } from '@codesandbox/sandpack-react/types'

const sandpackTheme: SandpackTheme = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import type { SandpackFile } from '@codesandbox/sandpack-react'
import { parseCode } from '../code-block/helpers'
import { MDXPreElement } from '@/types'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client'
import {
SandpackProvider,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Logo } from './logo'
import Link from 'next/link'
import { IconGithub24 } from '@hashicorp/flight-icons/svg-react'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { IconHashicorp24 } from '@hashicorp/flight-icons/svg-react'

function Logo() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

'use client'

export function OpenInEditor({ path }: { path: string }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { ComponentType, ReactNode } from 'react'

interface PropsTableProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { NavigationNode, ComponentNode } from 'swingset/types'
import { LinkItem } from './link-item'
import { cx } from 'class-variance-authority'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { NavigationTree } from 'swingset/types'
import Category from './category'
import { Link } from '../link'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Link } from '../link'
import { cx } from 'class-variance-authority'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { IconBottom24 } from '@hashicorp/flight-icons/svg-react/bottom-24'
import { cx } from 'class-variance-authority'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { cva, VariantProps, cx } from 'class-variance-authority'
import { type HTMLAttributes } from 'react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { cva, VariantProps, cx } from 'class-variance-authority'
import { type HTMLAttributes } from 'react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Heading } from './heading'
import { Body } from './body'

Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

@tailwind base;
@tailwind components;
@tailwind utilities;
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

// NOTE: global css import needs to be at the top so component-specific CSS is loaded after the theme reset (component-specific CSS is loaded as a result of the swingset/meta import below)
import '../style.css'
import React from 'react'
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { ComponentEntity, EvaluatedEntity } from 'swingset/types'
import { Heading, Body } from './components/text'
import { OpenInEditor } from './components/open-in-editor'
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

export type Language = 'ts' | 'js' | 'jsx' | 'tsx'

export type MDXPreClass = `language-${Language}`
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

const colors = require('tailwindcss/colors')

/** @type {import('tailwindcss').Config} */
Expand Down
5 changes: 5 additions & 0 deletions packages/swingset-theme-hashicorp/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { Buffer } from 'node:buffer'
import { defineConfig } from 'tsup'

Expand Down
Loading