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
// Rewritten by Cong Nguyen | |
// original code from Facebook Frontend website: https://gist.github.com/ladifire/21fb3e774cf62ac50d0700fd50d1ccb2 | |
import React, { useCallback, useContext, useRef, useState } from "react"; | |
import { PressableGroupContext } from "@facebook-frontend/context"; | |
import { joinClasses, useMergeRefs } from "@facebook-frontend/utils"; | |
import stylex from "@stylexjs/stylex"; | |
import { Pressability } from "./Pressability"; | |
import { useWebPressableTouchStartHandler } from "./useWebPressableTouchStartHandler"; |
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
__d("PressableText.react", ["Pressability", "PressableGroupContext", "RecoverableViolationWithComponentStack.react", "gkx", "joinClasses", "justknobx", "react", "stylex", "useCometErrorProject", "useMergeRefs", "useWebPressableTouchStartHandler"], (function(a, b, c, d, e, f, g) { | |
"use strict"; | |
var h, i, j = i || (i = d("react")); | |
b = i; | |
var k = b.useCallback | |
, l = b.useContext | |
, m = b.useRef | |
, n = b.useState | |
, o = ["menuitem", "tab", "none"] | |
, p = { |
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
const { resolve } = require('path') | |
const { readdir } = require('fs').promises | |
const babel = require('@babel/core') | |
const fs = require('fs') | |
const t = require('@babel/types') | |
async function* getFiles(dir) { | |
const dirents = await readdir(dir, { withFileTypes: true }) | |
for (const dirent of dirents) { | |
const res = resolve(dir, dirent.name) |
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 React from 'react'; | |
import { withErrorBoundary } from 'components/common/MartyErrorBoundary'; | |
export const ExampleComponent = () => { | |
return ( | |
<div> | |
Component | |
</div> | |
); |
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
/** | |
* Copyright (c) Ladifire, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
import * as React from 'react'; | |
import fbt from 'fbt'; | |
import {forEach} from "lodash"; |
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
window.executeFullscreenEmscriptenCode = () => { | |
var Module = typeof Module !== "undefined" ? Module : {}; | |
Module = self["Module"] || {}; | |
Module["noExitRuntime"] = true; | |
Error["stackTraceLimit"] = 100; | |
Module["onAbort"] = function(what) { | |
ABORT = true; | |
EXITSTATUS = 1; | |
var text = "abort(" + (what && !/^\d+$/.test(what + "") ? JSON.stringify(what) : "") + ")"; | |
console.error(text); |
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
/** | |
* Copyright (c) Ladifire, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
import * as React from 'react'; | |
import {Pressable} from '@ladifire-ui-react/tetra-button'; |
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
__d("WorkGalahadUIChannelItem.react", ["CometPressableOverlay.react", "Locale", "URI", | |
"WIGInteractiveElementContext.react", "WIGPressable.react", "WIGTextPairing.react", | |
"WorkGalahadChannelFocusableTable.react", "gkx", "react", "stylex", "useCometPreloader", "useHoverAndFocusState"], (function(a, b, c, d, e, f, g) { | |
"use strict"; | |
var h = d("react"); | |
b = d("react"); | |
var i = b.useCallback, | |
j = b.useMemo, | |
k = b.useState, | |
l = c("gkx")("1919265"), |
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
/** | |
* Copyright (c) Ladifire, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
import * as React from 'react'; | |
import stylex from '@ladifire-opensource/stylex'; |
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
// These are some stylex real examples of uses in our projects | |
const k = stylex.create({ | |
base: { | |
backgroundColor: "var(--divider)", | |
display: "none", | |
height: "100%", | |
opacity: 0, | |
position: "absolute", | |
right: 0, |