This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
// MARK: - CustomIconView | |
struct CustomIconView: View { | |
let containerSize: CGSize | |
let imageSize: CGSize | |
let nsImage: NSImage? | |
@Environment(\.colorScheme) var colorScheme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension NSScrollView { | |
var documentSize: NSSize { | |
set { documentView?.setFrameSize(newValue) } | |
get { documentView?.frame.size ?? NSSize.zero } | |
} | |
var documentOffset: NSPoint { | |
set { documentView?.scroll(newValue) } | |
get { documentVisibleRect.origin } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: [Previous](@previous) | |
import Foundation | |
import AppKit | |
Task { | |
print("[DEBUG] BEING") | |
var task: Task<String, Error>? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func clamp<T: Comparable>(value: T, minValue: T, maxValue: T) -> T { | |
return max( | |
minValue, | |
min( | |
value, | |
maxValue | |
) | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Menu Key Bindings</key> | |
<dict> | |
<key>Key Bindings</key> | |
<array> | |
<dict> | |
<key>Action</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
import { | |
Context, | |
createContext, | |
useContextSelector, | |
} from '@fluentui/react-context-selector'; | |
type CreateNamedContextReturn<T> = [ | |
Provider: React.Provider<T>, | |
useContext: <V = T>() => V, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see https://stackoverflow.com/questions/14962018/detecting-and-fixing-circular-references-in-javascript | |
*/ | |
export function isCyclic(obj: Record<string, unknown>): boolean { | |
const seenObjects: unknown[] = []; | |
function detect(objToDetect: unknown) { | |
if (objToDetect && typeof objToDetect === 'object') { | |
if (seenObjects.includes(objToDetect)) { | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deleteField(obj: any, path: string) { | |
let res = clone(obj); // this keeps inheritance when obj is a class | |
let resVal = res; | |
let i = 0; | |
let pathArray = toPath(path); | |
for (; i < pathArray.length - 1; i++) { | |
var currentPath = pathArray[i]; | |
let currentObj = get(obj, pathArray.slice(0, i + 1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-01-22T19:56:55.940Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ATTN: This file will NOT be merged. It's just for manually testing this via the existing Full Stack Experiment manager | |
*/ | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { Button, Container, Row, Col, EmptyDashboard } from 'optimizely-oui'; | |
import ui from 'core/ui'; | |
import Immutable, { toImmutable, toJS } from 'optly/immutable'; |
NewerOlder