Skip to content

Commit 5c17749

Browse files
Improve server support
- Adds 'use client' directives - Protects access to window and document - Safely accesses import.meta - Removes core-js polyfills (unused atm) - Misc documentation updates, including AppSDKUIProvider as optional.
1 parent eb2afee commit 5c17749

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+168
-62
lines changed

README.md

Lines changed: 5 additions & 11 deletions

package-lock.json

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
"@types/react-syntax-highlighter": "^15.5.13",
7171
"autoprefixer": "10.4.20",
7272
"clsx": "^2.1.1",
73-
"core-js": "3.46.0",
7473
"lodash": "4.17.21",
7574
"luxon": "3.7.1",
7675
"postcss": "^8",

public/favicon.png

19.3 KB

public/favicon.svg

Lines changed: 16 additions & 0 deletions

src/Installation.mdx

Lines changed: 4 additions & 10 deletions

src/Introduction.mdx

Lines changed: 1 addition & 1 deletion

src/components/Alert/Alert.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client"
2+
13
import clsx from "clsx"
24
import { type ReactNode, type Ref, useEffect, useRef, useState } from "react"
35
import { mergeRefs } from "react-merge-refs"

src/components/AppsSDKUIProvider/AppsSDKUIContext.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client"
2+
13
import { type ComponentType, createContext, type ForwardRefExoticComponent } from "react"
24

35
type AppsSDKUIContextValue = {

src/components/AppsSDKUIProvider/AppsSDKUIProvider.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
"use client"
2+
13
import { type ComponentType, type ForwardRefExoticComponent, type ReactNode } from "react"
24
import { AppsSDKUIContext } from "./AppsSDKUIContext"
35

4-
// Polyfills
5-
import "core-js/actual/array/to-sorted"
6-
76
/// <reference path="../../global.d.ts" />
87

98
interface DefaultConfig {

0 commit comments

Comments
 (0)